x86: multiboot2 protocol support
Re:
> The final goal is xen.efi binary file which could be loaded by EFI > loader, multiboot (v1) protocol (only on legacy BIOS platforms) and > multiboot2 protocol. This way we will have:
> - smaller Xen code base,
> - one code base for xen.gz and xen.efi,
> - one build method for xen.gz and xen.efi;
> xen.efi will be extracted from xen file
> using objcopy; PE header will be contained
> in ELF file and will precede Xen code,
> - xen.efi build will not so strongly depend
> on a given GCC and binutils version.
As of v220, systemd provides systemd-boot (formerly gummiboot)
https://wiki.archlinux.org/index.php/Boot_loaders#systemd-boot
https://wiki.archlinux.org/index.php/Systemd-boot#EFI_boot
and is apparently capable of booting EFISTUB kernels.
Will the aforementioned goals enable direct boot using systemd-boot on EFI platforms ? Or is it possible even now?
As my current test distro is Opensuse, with systemd v < 220, I've not yet tested.
Quoted 17 lines · PGNet Dev
Re:
> The final goal is xen.efi binary file which could be loaded by EFI > loader, multiboot (v1) protocol (only on legacy BIOS platforms) and > multiboot2 protocol. This way we will have:
> - smaller Xen code base,
> - one code base for xen.gz and xen.efi,
> - one build method for xen.gz and xen.efi;
> xen.efi will be extracted from xen file
> using objcopy; PE header will be contained
> in ELF file and will precede Xen code,
> - xen.efi build will not so strongly depend
> on a given GCC and binutils version.As of v220, systemd provides systemd-boot (formerly gummiboot)
Quoted 7 lines
https://wiki.archlinux.org/index.php/Boot_loaders#systemd-boot
https://wiki.archlinux.org/index.php/Systemd-boot#EFI_bootand is apparently capable of booting EFISTUB kernels.
Will the aforementioned goals enable direct boot using systemd-boot on EFI platforms ? Or is it possible even now?
If it supports multiboot2 with my extensions then it should work. However, I do not think it is true because all is in development state and nothing is set in stone. I am going to release next version of my patches in November. I hope then we will be able to establish main things and maybe it will be later sucked by systemd-boot. I think that you should ask systemd-boot guys what they think about that.
Daniel
Quoted 9 lines · Daniel Kiper
Quoted 2 lines
Will the aforementioned goals enable direct boot using systemd-boot on EFI platforms ? Or is it possible even now?
If it supports multiboot2 with my extensions then it should work. However, I do not think it is true because all is in development state and nothing is set in stone. I am going to release next version of my patches in November. I hope then we will be able to establish main things and maybe it will be later sucked by systemd-boot. I think that you should ask systemd-boot guys what they think about that.
fwiw, from #systemd IRC
Q: does/will systemd-boot work to boot Xen Dom0?
A: systemd-boot will boot anything that's an EFI program
Q: that's to mean, any EFI executable on the EFI partition?
A: yes. apparently that includes Xen itself, according to
https://wiki.archlinux.org/index.php/Xen#With_UEFI_support
"cp /usr/lib/efi/xen-4.4.0.efi /boot"
that's not the dom0 however, that's just the hypervisor so the question is, how the hypervisor loads dom0
...
if you copy xen-x.y.z.efi as /boot/EFI/Boot/BOOTX64.EFI it'll be
booted by UEFI by default
you don't even need gummiboot/sd-boot
or you could efibootmgr it into your native UEFI boot menu I never used xen, but it seems to read xen.cfg and load dom0 itself,
which is just fine
which, IIUC, is "probably should ... sort of".
I suspect wait and see is called for.
I'm hoping the Xen-on-UEFI work you're doing helps to smooth out the boot process.
Thanks.
Quoted 13 lines · PGNet Dev
Quoted 9 lines · Daniel Kiper
Quoted 2 lines
Will the aforementioned goals enable direct boot using systemd-boot on EFI platforms ? Or is it possible even now?
If it supports multiboot2 with my extensions then it should work. However, I do not think it is true because all is in development state and nothing is set in stone. I am going to release next version of my patches in November. I hope then we will be able to establish main things and maybe it will be later sucked by systemd-boot. I think that you should ask systemd-boot guys what they think about that.
fwiw, from #systemd IRC
Quoted 15 lines
Q: does/will systemd-boot work to boot Xen Dom0?
A: systemd-boot will boot anything that's an EFI program
Q: that's to mean, any EFI executable on the EFI partition?
A: yes. apparently that includes Xen itself, according to
https://wiki.archlinux.org/index.php/Xen#With_UEFI_support
"cp/usr/lib/efi/xen-4.4.0.efi/boot"
that's not the dom0 however, that's just the hypervisor so the question is, how the hypervisor loads dom0
...
if you copy xen-x.y.z.efi as/boot/EFI/Boot/BOOTX64.EFIit'll be
booted by UEFI by default
you don't even need gummiboot/sd-boot
or you couldefibootmgrit into your native UEFI boot menu I never used xen, but it seems to read xen.cfg and load dom0
itself, which is just fine
This is correct. I missed that you are talking about PE executable. However, as it was said you must create xen.cfg in advance and put it in the same directory with xen.efi. Please check xen/docs/misc/efi.markdown for more details.
Quoted 6 lines
which, IIUC, is "probably should ... sort of".
I suspect wait and see is called for.
I'm hoping the Xen-on-UEFI work you're doing helps to smooth out the boot process.
I am too.
Daniel
Quoted 3 lines · Daniel Kiper
I missed that you are talking about PE executable. However,
as it was said you must create xen.cfg in advance and put it in the same directory with xen.efi. Please check xen/docs/misc/efi.markdown for more details.
TBH I'm not clear on whether the executable is -- or more importantly, still will be -- needed.
Atm, I'm manually creating the xen.cfg/xen.ini and chainloading via GRUB2. Hence the mess, and asking about simpler approaches.
IIUC, systemd-boot is a rename (fork?) of gummiboot. WAS going to try it awhile ago, as a simpler alternative to Grub2, but saw only that the project had been emptied out. Didn't realize that it'd been subsumed.
Interestingly, from https://en.wikipedia.org/wiki/Gummiboot_(software)
"Red Hat's Fedora Project does not use gummiboot for booting UEFI
systems; instead, it will use efilinux to chainload GRUB."
Trying to find out the WHY in the different boot-Xen-on-UEFI approaches, let alone simply what just works, is a challenge.
Quoted 7 lines · PGNet Dev
Quoted 3 lines · Daniel Kiper
I missed that you are talking about PE executable. However,
as it was said you must create xen.cfg in advance and put it in the same directory with xen.efi. Please check xen/docs/misc/efi.markdown for more details.TBH I'm not clear on whether the executable is -- or more importantly, still will be -- needed.
I am not sure what do you mean here.
Quoted 2 lines
Atm, I'm manually creating the xen.cfg/xen.ini and chainloading via GRUB2. Hence the mess, and asking about simpler approaches.
multiboot2 (on which I am working on) is solution for your problem.
Daniel