From 1ee015e6e308ca1fa6d185015fdb2b828dc2c611 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 8 Jun 2020 20:16:21 +0800 Subject: atf: use var RCW_FOLDER to allow selecting rcw folder Generally, rcw are deployed to ${DEPLOY_DIR_IMAGE}/rcw/${MACHINE}/. But there are some machines that don't follow this rule. For example, lx2160ardb deployed RCW in folder lx2160ardb_rev2 for boards with Rev2 processor, but folder lx2160ardb for boards with Rev1 processor. As there are only difference on RCW for them, use variable RCW_FOLDER to allow selecting rcw folder for building atf targets. For exmaple, to build atf which supports lx2160ardb with Rev2 processor: RCW_FOLDER_lx2160ardb = "lx2160ardb_rev2" Signed-off-by: Ting Liu --- recipes-bsp/atf/atf_git.bb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'recipes-bsp') diff --git a/recipes-bsp/atf/atf_git.bb b/recipes-bsp/atf/atf_git.bb index ff55ca0c..dcc3689a 100644 --- a/recipes-bsp/atf/atf_git.bb +++ b/recipes-bsp/atf/atf_git.bb @@ -27,6 +27,9 @@ PLATFORM_ls1088ardb-pb = "ls1088ardb" PLATFORM_ADDITIONAL_TARGET ??= "" PLATFORM_ADDITIONAL_TARGET_ls1012afrwy = "ls1012afrwy_512mb" +RCW_FOLDER ?= "${MACHINE}" +RCW_FOLDER_ls1088ardb-pb = "ls1088ardb" + # requires CROSS_COMPILE set by hand as there is no configure script export CROSS_COMPILE="${TARGET_PREFIX}" export ARCH="arm64" @@ -148,9 +151,9 @@ do_compile() { ;; esac - if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg}" ]; then + if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg}" ]; then oe_runmake V=1 -C ${S} realclean - oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} + oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} cp -r ${S}/build/${PLATFORM}/release/bl2_${d}*.pbl ${S} cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S} if [ "${BUILD_FUSE}" = "true" ]; then @@ -159,7 +162,7 @@ do_compile() { if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then oe_runmake V=1 -C ${S} realclean - oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM_ADDITIONAL_TARGET} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} + oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM_ADDITIONAL_TARGET} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/bl2_qspi${secext}.pbl ${S}/bl2_${d}${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fip.bin ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin if [ "${BUILD_FUSE}" = "true" ]; then @@ -168,7 +171,7 @@ do_compile() { fi if [ -n "${uefiboot}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot}" ]; then oe_runmake V=1 -C ${S} realclean - oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} + oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S}/fip_uefi.bin fi fi -- cgit v1.2.3-54-g00ecf