From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf
Date: Mon, 15 Dec 2014 12:53:35 +0100 [thread overview]
Message-ID: <548ECBBF.8050707@redhat.com> (raw)
In-Reply-To: <548E42DF.9070706@nvidia.com>
Hi,
On 15-12-14 03:09, Stephen Warren wrote:
> On 12/14/2014 02:35 PM, Iain Paton wrote:
>> On 14/12/14 17:22, Stephen Warren wrote:
>>> On 12/14/2014 07:52 AM, Iain Paton wrote:
>>>> Set ptuuid and fsuuid variables to the partition / filesystem
>>>> where we found extlinux.conf which allows us to use a replaceable
>>>> parameter in the append line in extlinux.conf like this
>>>>
>>>> append root=PARTUUID=${ptuuid}
>>>>
>>>> this means we never have to hardcode a root=/dev/mmcblk0p1 type path
>>>> anywhere.
>>>
>>> Wouldn't the distro/... that creates extlinux.conf simply put the UUID
>>> into the file when it's generated? That's how things normally work in
>>> similar setups such as grub.conf...
>>
>> Perhaps, but that's just another assumption. No less valid than mine, just
>> different.
>
> It's also consistent with all the other (generic distro) boot methods
> that already exist e.g. for x86.
I've to agree with Stephen here, both Debian and Fedora are already using the
extlinux.conf support as it, it is not perfect, but the UUID stuff is not a
problem.
>>>> Since the uuids are only looked for after we've already found extlinux.conf
>>>> there's little cost/risk to making them available.
>>>> I realise that assuming extlinux.conf is on the root partition isn't perfect
>>>> but for the common case where it will be, there are many advantages to
>>>> this.
>>>
>>> ... and completely avoids the issue of U-Boot making assumptions about
>>> the partition layout that the distro installer used.
>>
>> Well making some information available hardly forces anyone to use it.
>>
>> I'd like to be able to make use of some of the commands and information that
>> are available and to do it in a way that's compatible with config_distro_bootcmd.
>> Perhaps by expanding it's capabilities along the way, if that's acceptable.
>
> However, it affects the definition of extlinux.conf, since it means that
> variable references are expanded in the command-line parameter, which
> changes the definition/syntax of extlinux.conf. This isn't something
> that should happen via a patch to one bootloader, but by general
> agreement to change the specification of extlinux.conf's format.
Erm we (u-boot) already have support for using u-boot env variables in
the "append" extlinux.conf statement.
I added this a while back to allow having:
append console=${console}
As different boards have different serial console names... (/dev/ttyS,
/dev/ttyAMBA, etc.).
>> Part of my motivation is to decouple the assumption that the user writable
>> UUID will never change on disk and make the system unbootable and difficult
>> to recover,
>
> If the user changes the UUID, it seems perfectly reasonable to require
> them to update any config files that mention this UUID, or rebuild their
> extlinux.conf from scratch using whatever mechanism is normally used to
> build it.
>
> Again, this is entirely consistent with boot config files in grub, LILO, ...
>
> Recovery from such a change seems very simple; just edit extlinux.conf
> so it's correct.
Ack.
Regards,
Hans
prev parent reply other threads:[~2014-12-15 11:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-14 14:52 [U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf Iain Paton
2014-12-14 17:22 ` Stephen Warren
2014-12-14 21:35 ` Iain Paton
2014-12-15 2:09 ` Stephen Warren
2014-12-15 11:53 ` Hans de Goede [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-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=548ECBBF.8050707@redhat.com \
--to=hdegoede@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox