Workarounds for building on a Raspberry Pi 5 host #217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Building Kuiper images on a Debian bookworm Raspberry Pi 5 host would previously run into the following issues:
01.bootstrap/run.shfails atupdate-binfmts --enable qemu-armbecauseqemu-armis not provided on arm hosts ("why emulate arm if already natively on arm?")07.extra-tweaks/02.install-rpi-packagesfails because chroot detection with debtoolsischrootreturns incorrect results (2 instead of 0), which breaks the post-install script of theraspi-firmwarepackage.This PR adds:
update-binfmtsif emulation is actually needed (host arch != aarch64 && host arch != arm*)ischrootwith/usr/bin/trueduring the image build. This assumes all binaries executed from the built rootfs are ran inside a chroot environment.An optional "hack" to speed up dpkg by disabling filesystem syncs after each installed package. This helps a lot when the backing storage is slow, such as an SD card.Open questions:
The dpkg unsafe-io hack should be enabled as soon as possible to speed up as many package installs as possible (right after debootstrap would be ideal)PR Type
PR Checklist