[U-Boot] [PATCH 1/3] arm: mxs: m28evk: Minor tweaks to the default env

Polish the environment a bit, add two new variables so that the MMC boot and root partitions are not explicitly hard-coded in the env. Use one less if condition in the try_bootscript and handle possible mmc rescan failure there.
Signed-off-by: Marek Vasut marex@denx.de Cc: Stefano Babic sbabic@denx.de --- include/configs/m28evk.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 8063a1e..7363b0c 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -165,6 +165,8 @@ "bootscript=boot.scr\0" \ "bootdev=/dev/mmcblk0p2\0" \ "rootdev=/dev/mmcblk0p3\0" \ + "bootpart=0:2\0" \ + "rootpart=0:3\0" \ "netdev=eth0\0" \ "hostname=m28evk\0" \ "rootpath=/opt/eldk-5.5/armv5te/rootfs-qte-sdk\0" \ @@ -229,7 +231,7 @@ "addargs=run addcons addmtd addmisc\0" \ "mmcload=" \ "mmc rescan ; " \ - "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \ + "load mmc ${bootpart} ${kernel_addr_r} ${bootfile}\0" \ "ubiload=" \ "ubi part UBI ; ubifsmount ubi0:rootfs ; " \ "ubifsload ${kernel_addr_r} /boot/${bootfile}\0" \ @@ -271,13 +273,12 @@ "run netload nfsargs addip addargs ; " \ "bootm ${kernel_addr_r}\0" \ "try_bootscript=" \ - "mmc rescan;" \ - "if test -e mmc 0:2 ${bootscript} ; then " \ - "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \ - "then ; " \ + "if mmc rescan && " \ + "test -e mmc ${bootpart} ${bootscript} && " \ + "load mmc ${bootpart} ${kernel_addr_r} ${bootscript} ; "\ + "then " \ "echo Running bootscript... ; " \ "source ${kernel_addr_r} ; " \ - "fi ; " \ "fi\0"
/* The rest of the configuration is shared */

Polish the environment a bit, add two new variables so that the MMC boot and root partitions are not explicitly hard-coded in the env. Use one less if condition in the try_bootscript and handle possible mmc rescan failure there.
Signed-off-by: Marek Vasut marex@denx.de Cc: Stefano Babic sbabic@denx.de --- include/configs/m53evk.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h index fbaa600..e321cca 100644 --- a/include/configs/m53evk.h +++ b/include/configs/m53evk.h @@ -283,6 +283,8 @@ "bootscript=boot.scr\0" \ "bootdev=/dev/mmcblk0p1\0" \ "rootdev=/dev/mmcblk0p2\0" \ + "bootpart=0:1\0" \ + "rootpart=0:2\0" \ "netdev=eth0\0" \ "rootpath=/opt/eldk-5.5/armv7a-hf/rootfs-qte-sdk\0" \ "kernel_addr_r=0x72000000\0" \ @@ -305,7 +307,7 @@ "addargs=run addcons addmtd addmisc\0" \ "mmcload=" \ "mmc rescan ; " \ - "load mmc 0:1 ${kernel_addr_r} ${bootfile}\0" \ + "load mmc ${bootpart} ${kernel_addr_r} ${bootfile}\0" \ "ubiload=" \ "ubi part UBI ; ubifsmount ubi0:rootfs ; " \ "ubifsload ${kernel_addr_r} /boot/${bootfile}\0" \ @@ -347,13 +349,12 @@ "run netload nfsargs addip addargs ; " \ "bootm ${kernel_addr_r}\0" \ "try_bootscript=" \ - "mmc rescan;" \ - "if test -e mmc 0:1 ${bootscript} ; then " \ - "if load mmc 0:1 ${kernel_addr_r} ${bootscript};" \ - "then ; " \ + "if mmc rescan && " \ + "test -e mmc ${bootpart} ${bootscript} && " \ + "load mmc ${bootpart} ${kernel_addr_r} ${bootscript} ; "\ + "then " \ "echo Running bootscript... ; " \ "source ${kernel_addr_r} ; " \ - "fi ; " \ "fi\0"
#endif /* __M53EVK_CONFIG_H__ */

Polish the environment a bit, add two new variables so that the MMC boot and root partitions are not explicitly hard-coded in the env. Use one less if condition in the try_bootscript and handle possible mmc rescan failure there.
Signed-off-by: Marek Vasut marex@denx.de Cc: Stefano Babic sbabic@denx.de --- include/configs/socfpga_mcvevk.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/configs/socfpga_mcvevk.h b/include/configs/socfpga_mcvevk.h index e7b5675..e23a859 100644 --- a/include/configs/socfpga_mcvevk.h +++ b/include/configs/socfpga_mcvevk.h @@ -53,6 +53,8 @@ "bootscript=boot.scr\0" \ "bootdev=/dev/mmcblk0p2\0" \ "rootdev=/dev/mmcblk0p3\0" \ + "bootpart=0:2\0" \ + "rootpart=0:3\0" \ "netdev=eth0\0" \ "hostname=mcvevk\0" \ "kernel_addr_r=0x10000000\0" \ @@ -91,7 +93,7 @@ "addargs=run addcons addmisc\0" \ "mmcload=" \ "mmc rescan ; " \ - "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \ + "load mmc ${bootpart} ${kernel_addr_r} ${bootfile}\0" \ "netload=" \ "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ "miscargs=nohlt panic=1\0" \ @@ -112,13 +114,12 @@ "run netload nfsargs addip addargs ; " \ "bootm ${kernel_addr_r}\0" \ "try_bootscript=" \ - "mmc rescan;" \ - "if test -e mmc 0:2 ${bootscript} ; then " \ - "if load mmc 0:2 ${kernel_addr_r} ${bootscript};" \ - "then ; " \ + "if mmc rescan && " \ + "test -e mmc ${bootpart} ${bootscript} && " \ + "load mmc ${bootpart} ${kernel_addr_r} ${bootscript} ; "\ + "then " \ "echo Running bootscript... ; " \ "source ${kernel_addr_r} ; " \ - "fi ; " \ "fi\0"
/* The rest of the configuration is shared */
participants (1)
-
Marek Vasut