diff options
author | Khang Nguyen <khang.nguyen.xw@renesas.com> | 2018-10-01 06:52:00 -0400 |
---|---|---|
committer | Khang Nguyen <khang.nguyen.xv@renesas.com> | 2018-10-29 13:41:32 +0700 |
commit | e5a8cfdc84a83544f281f33fcbe3ce15bb0ab119 (patch) | |
tree | fba6c24b80046c516b8234b585f92004c5647114 | |
parent | aaa3afa257ba66a177fffb2935f097e5362acacf (diff) |
rcar-gen3: u-boot: Support deploying multiple u-boot binaries
This commit updates recipes to support deploying multiple u-boot
binaries of Salvator-XS, H3ULCB and Ebisu boards. It also removed
uboot-control.inc which is no longer used.
Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com>
Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
-rw-r--r-- | meta-rcar-gen3/include/uboot-control.inc | 11 | ||||
-rw-r--r-- | meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb | 39 |
2 files changed, 27 insertions, 23 deletions
diff --git a/meta-rcar-gen3/include/uboot-control.inc b/meta-rcar-gen3/include/uboot-control.inc deleted file mode 100644 index 859295b..0000000 --- a/meta-rcar-gen3/include/uboot-control.inc +++ /dev/null @@ -1,11 +0,0 @@ -# This function is to add more U-Boot options to build with H3 (SoC: r8a7795) - -def get_uboot_config_opt(d): - option = d.getVar('H3_OPTION') - if option == "1": - d.setVar('UBOOT_CONFIG_OPT',' KCFLAGS+=-DRCAR_DRAM_MAP4_2 KAFLAGS+=-DRCAR_DRAM_MAP4_2') - elif option == "2": - d.setVar('UBOOT_CONFIG_OPT',' KCFLAGS+=-DRCAR_DRAM_MAP2_2 KAFLAGS+=-DRCAR_DRAM_MAP2_2') - else: - d.setVar('UBOOT_CONFIG_OPT','') - return d.getVar('UBOOT_CONFIG_OPT') diff --git a/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb index 2810bc4..524f18a 100644 --- a/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb +++ b/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb @@ -1,6 +1,5 @@ require u-boot-common_${PV}.inc require u-boot.inc -require include/uboot-control.inc DEPENDS += "bc-native dtc-native" @@ -11,17 +10,33 @@ SRC_URI = "${UBOOT_URL};branch=${BRANCH}" SRCREV = "70206a1b84e6e35c33b3760fae6a2a6dbe6ce534" PV = "v2018.09+git${SRCPV}" -# Add u-boot options for H3 -EXTRA_OEMAKE_append_r8a7795 = " ${@get_uboot_config_opt(d)}" - -UBOOT_SREC ?= "u-boot-elf.srec" -UBOOT_SREC_IMAGE ?= "u-boot-elf-${MACHINE}-${PV}-${PR}.srec" -UBOOT_SREC_SYMLINK ?= "u-boot-elf-${MACHINE}.srec" +UBOOT_SREC_SUFFIX = "srec" +UBOOT_SREC ?= "u-boot-elf.${UBOOT_SREC_SUFFIX}" +UBOOT_SREC_IMAGE ?= "u-boot-elf-${MACHINE}-${PV}-${PR}.${UBOOT_SREC_SUFFIX}" +UBOOT_SREC_SYMLINK ?= "u-boot-elf-${MACHINE}.${UBOOT_SREC_SUFFIX}" do_deploy_append() { - install -m 644 ${B}/${UBOOT_SREC} ${DEPLOYDIR}/${UBOOT_SREC_IMAGE} - cd ${DEPLOYDIR} - rm -f ${UBOOT_SREC} ${UBOOT_SREC_SYMLINK} - ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC_SYMLINK} - ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC} + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -m 644 ${B}/${config}/${UBOOT_SREC} ${DEPLOYDIR}/u-boot-elf-${type}-${PV}-${PR}.${UBOOT_SREC_SUFFIX} + cd ${DEPLOYDIR} + ln -sf u-boot-elf-${type}-${PV}-${PR}.${UBOOT_SREC_SUFFIX} u-boot-elf-${type}.${UBOOT_SREC_SUFFIX} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${UBOOT_SREC} ${DEPLOYDIR}/${UBOOT_SREC_IMAGE} + cd ${DEPLOYDIR} + rm -f ${UBOOT_SREC} ${UBOOT_SREC_SYMLINK} + ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC_SYMLINK} + ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC} + fi } |