diff options
| author | Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com> | 2021-04-06 20:32:49 +0530 |
|---|---|---|
| committer | Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | 2021-07-14 14:52:07 -0700 |
| commit | 4bacd51a73f3e66b855d94e67484ab049baeb934 (patch) | |
| tree | 2af0bc583cfaa612dc55ce08e50b8b019e309ba2 | |
| parent | ddcb03b1b2a93f4dff113912f90e0e929d1f4e65 (diff) | |
| download | meta-xilinx-4bacd51a73f3e66b855d94e67484ab049baeb934.tar.gz | |
u-boot-zynq-scr: Add uEnv.txt support in bootscript
This patch will add uEnv.txt support in bootscript.
Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
| -rw-r--r-- | meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr.bb | 10 | ||||
| -rw-r--r-- | meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic | 10 |
2 files changed, 19 insertions, 1 deletions
diff --git a/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr.bb b/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr.bb index 8afa1b5c..044ce5dc 100644 --- a/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr.bb +++ b/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr.bb | |||
| @@ -48,7 +48,13 @@ SRC_URI = " \ | |||
| 48 | " | 48 | " |
| 49 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 49 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 50 | 50 | ||
| 51 | inherit image-artifact-names | 51 | UENV_TEXTFILE ?= "uEnv.txt" |
| 52 | UENV_MMC_OFFSET_zynqmp ?= "0x200000" | ||
| 53 | UENV_MMC_OFFSET_zynq ?= "0x2080000" | ||
| 54 | UENV_MMC_OFFSET_versal ?= "0x80000" | ||
| 55 | UENV_MMC_OFFSET_microblaze ?= "0x0" | ||
| 56 | |||
| 57 | UENV_MMC_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('UENV_MMC_OFFSET'))}" | ||
| 52 | 58 | ||
| 53 | UBOOTSCR_BASE_NAME ?= "${PN}-${PKGE}-${PKGV}-${PKGR}${IMAGE_VERSION_SUFFIX}" | 59 | UBOOTSCR_BASE_NAME ?= "${PN}-${PKGE}-${PKGV}-${PKGR}${IMAGE_VERSION_SUFFIX}" |
| 54 | UBOOTPXE_CONFIG ?= "pxelinux.cfg" | 60 | UBOOTPXE_CONFIG ?= "pxelinux.cfg" |
| @@ -222,6 +228,8 @@ do_compile() { | |||
| 222 | -e 's/@@NAND_FIT_IMAGE_SIZE@@/${NAND_FIT_IMAGE_SIZE}/' \ | 228 | -e 's/@@NAND_FIT_IMAGE_SIZE@@/${NAND_FIT_IMAGE_SIZE}/' \ |
| 223 | -e 's/@@FIT_IMAGE@@/${FIT_IMAGE}/' \ | 229 | -e 's/@@FIT_IMAGE@@/${FIT_IMAGE}/' \ |
| 224 | -e 's/@@PRE_BOOTENV@@/${PRE_BOOTENV}/' \ | 230 | -e 's/@@PRE_BOOTENV@@/${PRE_BOOTENV}/' \ |
| 231 | -e 's/@@UENV_MMC_LOAD_ADDRESS@@/${UENV_MMC_LOAD_ADDRESS}/' \ | ||
| 232 | -e 's/@@UENV_TEXTFILE@@/${UENV_TEXTFILE}/' \ | ||
| 225 | -e 's/@@RAMDISK_IMAGE1@@/${RAMDISK_IMAGE1}/' \ | 233 | -e 's/@@RAMDISK_IMAGE1@@/${RAMDISK_IMAGE1}/' \ |
| 226 | "${WORKDIR}/boot.cmd.${BOOTMODE}${BOOTFILE_EXT}" > "${WORKDIR}/boot.cmd" | 234 | "${WORKDIR}/boot.cmd.${BOOTMODE}${BOOTFILE_EXT}" > "${WORKDIR}/boot.cmd" |
| 227 | mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr | 235 | mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr |
diff --git a/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic b/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic index b8ebf645..a40509f9 100644 --- a/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic +++ b/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic | |||
| @@ -7,11 +7,21 @@ | |||
| 7 | 7 | ||
| 8 | for boot_target in ${boot_targets}; | 8 | for boot_target in ${boot_targets}; |
| 9 | do | 9 | do |
| 10 | echo "Trying to load boot images from ${boot_target}" | ||
| 10 | if test "${boot_target}" = "jtag" ; then | 11 | if test "${boot_target}" = "jtag" ; then |
| 11 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 12 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ |
| 12 | exit; | 13 | exit; |
| 13 | fi | 14 | fi |
| 14 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then | 15 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then |
| 16 | if test -e ${devtype} ${devnum}:${distro_bootpart} /@@UENV_TEXTFILE@@; then | ||
| 17 | fatload ${devtype} ${devnum}:${distro_bootpart} @@UENV_MMC_LOAD_ADDRESS@@ @@UENV_TEXTFILE@@; | ||
| 18 | echo "Importing environment(@@UENV_TEXTFILE@@) from ${boot_target}..." | ||
| 19 | env import -t @@UENV_MMC_LOAD_ADDRESS@@ $filesize | ||
| 20 | if test -n $uenvcmd; then | ||
| 21 | echo Running uenvcmd ...; | ||
| 22 | run uenvcmd; | ||
| 23 | fi | ||
| 24 | fi | ||
| 15 | if test -e ${devtype} ${devnum}:${distro_bootpart} /@@FIT_IMAGE@@; then | 25 | if test -e ${devtype} ${devnum}:${distro_bootpart} /@@FIT_IMAGE@@; then |
| 16 | fatload ${devtype} ${devnum}:${distro_bootpart} @@FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; | 26 | fatload ${devtype} ${devnum}:${distro_bootpart} @@FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; |
| 17 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | 27 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; |
