zedboard: uboot: load env earlier
authorGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Fri, 13 Nov 2015 12:49:14 +0000 (13:49 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 16 Nov 2015 20:53:48 +0000 (21:53 +0100)
By default, with the original patch bootcmd runs sdboot before loading uEnv.txt.
Consequently, if the user change modeboot, the user's defined content is updated
too late.
By loading uEnv.txt before 'run $modeboot' the correct boot mode is used instead
of default mode.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Acked-By: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
board/avnet/zedboard/uboot/0001-zynq-Create-zedboard-specific-U-Boot-environment.patch

index 1971503d4717bf32842cb5b94290374be4773d8c..6dae31ea8959e12625a65200ca527b7a1b6367ba 100644 (file)
@@ -11,7 +11,7 @@ diff --git a/include/configs/zynq_zed.h b/include/configs/zynq_zed.h
 index 946de95..2400a88 100644
 --- a/include/configs/zynq_zed.h
 +++ b/include/configs/zynq_zed.h
-@@ -24,4 +24,29 @@
+@@ -24,4 +24,28 @@
 
  #include <configs/zynq-common.h>
 
@@ -20,7 +20,7 @@ index 946de95..2400a88 100644
 +      "envload=mmc info && if fatload mmc 0 0x1000 uEnv.txt;"\
 +      " then echo Importing uEnv.txt; env import -t 0x1000"  \
 +      " $filesize; fi;\0"                                    \
-+      "bootcmd=run $modeboot\0"                              \
++      "bootcmd=run envload; run $modeboot\0"                 \
 +      "modeboot=sdboot\0"                                    \
 +      "baudrate=115200\0"                                    \
 +      "bootenv=uEnv.txt\0"                                   \
@@ -28,8 +28,7 @@ index 946de95..2400a88 100644
 +      "kernel_image=uImage\0"                                \
 +      "ramdisk_image=rootfs.cpio.uboot\0"                    \
 +      "fpga_image=system.bit\0"                              \
-+      "sdboot=echo Booting from SD...;"                      \
-+      " run envload; run fpgaboot;"                          \
++      "sdboot=echo Booting from SD...; run fpgaboot;"        \
 +      " fatload mmc 0 0x1000000 ${kernel_image}"             \
 +      " && fatload mmc 0 0x2000000 ${ramdisk_image}"         \
 +      " && fatload mmc 0 0x3000000 ${devicetree_image}"      \