]> git.sur5r.net Git - u-boot/commitdiff
mx6slevk: Use PARTUUID to specify the rootfs location
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 2 Oct 2017 13:11:37 +0000 (10:11 -0300)
committerStefano Babic <sbabic@denx.de>
Thu, 12 Oct 2017 15:58:15 +0000 (17:58 +0200)
mx6slevk 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 SD
card changes depending on the kernel version.

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

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

index 082f3170f834f06d8da5c6da6f579a8f699223c2..16e2ccafde9a253f4148f15396efc635492f6f46 100644 (file)
@@ -12,6 +12,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 32f93df9704d3ae47a6d64e0fe8425c737e95b7c..689fe794ede4a4902c0de681713788be7e2b5cea 100644 (file)
@@ -20,6 +20,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
index 25c83e81c5f3f9fd5f93123ba634475975fb07d5..9ddb1433ac2ccc0a51f192777fe206f28e06af09 100644 (file)
@@ -53,9 +53,9 @@
        "ip_dyn=yes\0" \
        "mmcdev=1\0" \
        "mmcpart=1\0" \
-       "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
+       "finduuid=part uuid mmc 1: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 ...; " \
@@ -63,6 +63,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 " \