Finally I found some time for this ...

Right now, we have those x86 binaries:
pkg:ipxe      /usr/lib/ipxe/ipxe.efi -> /boot/ipxe.efi
pkg:grub-ipxe /boot/ipxe.efi

file /boot/ipxe.efi
#/boot/ipxe.efi: MS-DOS executable PE32+ executable (DLL) (EFI application) 
x86-64, for MS Windows

As suggested there are arm64 use cases and ipxe allows to be build for that.
But due to the way roms work it maybe should not become non-arch-all (there are 
use cases for emulation too).
Instead might better try to cross build that in the same run and provide x86 
and arm64 version in the same package.

If in the build env that we already have for the rest of the build we run the 
suggested command (modified to match the rest of the build)
  dh_auto_build --sourcedirectory=src -- V=1 NO_WERROR=1 
VERSION="1.21.1+git-20220113.fbbdc3926-0ubuntu1~jammyppa1" 
bin-arm64-efi/ipxe.efi
we fail, but that is ok (on x86).

We need gcc-aarch64-linux-gnu to be present and need to build with that by 
setting it for dh_auto_build. That gives me a much better result then:
 # file src/bin-arm64-efi/ipxe.efi
 src/bin-arm64-efi/ipxe.efi: MS-DOS executable PE32+ executable (DLL) (EFI 
application) Aarch64, for MS Windows

For file placement, it obviously can't be /boot/ipxe.efi as it would make 
x86/arm64 mutually exclusive. And I could see scenarios where a host wants to 
run emulated arm ipxe on nonarm systemd. In any case making it mutually 
exclusive seems wrong.
If we rename it we also do not need to introduce a new package, we could go 
"along" the existing one like.
 /boot/ipxe-arm64.efi in pkg:grub-ipxe


I've made a lot of assumptions:
- about ipxe-arm64.efi as file name being useful - is it?
- would we also need want an arm64 iso? It would not just be added to the 
current iso as that has an x86 boot sector. Is there a real use case to a arm64 
ipxe.iso?

Those assumptions might be wrong - but before sorting out those,
@xin3liang I'd ask if you could test the ipxe-arm64.efi that is built in
this PPA [1] as part of pkg grub-ipxe.

If it works we can sort out the rest of the details, but if it does not
work I need to go back to step #1.

[1]: https://launchpad.net/~ci-train-ppa-
service/+archive/ubuntu/4753/+packages

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890230

Title:
  arm64 ipxe package isn't an arm64 build

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ipxe/+bug/1890230/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to