From: Iain Paton <ipaton0@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf
Date: Sun, 14 Dec 2014 14:52:16 +0000 [thread overview]
Message-ID: <548DA420.1030306@gmail.com> (raw)
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.
Signed-off-by: Iain Paton <ipaton0@gmail.com>
---
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.
include/config_distro_bootcmd.h | 2 ++
include/config_distro_defaults.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index be616e8..dd4ab09 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -166,6 +166,8 @@
"bootpart=1\0" \
\
"boot_extlinux=" \
+ "part uuid ${devtype} ${devnum}:${bootpart} ptuuid; " \
+ "fsuuid ${devtype} ${devnum}:${bootpart} fsuuid; " \
"sysboot ${devtype} ${devnum}:${bootpart} any " \
"${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \
\
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
index 1ecc0bb..03e1efb 100644
--- a/include/config_distro_defaults.h
+++ b/include/config_distro_defaults.h
@@ -38,8 +38,10 @@
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
+#define CONFIG_CMD_FS_UUID
#define CONFIG_CMD_MII
#define CONFIG_CMD_NET
+#define CONFIG_CMD_PART
#define CONFIG_CMD_PING
#define CONFIG_CMD_PXE
@@ -53,4 +55,6 @@
#define CONFIG_SUPPORT_RAW_INITRD
#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_PARTITION_UUIDS
+
#endif /* _CONFIG_CMD_DISTRO_DEFAULTS_H */
--
2.1.3
next reply other threads:[~2014-12-14 14:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-14 14:52 Iain Paton [this message]
2014-12-14 17:22 ` [U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf Stephen Warren
2014-12-14 21:35 ` Iain Paton
2014-12-15 2:09 ` Stephen Warren
2014-12-15 11:53 ` Hans de Goede
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=548DA420.1030306@gmail.com \
--to=ipaton0@gmail.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.