Commit f086812acd3f8dad365ab328e426178ca36a8408

Authored by Fabio Estevam
Committed by Stefano Babic
1 parent e2162d709f

mx6sxsabresd: Use PARTUUID to specify the rootfs location

mx6sxsabresd 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>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Lukasz Majewski <lukma@denx.de>

Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff

configs/mx6sxsabresd_defconfig
... ... @@ -12,6 +12,7 @@
12 12 CONFIG_CMD_GPIO=y
13 13 CONFIG_CMD_I2C=y
14 14 CONFIG_CMD_MMC=y
  15 +CONFIG_CMD_PART=y
15 16 CONFIG_CMD_PCI=y
16 17 CONFIG_CMD_USB=y
17 18 # CONFIG_CMD_SETEXPR is not set
include/configs/mx6sxsabresd.h
... ... @@ -57,9 +57,9 @@
57 57 "videomode=video=ctfb:x:800,y:480,depth:24,pclk:29850,le:89,ri:164,up:23,lo:10,hs:10,vs:10,sync:0,vmode:0\0" \
58 58 "mmcdev=2\0" \
59 59 "mmcpart=1\0" \
60   - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \" \
  60 + "finduuid=part uuid mmc 2:2 uuid\0" \" \
61 61 "mmcargs=setenv bootargs console=${console},${baudrate} " \
62   - "root=${mmcroot}\0" \" \
  62 + "root=PARTUUID=${uuid} rootwait rw\0" \" \
63 63 "loadbootscript=" \
64 64 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
65 65 "bootscript=echo Running bootscript from mmc ...; " \
... ... @@ -67,6 +67,7 @@
67 67 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
68 68 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
69 69 "mmcboot=echo Booting from mmc ...; " \
  70 + "run finduuid; " \
70 71 "run mmcargs; " \
71 72 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
72 73 "if run loadfdt; then " \