Skip to contentSkip to conversation

wandboard: Use PARTUUID to specify the rootfs location

PATCH New Fabio Berton 1 participant 2 messages Oct 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 wandboard: Use PARTUUID to specify the rootfs location

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

---
 include/configs/wandboard.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/configs/wandboard.h +5 -1
index 801be39..f365d4f 100644
@@ -93,6 +93,9 @@
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_CMD_PART
+
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"console=ttymxc0,115200\0" \
@@ -105,7 +108,7 @@
 	"ip_dyn=yes\0" \
 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
 	"mmcpart=1\0" \
-	"mmcroot=/dev/mmcblk2p2 rootwait rw\0" \
+	"finduuid=part uuid mmc 0:2 uuid\0" \
 	"update_sd_firmware_filename=u-boot.imx\0" \
 	"update_sd_firmware=" \
 		"if test ${ip_dyn} = yes; then " \
@@ -173,6 +176,7 @@
 
 #define CONFIG_BOOTCOMMAND \
 	   "run findfdt; " \
+	   "run finduuid; " \
 	   "run distro_bootcmd"
 
 #include <config_distro_bootcmd.h>
Signature · 1 line
2.1.4
#1 lore raw

PATCH 2/2 mx6cuboxi: Use PARTUUID to specify the rootfs location

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

---
 include/configs/mx6cuboxi.h | 5 +++++
 1 file changed, 5 insertions(+)
include/configs/mx6cuboxi.h +5 -0
index 366b5b9..cf2a504 100644
@@ -80,6 +80,9 @@
 #define CONFIG_SYS_FSL_USDHC_NUM	1
 #define CONFIG_SYS_MMC_ENV_DEV		0	/* SDHC2 */
 
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_CMD_PART
+
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
@@ -97,6 +100,7 @@
 	"console=" CONFIG_CONSOLE_DEV "\0" \
 	"bootm_size=0x10000000\0" \
 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
+	"finduuid=part uuid mmc 0:2 uuid\0" \
 	"update_sd_firmware=" \
 		"if test ${ip_dyn} = yes; then " \
 			"setenv get_cmd dhcp; " \
@@ -125,6 +129,7 @@
 
 #define CONFIG_BOOTCOMMAND \
 	"run findfdt; " \
+	"run finduuid; " \
 	"run distro_bootcmd"
 
 #define BOOT_TARGET_DEVICES(func) \
Signature · 1 line
2.1.4