[U-Boot] [PATCH] ARM: imx6q_logic: Enable UUID support

Adam Ford aford173 at gmail.com
Sun Mar 3 22:22:45 UTC 2019


With UUID support, the root can now point to UUID.  This makes
swiching between mmc 0 and mmc 1 easier by simplying changing
mmcdev between 0 and 1.  From there, the scripts handle the rest.

Signed-off-by: Adam Ford <aford173 at gmail.com>

diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
index 5017e5831b..b3ca44eb20 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -45,6 +45,7 @@ CONFIG_CMD_USB_SDP=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_LED is not set
+CONFIG_CMD_UUID=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_MTDPARTS=y
diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h
index 70cc63fc1b..e51b6a0931 100644
--- a/include/configs/imx6_logic.h
+++ b/include/configs/imx6_logic.h
@@ -23,7 +23,7 @@
 /* MMC Configs */
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
 #define CONFIG_SYS_FSL_USDHC_NUM       2
-#define CONFIG_MMCROOT         "/dev/mmcblk1p2" /* Dev kit SD card */
+
 
 /* Ethernet Configs */
 #define CONFIG_FEC_XCV_TYPE            RMII
@@ -43,10 +43,10 @@
 	"console=" CONSOLE_DEV "\0" \
 	"mmcdev=1\0" \
 	"mmcpart=1\0" \
-	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
+	"finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
 	"nandroot=ubi0:rootfs rootfstype=ubifs\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate}" \
-	" root=${mmcroot} ${mtdparts}\0" \
+	" root=PARTUUID=${uuid} rootwait rw\0 ${mtdparts}\0" \
 	"nandargs=setenv bootargs console=${console},${baudrate}" \
 	" ubi.mtd=fs root=${nandroot} ${mtdparts}\0" \
 	"ramargs=setenv bootargs console=${console},${baudrate}" \
@@ -60,8 +60,8 @@
 	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdt_file}\0" \
 	"loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr_r}" \
 	" ${ramdisk_file}; setenv ramdisksize ${filesize}\0" \
-	"mmcboot=echo Booting from mmc...; run mmcargs; run loadimage;" \
-	" run loadfdt; bootz ${loadaddr} - ${fdt_addr_r}\0" \
+	"mmcboot=echo Booting from mmc...; run finduuid; run mmcargs;" \
+	"run loadimage; run loadfdt; bootz ${loadaddr} - ${fdt_addr_r}\0" \
 	"mmcramboot=run ramargs; run loadimage;" \
 	" run loadfdt; run loadramdisk;" \
 	" bootz ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
-- 
2.17.1



More information about the U-Boot mailing list