Discussion:
[fedora-arm] armv7: qemu & grub2 & efi ...
Gerd Hoffmann
2016-07-22 10:28:40 UTC
Permalink
Hi,

Booting armv7 machines is pretty messy, and fedora seems to support
uboot only for them. There isn't a armv7 build of grub2 ...

qemu virtual machines (-M virt machine type) look pretty much identical
for armv7 and aarch64 (except for the cpu obviously). tianocore
firmware works for both. The fedora kernel works fine too, when loaded
directly via -kernel.

I've updated the edk2 package to also build arm firmware images
(edk2-arm subpackage), which should land in -testing soon.

The only thing missing now is a bootloader, so you don't have to copy
the kernel + initrd images from the virtual disk somehow to boot the
virtual machine (and repeat that procedure after every kernel update).

Tried to build the grub2 fedora package on arm. Didn't work out, fails
with a apparently secure-boot related build failure.

Went on with upstream grub2 instead, added two patches[1][2] to make
grub look up the FDT and pass it on to the guest. That works. Not
fully sure this is the best way to handle things though. Noticed the
guest kernel doesn't know it runs on efi (/sys/firmware/efi is not
there). Guess because grub doesn't enter the kernel via efi stub.

Suggestions how to go forward?

I think once we have grub2 @ arm installing virtual machines should be
as easy as it is on aarch64 and x86.

cheers,
Gerd

[1] https://lists.gnu.org/archive/html/bug-grub/2016-07/msg00014.html
[2] https://lists.gnu.org/archive/html/bug-grub/2016-07/msg00016.html
Marcin Juszkiewicz
2016-07-22 10:55:32 UTC
Permalink
Post by Gerd Hoffmann
Booting armv7 machines is pretty messy, and fedora seems to support
uboot only for them. There isn't a armv7 build of grub2 ...
I've updated the edk2 package to also build arm firmware images
(edk2-arm subpackage), which should land in -testing soon.
Thanks a lot!
Post by Gerd Hoffmann
Tried to build the grub2 fedora package on arm. Didn't work out, fails
with a apparently secure-boot related build failure.
Something to fix.
Post by Gerd Hoffmann
Went on with upstream grub2 instead, added two patches[1][2] to make
grub look up the FDT and pass it on to the guest. That works. Not
fully sure this is the best way to handle things though. Noticed the
guest kernel doesn't know it runs on efi (/sys/firmware/efi is not
there). Guess because grub doesn't enter the kernel via efi stub.
Or EFI support was not enabled in kernel.
Post by Gerd Hoffmann
Suggestions how to go forward?
1. fix grub on arm
2. enable efi support in arm kernel
3. add/enable efi-on-arm support in libvirt
4. profit
Post by Gerd Hoffmann
as easy as it is on aarch64 and x86.
We need to add info 'arm has uefi too' into libvirt.
Dennis Gilmore
2016-07-25 12:43:17 UTC
Permalink
Post by Gerd Hoffmann
Hi,
Booting armv7 machines is pretty messy, and fedora seems to support
uboot only for them. There isn't a armv7 build of grub2 ...
qemu virtual machines (-M virt machine type) look pretty much identical
for armv7 and aarch64 (except for the cpu obviously). tianocore
firmware works for both. The fedora kernel works fine too, when loaded
directly via -kernel.
I've updated the edk2 package to also build arm firmware images
(edk2-arm subpackage), which should land in -testing soon.
The only thing missing now is a bootloader, so you don't have to copy
the kernel + initrd images from the virtual disk somehow to boot the
virtual machine (and repeat that procedure after every kernel update).
Tried to build the grub2 fedora package on arm. Didn't work out, fails
with a apparently secure-boot related build failure.
Went on with upstream grub2 instead, added two patches[1][2] to make
grub look up the FDT and pass it on to the guest. That works. Not
fully sure this is the best way to handle things though. Noticed the
guest kernel doesn't know it runs on efi (/sys/firmware/efi is not
there). Guess because grub doesn't enter the kernel via efi stub.
Suggestions how to go forward?
as easy as it is on aarch64 and x86.
cheers,
Gerd
[1] https://lists.gnu.org/archive/html/bug-grub/2016-07/msg00014.html
[2] https://lists.gnu.org/archive/html/bug-grub/2016-07/msg00016.html
We only support u-boot on 32 bit arm, In order to support uefi, there will
need to be patches to anaconda, grubby, blivet possibly uefi needs to be
enabled in the kernel. We need someone with enough roundtuits to build a u-
boot that will get the fdt from qemu and just work.

Dennis

Loading...