public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf
@ 2014-12-14 14:52 Iain Paton
  2014-12-14 17:22 ` Stephen Warren
  0 siblings, 1 reply; 5+ messages in thread
From: Iain Paton @ 2014-12-14 14:52 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-15 11:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox