]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
warp7: Use PARTUUID to specify the rootfs location
authorFabio Estevam <fabio.estevam@nxp.com>
Fri, 26 Aug 2016 00:07:19 +0000 (21:07 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 6 Sep 2016 16:22:48 +0000 (18:22 +0200)
warp7 can run different kernel versions, such as NXP 4.1 or mainline.

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.

Succesfully tested booting a NXP 4.1 and also a mainline kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
include/configs/warp7.h

index 12f49fdabf1a78e85b5e21985011f35bdc14f1a3..5cbc2c4d37bec3b9767b7373ea18a719f52ad3c6 100644 (file)
@@ -29,6 +29,9 @@
 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 #define CONFIG_SYS_MMC_IMG_LOAD_PART   1
 
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_CMD_PART
+
 #define CONFIG_DFU_ENV_SETTINGS \
        "dfu_alt_info=boot raw 0x2 0x400 mmcpart 1\0" \
 
@@ -45,9 +48,9 @@
        "ip_dyn=yes\0" \
        "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
        "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
-       "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
+       "finduuid=part uuid mmc 0:2 uuid\0" \
        "mmcargs=setenv bootargs console=${console},${baudrate} " \
-               "root=${mmcroot}\0" \
+               "root=PARTUUID=${uuid} rootwait rw\0" \
        "loadbootscript=" \
                "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
        "bootscript=echo Running bootscript from mmc ...; " \
@@ -55,6 +58,7 @@
        "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
        "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
        "mmcboot=echo Booting from mmc ...; " \
+               "run finduuid; " \
                "run mmcargs; " \
                "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
                        "if run loadfdt; then " \
 
 #define CONFIG_SYS_MMC_ENV_DEV         0
 #define CONFIG_SYS_MMC_ENV_PART                0
-#define CONFIG_MMCROOT                 "/dev/mmcblk2p2"
 
 /* USB Configs */
 #define CONFIG_USB_STORAGE