diff options
| author | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-09-05 16:40:41 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-09-05 16:40:41 +1000 |
| commit | 9de803be49cd866de93ac9cdc0f0539f52d71d8b (patch) | |
| tree | 2295ecadf8b8ea3e61f2e8446168ebea5fc27f48 | |
| parent | ed5bdd5c1baeff019d399c4f1e61e69907c152dd (diff) | |
| download | meta-xilinx-9de803be49cd866de93ac9cdc0f0539f52d71d8b.tar.gz | |
u-boot-xlnx: Add uEnv.txt support
* Backport uEnv.txt support from upstream master-next
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
4 files changed, 113 insertions, 6 deletions
diff --git a/recipes-bsp/u-boot/u-boot-xlnx/zynq-Increase-number-of-arguments.patch b/recipes-bsp/u-boot/u-boot-xlnx/zynq-Increase-number-of-arguments.patch new file mode 100644 index 00000000..22c9fb67 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-xlnx/zynq-Increase-number-of-arguments.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From: Michal Simek <michal.simek@xilinx.com> | ||
| 2 | Date: Wed, 4 Sep 2013 08:59:37 +0200 | ||
| 3 | Subject: [PATCH] zynq: Increase number of arguments | ||
| 4 | |||
| 5 | The main reason is that with adding option to load | ||
| 6 | variables from SD user can create longer user commands. | ||
| 7 | |||
| 8 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | ||
| 9 | Upstream-Status: Backport | ||
| 10 | --- | ||
| 11 | include/configs/zynq_common.h | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/include/configs/zynq_common.h b/include/configs/zynq_common.h | ||
| 15 | index a7cadc4..e83c6de 100644 | ||
| 16 | --- a/include/configs/zynq_common.h | ||
| 17 | +++ b/include/configs/zynq_common.h | ||
| 18 | @@ -105,7 +105,7 @@ | ||
| 19 | #define CONFIG_AUTO_COMPLETE | ||
| 20 | #define CONFIG_SYS_LONGHELP | ||
| 21 | #define CONFIG_BOARD_LATE_INIT | ||
| 22 | -#define CONFIG_SYS_MAXARGS 16 | ||
| 23 | +#define CONFIG_SYS_MAXARGS 32 | ||
| 24 | #define CONFIG_SYS_CBSIZE 2048 | ||
| 25 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ | ||
| 26 | sizeof(CONFIG_SYS_PROMPT) + 16) | ||
| 27 | -- | ||
| 28 | 1.7.9.5 | ||
| 29 | |||
diff --git a/recipes-bsp/u-boot/u-boot-xlnx/zynq_common-Add-uEnv.txt-boot-environment-load-suppo.patch b/recipes-bsp/u-boot/u-boot-xlnx/zynq_common-Add-uEnv.txt-boot-environment-load-suppo.patch new file mode 100644 index 00000000..d0c3d3e6 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-xlnx/zynq_common-Add-uEnv.txt-boot-environment-load-suppo.patch | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | From: Nathan Rossi <nathan.rossi@xilinx.com> | ||
| 2 | Date: Fri, 30 Aug 2013 16:13:15 +1000 | ||
| 3 | Subject: [PATCH] zynq_common: Add uEnv.txt boot environment load support | ||
| 4 | |||
| 5 | Add support for using a uEnv.txt file for loading and or modifying the | ||
| 6 | existing boot environment during a Zynq "sdboot". If the environment | ||
| 7 | fails to load during the "sdboot" continue booting from SD normally. | ||
| 8 | |||
| 9 | This uEnv.txt and bootenv/uenv default environment variables are based | ||
| 10 | on the implementation used in omap3_beagle.h. | ||
| 11 | |||
| 12 | Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> | ||
| 13 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | ||
| 14 | Upstream-Status: Backport | ||
| 15 | --- | ||
| 16 | include/configs/zynq_common.h | 28 ++++++++++++++++++++++------ | ||
| 17 | 1 file changed, 22 insertions(+), 6 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/include/configs/zynq_common.h b/include/configs/zynq_common.h | ||
| 20 | index 762aaca..a7cadc4 100644 | ||
| 21 | --- a/include/configs/zynq_common.h | ||
| 22 | +++ b/include/configs/zynq_common.h | ||
| 23 | @@ -237,11 +237,16 @@ | ||
| 24 | "devicetree_image=devicetree.dtb\0" \ | ||
| 25 | "bitstream_image=system.bit.bin\0" \ | ||
| 26 | "loadbit_addr=0x100000\0" \ | ||
| 27 | + "loadbootenv_addr=0x2000000\0" \ | ||
| 28 | "kernel_size=0x500000\0" \ | ||
| 29 | "devicetree_size=0x20000\0" \ | ||
| 30 | "ramdisk_size=0x5E0000\0" \ | ||
| 31 | "fdt_high=0x20000000\0" \ | ||
| 32 | "initrd_high=0x20000000\0" \ | ||
| 33 | + "bootenv=uEnv.txt\0" \ | ||
| 34 | + "loadbootenv=fatload mmc 0 ${loadbootenv_addr} ${bootenv}\0" \ | ||
| 35 | + "importbootenv=echo Importing environment from SD ...; " \ | ||
| 36 | + "env import -t ${loadbootenv_addr} $filesize\0" \ | ||
| 37 | "mmc_loadbit_fat=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \ | ||
| 38 | "mmcinfo && " \ | ||
| 39 | "fatload mmc 0 ${loadbit_addr} ${bitstream_image} && " \ | ||
| 40 | @@ -259,12 +264,23 @@ | ||
| 41 | "echo Copying ramdisk... && " \ | ||
| 42 | "sf read 0x2000000 0x620000 ${ramdisk_size} && " \ | ||
| 43 | "bootm 0x3000000 0x2000000 0x2A00000\0" \ | ||
| 44 | - "sdboot=echo Copying Linux from SD to RAM... && " \ | ||
| 45 | - "mmcinfo && " \ | ||
| 46 | - "fatload mmc 0 0x3000000 ${kernel_image} && " \ | ||
| 47 | - "fatload mmc 0 0x2A00000 ${devicetree_image} && " \ | ||
| 48 | - "fatload mmc 0 0x2000000 ${ramdisk_image} && " \ | ||
| 49 | - "bootm 0x3000000 0x2000000 0x2A00000\0" \ | ||
| 50 | + "uenvboot=" \ | ||
| 51 | + "if run loadbootenv; then " \ | ||
| 52 | + "echo Loaded environment from ${bootenv}; " \ | ||
| 53 | + "run importbootenv; " \ | ||
| 54 | + "fi; " \ | ||
| 55 | + "if test -n $uenvcmd; then " \ | ||
| 56 | + "echo Running uenvcmd ...; " \ | ||
| 57 | + "run uenvcmd; " \ | ||
| 58 | + "fi\0" \ | ||
| 59 | + "sdboot=if mmcinfo; then " \ | ||
| 60 | + "run uenvboot; " \ | ||
| 61 | + "echo Copying Linux from SD to RAM... && " \ | ||
| 62 | + "fatload mmc 0 0x3000000 ${kernel_image} && " \ | ||
| 63 | + "fatload mmc 0 0x2A00000 ${devicetree_image} && " \ | ||
| 64 | + "fatload mmc 0 0x2000000 ${ramdisk_image} && " \ | ||
| 65 | + "bootm 0x3000000 0x2000000 0x2A00000; " \ | ||
| 66 | + "fi\0" \ | ||
| 67 | "nandboot=echo Copying Linux from NAND flash to RAM... && " \ | ||
| 68 | "nand read 0x3000000 0x100000 ${kernel_size} && " \ | ||
| 69 | "nand read 0x2A00000 0x600000 ${devicetree_size} && " \ | ||
| 70 | -- | ||
| 71 | 1.7.9.5 | ||
| 72 | |||
diff --git a/recipes-bsp/u-boot/u-boot-xlnx_2013.01.bb b/recipes-bsp/u-boot/u-boot-xlnx_2013.01.bb index 9e4036cc..8239c46e 100644 --- a/recipes-bsp/u-boot/u-boot-xlnx_2013.01.bb +++ b/recipes-bsp/u-boot/u-boot-xlnx_2013.01.bb | |||
| @@ -8,9 +8,10 @@ PR = "r1" | |||
| 8 | 8 | ||
| 9 | include u-boot-xlnx.inc | 9 | include u-boot-xlnx.inc |
| 10 | 10 | ||
| 11 | SRC_URI += " \ | 11 | SRC_URI_append += " \ |
| 12 | file://microblaze_bootm_Add_support_for_loading_initrd.patch \ | 12 | file://microblaze_bootm_Add_support_for_loading_initrd.patch \ |
| 13 | file://microblaze_bootm_Fix_coding_style_issues.patch \ | 13 | file://microblaze_bootm_Fix_coding_style_issues.patch \ |
| 14 | file://microblaze_Fix_coding_style_for_bootb.patch \ | 14 | file://microblaze_Fix_coding_style_for_bootb.patch \ |
| 15 | " | 15 | file://zynq_common-Add-uEnv.txt-boot-environment-load-suppo.patch \ |
| 16 | 16 | file://zynq-Increase-number-of-arguments.patch \ | |
| 17 | " | ||
diff --git a/recipes-bsp/u-boot/u-boot-xlnx_2013.07.bb b/recipes-bsp/u-boot/u-boot-xlnx_2013.07.bb index af0b459e..8ec99eb0 100644 --- a/recipes-bsp/u-boot/u-boot-xlnx_2013.07.bb +++ b/recipes-bsp/u-boot/u-boot-xlnx_2013.07.bb | |||
| @@ -5,3 +5,8 @@ PV = "v2013.07${XILINX_EXTENSION}+git${SRCPV}" | |||
| 5 | PR = "r1" | 5 | PR = "r1" |
| 6 | 6 | ||
| 7 | include u-boot-xlnx.inc | 7 | include u-boot-xlnx.inc |
| 8 | |||
| 9 | SRC_URI_append += " \ | ||
| 10 | file://zynq_common-Add-uEnv.txt-boot-environment-load-suppo.patch \ | ||
| 11 | file://zynq-Increase-number-of-arguments.patch \ | ||
| 12 | " | ||
