Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass target arch to final image builder as TARGETARCH; use TARGETARCH… #3951

Merged
merged 1 commit into from Oct 8, 2023

Conversation

deitch
Copy link
Collaborator

@deitch deitch commented Oct 5, 2023

… when generating raw and iso, fallback to build arch; use updated images that read TARGETARCH; ensure grub has EFI for all archs

- What I did

Fixes #3949

When you build for an EFI format for an arch different than the build arch, ensure you get the right .EFI file.

To enable it, it needs to:

  • pass the target arch to outputImg() and outputIso(), which pass them to dockerRun(), which passes them via -e to the docker image
  • separate grub into 2 packages: grub-dev and grub. It is really hard to cross-build grub's .EFI files. Well, it is easy, but you need the modules, which is not so easy, so it was easier to build grub-dev as images on each target platform and then grub just takes the output .EFI from each
  • added a util to canonicalize arch names for go and for march

- How I did it

Changed lots of files, see description above

- How to verify it

CI. Plus I ran local and cross-builds, and they all work correctly.

- Description for the changelog

Handle EFI bootable images for cross-builds

… when generating raw and iso, fallback to build arch; use updated images that read TARGETARCH; ensure grub has EFI for all archs

Signed-off-by: Avi Deitcher <avi@deitcher.net>
@deitch deitch merged commit 5d78de4 into linuxkit:master Oct 8, 2023
22 checks passed
@deitch deitch deleted the proper-efi-arch branch October 8, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong EFI file in iso, qcow and raw efi images when cross-building
1 participant