All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Question about booting Linux from efi_loader
Date: Wed, 31 Oct 2018 11:52:06 +0900	[thread overview]
Message-ID: <CAK7LNAQSfsMftMx8WDWNg59ssaVsXOs69svtgzUTwNLM7xmwEg@mail.gmail.com> (raw)
In-Reply-To: <623461cf-7542-2d0e-dfc1-1790f01075dc@suse.de>

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

  reply	other threads:[~2018-10-31  2:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2018-10-31  9:27     ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNAQSfsMftMx8WDWNg59ssaVsXOs69svtgzUTwNLM7xmwEg@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.