kumquat-buildroot/board/avnet/zedboard/uboot/0001-zynq-Create-zedboard-specific-U-Boot-environment.patch
Gwenhael Goavec-Merou d761f0f408 zedboard: uboot: load env earlier
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>
2015-11-16 21:53:48 +01:00

46 lines
1.8 KiB
Diff

From a4c0058967a551385da5e16d2787d9f704cab225 Mon Sep 17 00:00:00 2001
From: Jan Viktorin <viktorin@rehivetech.com>
Date: Thu, 18 Jun 2015 16:26:02 +0200
Subject: [PATCH 2/2] zynq: Create zedboard-specific U-Boot environment
---
include/configs/zynq_zed.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
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,28 @@
#include <configs/zynq-common.h>
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "envload=mmc info && if fatload mmc 0 0x1000 uEnv.txt;"\
+ " then echo Importing uEnv.txt; env import -t 0x1000" \
+ " $filesize; fi;\0" \
+ "bootcmd=run envload; run $modeboot\0" \
+ "modeboot=sdboot\0" \
+ "baudrate=115200\0" \
+ "bootenv=uEnv.txt\0" \
+ "devicetree_image=zynq-zed.dtb\0" \
+ "kernel_image=uImage\0" \
+ "ramdisk_image=rootfs.cpio.uboot\0" \
+ "fpga_image=system.bit\0" \
+ "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}" \
+ " && bootm 0x1000000 0x2000000 0x3000000\0" \
+ "fpgaboot=if fatload mmc 0 0x1000000 ${fpga_image};" \
+ " then echo Booting FPGA from ${fpga_image};" \
+ " fpga info 0 && fpga loadb 0 0x1000000 $filesize;" \
+ " else echo FPGA image ${fpga_image} was not found," \
+ " skipping...; fi;\0"
+
#endif /* __CONFIG_ZYNQ_ZED_H */
--
2.4.3