* [U-Boot] Question about booting Linux from efi_loader
@ 2018-10-30 13:20 Masahiro Yamada
2018-10-30 13:31 ` Alexander Graf
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2018-10-30 13:20 UTC (permalink / raw)
To: u-boot
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.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Question about booting Linux from efi_loader
2018-10-30 13:20 [U-Boot] Question about booting Linux from efi_loader Masahiro Yamada
@ 2018-10-30 13:31 ` Alexander Graf
2018-10-31 2:52 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Graf @ 2018-10-30 13:31 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Question about booting Linux from efi_loader
2018-10-30 13:31 ` Alexander Graf
@ 2018-10-31 2:52 ` Masahiro Yamada
2018-10-31 9:27 ` Alexander Graf
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2018-10-31 2:52 UTC (permalink / raw)
To: u-boot
Hi Alex,
Thank you for your help.
On Tue, Oct 30, 2018 at 10:32 PM Alexander Graf <agraf@suse.de> wrote:
>
> 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.
OK, I tried.
I copied the openSUSE-Tumbleweed-NET-aarch64-Current.iso
into my USB drive by using 'dd' command.
U-BOOT> tftpboot 98000000 uniphier-ld11-global.dtb
U-BOOT> usb start
U-BOOT> load usb 0:1 90000000 /EFI/BOOT/bootaa64.efi
U-BOOT> bootefi 90000000 98000000
Then, I can see GRUB menu like follows on my serial console. Yay!
openSUSE Tumbleweed
Boot from Hard Disk
�
*Installation
�│
Upgrade
�│
More ...
�│
"Boot from Hard Disk" did not work for my board as is, though.
Maybe I will need to customize grub.efi
>
> 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).
This did not work for me,
but it would be worth digging into.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Question about booting Linux from efi_loader
2018-10-31 2:52 ` Masahiro Yamada
@ 2018-10-31 9:27 ` Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2018-10-31 9:27 UTC (permalink / raw)
To: u-boot
On 10/31/2018 03:52 AM, Masahiro Yamada wrote:
> Hi Alex,
>
> Thank you for your help.
>
>
>
> On Tue, Oct 30, 2018 at 10:32 PM Alexander Graf <agraf@suse.de> wrote:
>> 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.
>
> OK, I tried.
>
> I copied the openSUSE-Tumbleweed-NET-aarch64-Current.iso
> into my USB drive by using 'dd' command.
>
>
>
>
> U-BOOT> tftpboot 98000000 uniphier-ld11-global.dtb
> U-BOOT> usb start
> U-BOOT> load usb 0:1 90000000 /EFI/BOOT/bootaa64.efi
> U-BOOT> bootefi 90000000 98000000
>
>
> Then, I can see GRUB menu like follows on my serial console. Yay!
Awesome :)
>
>
> openSUSE Tumbleweed
>
>
> Boot from Hard Disk
> �
> *Installation
> �│
> Upgrade
> �│
> More ...
> �│
>
>
>
> "Boot from Hard Disk" did not work for my board as is, though.
> Maybe I will need to customize grub.efi
Oh, "Boot from Hard Disk" is really only "exit" - so it should just
return you back to the U-Boot shell. The idea is that distro boot has a
boot order and will try to boot the next medium if grub exits ;). The
interesting entry is "Installation", as that should boot our distro
kernel which might work to some extent ;)
>
>
>> 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).
>
> This did not work for me,
> but it would be worth digging into.
Hm :/. I can put it on the list of things to look at :). It really
should work, but I remember that Ard was trying to remove the dtb= and
initrd= options from Linux because people really should load things
using a boot loader ;).
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-31 9:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-30 13:20 [U-Boot] Question about booting Linux from efi_loader Masahiro Yamada
2018-10-30 13:31 ` Alexander Graf
2018-10-31 2:52 ` Masahiro Yamada
2018-10-31 9:27 ` Alexander Graf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.