[U-Boot] Question about booting Linux from efi_loader
Alexander Graf
agraf at suse.de
Tue Oct 30 13:31:41 UTC 2018
Hi Masahiro,
On 30.10.18 14:20, Masahiro Yamada wrote:
> Hi Alex,
>
>
> Could you teach me a little bit
> about efi_loader?
>
> I guess I am seriously missing something,
> but how to pass initramdisk address when you use
> bootefi (like when you use 'booti') ?
>
>
> What I did:
>
>> tftpboot 90000000 Image
>> tftpboot 98000000 uniphier-ld11-global.dtb
>> bootefi 90000000 98000000
>
> The kernel will start booting,
> but fail to mount initramdisk,
> obviously because I am not passing initramdisk.
This is great news!
The way loading an initrd works in UEFI land is that there is either
a) A boot loader that loads the initrd on behalf of Linux (like grub)
or
b) Linux loads the initrd from within its efi stub.
For a) you would need to set up a working grub.efi binary and a config.
I guess that's a bit much to ask right now? The easiest way to test this
path is to use an existing setup, such as a distro image:
http://download.opensuse.org/ports/aarch64/tumbleweed/iso/openSUSE-Tumbleweed-NET-aarch64-Current.iso
You should be able to dd that onto an SD card / USB stick / anything and
it should automatically boot into grub and with a bit of luck also into
the kernel.
For b) theoretically you should be able to use the "initrd=" kernel
command line parameter. I haven't used it myself yet, but I guess it
might work? Give it a try :).
U-BOOT# setenv bootargs initrd=initrd.gz
U-BOOT# bootefi 90000000 98000000
That should tell the Linux efi stub to load a file called "initrd.gz"
from the same location the Image was loaded from (tftp in your case).
Alex
More information about the U-Boot
mailing list