Commit a0046393dae74364b7a7b7ed5e2af8431a3d680c

Authored by Fabio Estevam
Committed by Stefano Babic
1 parent b2915ba25e

mx6slevk: Use PARTUUID to specify the rootfs location

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>

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

configs/mx6slevk_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_SF=y
16 17 CONFIG_CMD_USB=y
17 18 # CONFIG_CMD_SETEXPR is not set
configs/mx6slevk_spl_defconfig
... ... @@ -20,6 +20,7 @@
20 20 CONFIG_CMD_GPIO=y
21 21 CONFIG_CMD_I2C=y
22 22 CONFIG_CMD_MMC=y
  23 +CONFIG_CMD_PART=y
23 24 CONFIG_CMD_SF=y
24 25 CONFIG_CMD_USB=y
25 26 CONFIG_CMD_DHCP=y
include/configs/mx6slevk.h
... ... @@ -53,9 +53,9 @@
53 53 "ip_dyn=yes\0" \
54 54 "mmcdev=1\0" \
55 55 "mmcpart=1\0" \
56   - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \" \
  56 + "finduuid=part uuid mmc 1:2 uuid\0" \" \
57 57 "mmcargs=setenv bootargs console=${console},${baudrate} " \
58   - "root=${mmcroot}\0" \" \
  58 + "root=PARTUUID=${uuid} rootwait rw\0" \" \
59 59 "loadbootscript=" \
60 60 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
61 61 "bootscript=echo Running bootscript from mmc ...; " \
... ... @@ -63,6 +63,7 @@
63 63 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
64 64 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
65 65 "mmcboot=echo Booting from mmc ...; " \
  66 + "run finduuid; " \
66 67 "run mmcargs; " \
67 68 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
68 69 "if run loadfdt; then " \