From mboxrd@z Thu Jan 1 00:00:00 1970 From: Iain Paton Date: Sun, 14 Dec 2014 14:52:16 +0000 Subject: [U-Boot] [PATCH] allow config_distro_bootcmd to pass uuid to extlinux.conf Message-ID: <548DA420.1030306@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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