When running a build from the arm64 branch, i.e. for the aarch64 target, then /usr/bin/qemu-aarch64-static is required to execute the target binaries on the host machine:
# file /pi-gen/work/<IMG_NAME>/stage0/rootfs/bin/echo
/pi-gen/work/<IMG_NAME>/stage0/rootfs/bin/echo: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), ...
# ls /proc/sys/fs/binfmt_misc/
qemu-aarch64 qemu-aarch64_be qemu-arm qemu-armeb register status
# chroot "/pi-gen/work/<IMG_NAME>/stage0/rootfs" /bin/echo it works!
it works!
Depending on the host system the user may have to install a different package to get QEMU aarch64 support, f.ex. on Fedora it would be qemu-user-static-aarch64.
Adding this to the troubleshooting section will hopefully save hours of head-scratching for other users...
When running a build from the
arm64
branch, i.e. for theaarch64
target, then/usr/bin/qemu-aarch64-static
is required to execute the target binaries on the host machine:Depending on the host system the user may have to install a different package to get QEMU aarch64 support, f.ex. on Fedora it would be
qemu-user-static-aarch64
.Adding this to the troubleshooting section will hopefully save hours of head-scratching for other users...