Does Linuxboot support to implement on ARM64?

163 views
Skip to first unread message

relif...@gmail.com

unread,
Aug 12, 2020, 9:21:41 PM8/12/20
to linuxboot
Hi Linuxboot Group,

    I am an intern engineer interested in Linuxboot project, trying to implement Linuxboot on QEMU for AARCH64.

    I have implemented Linuxboot on QEMU for x86, with the kernel built by HEADS and u-root initramfs. Then I want to complete the same work on QEMU for AARCH64.
    So far I have replaced UEFI Shell with a kernle + u-root built on my own, and successfully booted Ubuntu by this kernel.

    However, when I read the source code of Linuxboot in detail, I found linuxboot.ffs couldn't be built with my aarch64-linux-gnu toolchain, for it's not compatible with ARM64 toolchain.
    Therefore, I'd like to ask if you have some supports for ARM64, and could you tell me where I can get it?

    Any reply will be deeply appreciated.

Ryan O'Leary

unread,
Aug 12, 2020, 9:27:50 PM8/12/20
to relif...@gmail.com, linuxboot
Before you run "make" to build Linux, make sure you set these two environment variables:
  • export ARCH=arm64
  • export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
You can see how we build the ARM64 kernel in the test system here:

- Ryan

--
You received this message because you are subscribed to the Google Groups "linuxboot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linuxboot+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linuxboot/14171636-6adf-4f41-aadd-a0ebe0e3be25n%40googlegroups.com.

relif...@gmail.com

unread,
Aug 12, 2020, 10:25:37 PM8/12/20
to linuxboot
Hi Ryan,
     Thanks for your reply! : )

     I have built my QEMU_EFI.fd, kernel, and u-root with ARM64 arch, and all of them work well on my QEMU. BTW the u-root is very easy to use.

     But now I'm trying to replace the DXECore in my QEMU_EFI.fd with my kernel + u-root. The LinuxBoot Project supports to help achieve such replacement work, but only for x86 arch.

     In the Project, I find the point of replacement is to create a linuxboot.ffs file, which is able to make DxeCore dispatcher directly jump to my kernel instead of BDS (Boot Device Selector).

     However, in LinuxBoot Project, this linuxboot.ffs  cannot be built with ARM64 arch,  so I 'd like to ask if there is another way to build it.

Ryan O'Leary

unread,
Aug 13, 2020, 2:15:59 AM8/13/20
to relif...@gmail.com, linuxboot
I'm not very familiar with the tools in github.com/linuxboot/linuxboot

A common technique is to simply replace the shell application with Linux like so:

bunzip2 edk2-aarch64-code.fd.bz2
utk edk2-aarch64-code.fd replace_pe32 Shell kernelImage save linuxboot.fd
qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -net none -bios linuxboot.fd

Where utk comes from github.com/linuxboot/fiano

This prints `BdsDxe: loading Boot0002 "EFI Internal Shell"` right before loading Linux.

- Ryan

relif...@gmail.com

unread,
Aug 13, 2020, 10:29:01 PM8/13/20
to linuxboot
Thanks for your suggestions! 
It works when replacing Shell with kernel Image. :-)
But do you know how to replace BDSDxe with kernel, which means DXECore will directly load and then boot kernel Image as BDS at the end phase of DXE?
It will reduce one phase of UEFI boot process to make boot speed faster.
I am trying to reach this further stage, but it seems a little difficult for me. :-(

Ron Minnich

unread,
Aug 14, 2020, 1:13:20 AM8/14/20
to relif...@gmail.com, linuxboot
What you are describing is the next step, which we wish to do: replace BSDDXE.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linuxboot/bb461d75-dd5f-4e6e-94cb-b9ce8afb62a3n%40googlegroups.com.

relif...@outlook.com

unread,
Aug 24, 2020, 7:21:20 AM8/24/20
to linuxboot
Hi Mr.  Minnich,
     I'd like to share some of my experiences and suggestions about LinuxBoot implementation on QEMU-x86 and QEMU-arm64 with this community. Could you tell me where I can post my documents or web link? I hope my experiences could help others who meet problems in implementation.  :-)

Ryan O'Leary

unread,
Aug 24, 2020, 3:33:30 PM8/24/20
to relif...@outlook.com, linuxboot
I'd recommend joining the slack channel: https://slack.u-root.com/
The LinuxBoot slack channel is a lot more lively.

- Ryan

Reply all
Reply to author
Forward
0 new messages