From: Leif Lindholm <leif.lindholm@linaro.org>
To: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Fathi Boudra <fathi.boudra@linaro.org>
Subject: Re: GRUB issue on device priority
Date: Thu, 16 Nov 2017 16:08:51 +0000 [thread overview]
Message-ID: <20171116160851.5eha5aahdk4mosxx@bivouac.eciton.net> (raw)
In-Reply-To: <b703ff43-d57f-433d-fbfc-f3504b3a118b@linaro.org>
Apologies for delay in responding.
On Thu, Nov 09, 2017 at 04:41:55PM +0800, Haojian Zhuang wrote:
> > > In the HiKey platform, I prepared the same driver for both eMMC and
> > > SD. So the device paths are in below.
> > > SD: /HardwareVendor(0d51905b-b77e-452a-a2c0-eca0cc8d514a)[9: 00 e0 23 f7 00 00 00 00 00 ]/UnknownMessaging(1a)/EndEntire
> > > eMMC: /HardwareVendor(0d51905b-b77e-452a-a2c0-eca0cc8d514a)[9: 00 d0 23 f7 00 00 00 00 00]/UnknownMessaging(1d)/Ctrl(0)/EndEntire
> > >
> > > #define MSG_SD_DP 0x1A
> > > #define MSG_EMMC_DP 0x1D
> > >
> > > In the second level, the device paths are different.
> > >
> > > And GRUB resort the sequence by ascending order (with above
> > > code). So SD device always gets higher priority than eMMC device.
> > >
> > > If we always use installer to install OS, it may not an issue. Since
> > > installer could create grub.cfg by itself. But it imports another
> > > issue on lacking of persistent variable storage. And we need to
> > > deploy system without installer on embedded device.
> >
> > Yes, this is the bit which is interesting, and why I requested you
> > post this problem to edk2-devel.
> >
> > I believe that we need to have a sensible way to deal with embedded
> > platforms that do not have operating systems "installed" to them, but
> > rather written as images to flash devices.
> >
> > So, can you clarify a few things for me?:
> > - Where is GRUB located in your (pre-SD) system?
>
> In eMMC.
>
> > - Where is GRUB located in your SD system?
>
> In SD.
>
> > - Are you looking for a way to support GRUB being located on either
> > eMMC or SD? Or are you looking to always have GRUB loaded from eMMC?
>
> GRUB could be located in either in eMMC or SD.
OK, so which one should be loaded in preference if both exist?
I.e., what if you write a GRUB to eMMC via USB uplink, and at some
later point you insert an uSD card?
One (hackish, but at least predictable) way of resolving this would be
to implement a PlatformBootManagerLib that never connects more than
one of those devices. Alternatively one that always disconnects the
one not used for booting.
(Yes, I always argue that we should try to use a single library across
most/all ARM platforms, but in order to figure out the useful
abstractions that would make this possible, it would be worth to have
some different versions implementing different features.)
/
Leif
prev parent reply other threads:[~2017-11-16 16:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 14:02 GRUB issue on device priority Haojian Zhuang
[not found] ` <CAEaD8JPD1qPot_GMzJ02-=8WyTiwfnEmhmHmEq+Y=wKDB95DDQ@mail.gmail.com>
2017-11-08 5:46 ` Haojian Zhuang
2017-11-08 13:44 ` Leif Lindholm
2017-11-08 13:53 ` Leif Lindholm
2017-11-09 8:41 ` Haojian Zhuang
2017-11-16 16:08 ` Leif Lindholm [this message]
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-list 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=20171116160851.5eha5aahdk4mosxx@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox