You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you build an image via lkt build, and the target is one of the following for EFI:
raw
qcow
iso
it injects the correct .EFI file in the boot path. For arm64, that is BOOTAA64.EFI, while for amd64, that is BOOTX64.EFI.
It detects which one to inject based in uname -m.
That works fine if you are building on amd64 for amd64, or arm64 for arm64. However, if you are cross-building - arm64 for amd64 or amd64 for arm64 - then the final image should be the target arch, but because it uses uname -m, it injects for the build arch.
Steps to reproduce the issue:
On an arm64 device, runlinuxkit build linuxkit --arch amd64; or, on an amd64 device, linuxkit build linuxkit --arch arm64
Try to boot it, it will hang
Inspect the filesystem, under /BOOT/EFI, you will find the .EFI file for the arch on which you built not for which you are _targeting)
The fix is straightforward:
Find the four places we set the BOOTFILE
Replace uname -m detection with passing the target arch
The text was updated successfully, but these errors were encountered:
Description
When you build an image via
lkt build
, and the target is one of the following for EFI:it injects the correct
.EFI
file in the boot path. For arm64, that isBOOTAA64.EFI
, while for amd64, that isBOOTX64.EFI
.It detects which one to inject based in
uname -m
.That works fine if you are building on amd64 for amd64, or arm64 for arm64. However, if you are cross-building - arm64 for amd64 or amd64 for arm64 - then the final image should be the target arch, but because it uses
uname -m
, it injects for the build arch.Steps to reproduce the issue:
linuxkit build linuxkit --arch amd64
; or, on an amd64 device,linuxkit build linuxkit --arch arm64
/BOOT/EFI
, you will find the.EFI
file for the arch on which you built not for which you are _targeting)The fix is straightforward:
BOOTFILE
uname -m
detection with passing the target archThe text was updated successfully, but these errors were encountered: