colibri-imx6ull: use UUID for rootfs
authorIgor Opaniuk <igor.opaniuk@toradex.com>
Wed, 29 May 2019 10:00:40 +0000 (13:00 +0300)
committerStefano Babic <sbabic@denx.de>
Tue, 11 Jun 2019 08:42:48 +0000 (10:42 +0200)
Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
include/configs/colibri-imx6ull.h

index fc39e807b6ad62994b6cd935cabc785c18080447..b221e118fa419ae2b9c7f15d5251facf18976a3f 100644 (file)
                "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
 
 #define SD_BOOTCMD \
-       "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \
-       "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \
+       "set_sdargs=setenv sdargs root=PARTUUID=${uuid} ro rootwait\0" \
+       "sdboot=run setup; run sdfinduuid; run set_sdargs; " \
+       "setenv bootargs ${defargs} ${sdargs} " \
        "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
-       "load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \
-       "load mmc 0:1 ${fdt_addr_r} " FDT_FILE " && " \
+       "load mmc ${sddev}:${sdbootpart} ${kernel_addr_r} ${kernel_file} && " \
+       "load mmc ${sddev}:${sdbootpart} ${fdt_addr_r} " FDT_FILE " && " \
        "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
+       "sdbootpart=1\0" \
+       "sddev=0\0" \
+       "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
+       "sdrootpart=2\0"
 
 #define UBI_BOOTCMD \
        "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs " \