From e95274e56ff441c1f4cf45ba791ab16166f05bf8 Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Thu, 26 Nov 2015 20:03:39 +1000 Subject: Fix up UBOOT_BINARY for Zynq and setup SPL to load correctly u-boot-xlnx 'xilinx-v2015.2' (fixed in newer versions) incorrectly sets the SPL image to load as 'u-boot-dtb.img' despite the images being built having embedded device trees (OF_EMBED=y). This change fixes this up so that there are no hacks to the u-boot recipes and no overrides to use the incorrectly named U-Boot image file. Signed-off-by: Nathan Rossi --- conf/machine/include/machine-xilinx-default.inc | 1 - recipes-bsp/u-boot/u-boot-xlnx-dev.bb | 6 ----- ...nq-Fix-up-the-target-file-name-for-u-boot.patch | 27 ++++++++++++++++++++++ recipes-bsp/u-boot/u-boot-xlnx_2015.04.bb | 9 ++------ 4 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 recipes-bsp/u-boot/u-boot-xlnx/ARM-zynq-Fix-up-the-target-file-name-for-u-boot.patch diff --git a/conf/machine/include/machine-xilinx-default.inc b/conf/machine/include/machine-xilinx-default.inc index 054a2e18..15f85fed 100644 --- a/conf/machine/include/machine-xilinx-default.inc +++ b/conf/machine/include/machine-xilinx-default.inc @@ -23,7 +23,6 @@ PREFERRED_PROVIDER_virtual/bootloader ??= "${XILINX_DEFAULT_UBOOT}" UBOOT_SUFFIX ?= "img" UBOOT_SUFFIX_zynqmp ?= "bin" UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" -UBOOT_BINARY_zynq ?= "u-boot-dtb.${UBOOT_SUFFIX}" UBOOT_ELF ?= "u-boot" UBOOT_ELF_aarch64 ?= "u-boot.elf" diff --git a/recipes-bsp/u-boot/u-boot-xlnx-dev.bb b/recipes-bsp/u-boot/u-boot-xlnx-dev.bb index 59dd5a3e..9fa22fed 100644 --- a/recipes-bsp/u-boot/u-boot-xlnx-dev.bb +++ b/recipes-bsp/u-boot/u-boot-xlnx-dev.bb @@ -25,9 +25,3 @@ HAS_PS7INIT ?= " \ zynq_zc706_config \ " -do_compile_append() { - # link u-boot-dtb.img to u-boot.img. - if [ ! -e ${B}/u-boot-dtb.img ]; then - ln -sf u-boot.img ${B}/u-boot-dtb.img - fi -} diff --git a/recipes-bsp/u-boot/u-boot-xlnx/ARM-zynq-Fix-up-the-target-file-name-for-u-boot.patch b/recipes-bsp/u-boot/u-boot-xlnx/ARM-zynq-Fix-up-the-target-file-name-for-u-boot.patch new file mode 100644 index 00000000..2ab6fdd3 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-xlnx/ARM-zynq-Fix-up-the-target-file-name-for-u-boot.patch @@ -0,0 +1,27 @@ +From: Nathan Rossi +Subject: [PATCH] ARM: zynq: Fix up the target file name for u-boot + +This should be 'u-boot.img' because all zynq configs are OF_EMBED. + +Signed-off-by: Nathan Rossi +Upstream-Status: Configuration [mirror upstream...] +--- + include/configs/zynq-common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h +index e5f2fc5..10c9f18 100644 +--- a/include/configs/zynq-common.h ++++ b/include/configs/zynq-common.h +@@ -501,7 +501,7 @@ + #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 + #define CONFIG_SPL_LIBDISK_SUPPORT + #define CONFIG_SPL_FAT_SUPPORT +-#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" ++#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" + #endif + + /* Disable dcache for SPL just for sure */ +-- +2.6.2 + diff --git a/recipes-bsp/u-boot/u-boot-xlnx_2015.04.bb b/recipes-bsp/u-boot/u-boot-xlnx_2015.04.bb index 6bf9ba9a..0bcbffd8 100644 --- a/recipes-bsp/u-boot/u-boot-xlnx_2015.04.bb +++ b/recipes-bsp/u-boot/u-boot-xlnx_2015.04.bb @@ -2,11 +2,13 @@ include u-boot-xlnx.inc include u-boot-extra.inc include u-boot-spl-zynq-init.inc +# this matches u-boot-xlnx 'xilinx-v2015.2' release tag SRCREV = "1160fbcc619f23bf87cde01ed651566474e17eb9" PV = "v2015.04${XILINX_EXTENSION}+git${SRCPV}" FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-xlnx:" SRC_URI += " \ + file://ARM-zynq-Fix-up-the-target-file-name-for-u-boot.patch \ file://zynq-Add-Zynq-PicoZed-board-support.patch \ file://microblaze-Fix-EMAC-Lite-initialization.patch \ file://microblaze-generic_defconfig-Disable-configs.patch \ @@ -26,10 +28,3 @@ SRC_URI_append_zedboard-zynq7 = " file://uEnv.txt" UBOOT_MACHINE_zc702-zynq7 = "zynq_zc70x_config" UBOOT_MACHINE_zc706-zynq7 = "zynq_zc70x_config" -do_compile_append() { - # link u-boot-dtb.img to u-boot.img. - if [ ! -e ${B}/u-boot-dtb.img ]; then - ln -sf u-boot.img ${B}/u-boot-dtb.img - fi -} - -- cgit v1.2.3-54-g00ecf