summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/atf
diff options
context:
space:
mode:
authorTing Liu <ting.liu@nxp.com>2020-04-21 11:43:08 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2020-05-06 15:52:35 -0300
commit2d84421cd70be36a6a602d635b8707cc591faa1d (patch)
tree4cea5d6be64e654a0e3bb569f78fe95ba2921b1a /recipes-bsp/atf
parent316ba4d676ab078b6a29d7da7d718b18d8b96d27 (diff)
downloadmeta-freescale-2d84421cd70be36a6a602d635b8707cc591faa1d.tar.gz
atf: easy define additional build target
Use variable PLATFORM_ADDITIONAL_TARGET to allow define machine dependent atf targets. This avoids checking ${MACHINE} in shell script, and allows define additional build target using overrides. For exmaple: PLATFORM_ADDITIONAL_TARGET ??= "" PLATFORM_ADDITIONAL_TARGET_ls1012afrwy = "ls1012afrwy_512mb" PLATFORM_ADDITIONAL_TARGET_xxx = "yyy" # for other board Signed-off-by: Ting Liu <ting.liu@nxp.com>
Diffstat (limited to 'recipes-bsp/atf')
-rw-r--r--recipes-bsp/atf/atf_git.bb42
1 files changed, 25 insertions, 17 deletions
diff --git a/recipes-bsp/atf/atf_git.bb b/recipes-bsp/atf/atf_git.bb
index 4f577f9c..695a4518 100644
--- a/recipes-bsp/atf/atf_git.bb
+++ b/recipes-bsp/atf/atf_git.bb
@@ -17,14 +17,22 @@ SRCREV = "4a82c939a0211196e2b80a495f966383803753bb"
17SRC_URI += "file://0001-fix-fiptool-build-error.patch \ 17SRC_URI += "file://0001-fix-fiptool-build-error.patch \
18 file://0001-Makefile-add-CC-gcc.patch \ 18 file://0001-Makefile-add-CC-gcc.patch \
19" 19"
20
20COMPATIBLE_MACHINE = "(qoriq)" 21COMPATIBLE_MACHINE = "(qoriq)"
22
21PACKAGE_ARCH = "${MACHINE_ARCH}" 23PACKAGE_ARCH = "${MACHINE_ARCH}"
24
22PLATFORM = "${MACHINE}" 25PLATFORM = "${MACHINE}"
23PLATFORM_ls1088ardb-pb = "ls1088ardb" 26PLATFORM_ls1088ardb-pb = "ls1088ardb"
27PLATFORM_ADDITIONAL_TARGET ??= ""
28PLATFORM_ADDITIONAL_TARGET_ls1012afrwy = "ls1012afrwy_512mb"
29
24# requires CROSS_COMPILE set by hand as there is no configure script 30# requires CROSS_COMPILE set by hand as there is no configure script
25export CROSS_COMPILE="${TARGET_PREFIX}" 31export CROSS_COMPILE="${TARGET_PREFIX}"
26export ARCH="arm64" 32export ARCH="arm64"
27# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application 33
34# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is
35# a standalone application
28CFLAGS[unexport] = "1" 36CFLAGS[unexport] = "1"
29LDFLAGS[unexport] = "1" 37LDFLAGS[unexport] = "1"
30AS[unexport] = "1" 38AS[unexport] = "1"
@@ -66,7 +74,7 @@ do_configure[noexec] = "1"
66do_compile() { 74do_compile() {
67 export LIBPATH="${RECIPE_SYSROOT_NATIVE}" 75 export LIBPATH="${RECIPE_SYSROOT_NATIVE}"
68 install -d ${S}/include/tools_share/openssl 76 install -d ${S}/include/tools_share/openssl
69 cp -r ${RECIPE_SYSROOT}/usr/include/openssl/* ${S}/include/tools_share/openssl 77 cp -r ${RECIPE_SYSROOT}/usr/include/openssl/* ${S}/include/tools_share/openssl
70 if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then 78 if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then
71 ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 79 ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024
72 else 80 else
@@ -146,13 +154,13 @@ do_compile() {
146 cp -f ${S}/build/${PLATFORM}/release/fuse_fip.bin ${S} 154 cp -f ${S}/build/${PLATFORM}/release/fuse_fip.bin ${S}
147 fi 155 fi
148 156
149 if [ ${MACHINE} = ls1012afrwy ]; then 157 if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then
150 oe_runmake V=1 -C ${S} realclean 158 oe_runmake V=1 -C ${S} realclean
151 oe_runmake V=1 -C ${S} all fip pbl PLAT=ls1012afrwy_512mb BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} 159 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}
152 cp -r ${S}/build/ls1012afrwy_512mb/release/bl2_qspi${secext}.pbl ${S}/bl2_${d}${secext}_512mb.pbl 160 cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/bl2_qspi${secext}.pbl ${S}/bl2_${d}${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl
153 cp -r ${S}/build/ls1012afrwy_512mb/release/fip.bin ${S}/fip_512mb.bin 161 cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fip.bin ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin
154 if [ "${BUILD_FUSE}" = "true" ]; then 162 if [ "${BUILD_FUSE}" = "true" ]; then
155 cp -r ${S}/build/ls1012afrwy_512mb/release/fuse_fip.bin ${S}/fuse_fip_512mb.bin 163 cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin
156 fi 164 fi
157 fi 165 fi
158 if [ -n "${uefiboot}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot}" ]; then 166 if [ -n "${uefiboot}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot}" ]; then
@@ -187,11 +195,11 @@ do_install() {
187 cp -r ${S}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl 195 cp -r ${S}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl
188 fi 196 fi
189 done 197 done
190 if [ ${MACHINE} = ls1012afrwy ]; then 198 if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then
191 cp -r ${S}/fip_512mb.bin ${D}/boot/atf/fip_512mb.bin 199 cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fip_${PLATFORM_ADDITIONAL_TARGET}.bin
192 cp -r ${S}/bl2_qspi${secext}_512mb.pbl ${D}/boot/atf/bl2_qspi${secext}_512mb.pbl 200 cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${D}/boot/atf/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl
193 if [ -f "${S}/fuse_fip_512mb.bin" ]; then 201 if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then
194 cp -r ${S}/fuse_fip_512mb.bin ${D}/boot/atf/fuse_fip_512mb.bin 202 cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin
195 fi 203 fi
196 fi 204 fi
197 chown -R root:root ${D} 205 chown -R root:root ${D}
@@ -221,11 +229,11 @@ do_deploy() {
221 cp -r ${D}/boot/atf/bl2_${d}${secext}.pbl ${DEPLOYDIR}/atf/bl2_${d}${secext}.pbl 229 cp -r ${D}/boot/atf/bl2_${d}${secext}.pbl ${DEPLOYDIR}/atf/bl2_${d}${secext}.pbl
222 fi 230 fi
223 done 231 done
224 if [ ${MACHINE} = ls1012afrwy ]; then 232 if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then
225 cp -r ${S}/bl2_qspi${secext}_512mb.pbl ${DEPLOYDIR}/atf/ 233 cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${DEPLOYDIR}/atf/
226 cp -r ${S}/fip_512mb.bin ${DEPLOYDIR}/atf/fip_uboot${secext}_512mb.bin 234 cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${DEPLOYDIR}/atf/fip_uboot${secext}_${PLATFORM_ADDITIONAL_TARGET}.bin
227 if [ -f "${S}/fuse_fip_512mb.bin" ]; then 235 if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then
228 cp -r ${S}/fuse_fip_512mb.bin ${D}/boot/atf/fuse_fip_512mb${secext}.bin 236 cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}${secext}.bin
229 fi 237 fi
230 fi 238 fi
231 if [ -f "${S}/fip_ddr_sec.bin" ]; then 239 if [ -f "${S}/fip_ddr_sec.bin" ]; then