blob: b3edda9923fbe77702527186d6dd675bcebf728b [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001inherit externalsrc
2inherit deploy trustzone-build
3
4DESCRIPTION = "ARM trusted firmware"
5LICENSE = "BSD"
6# code src may be change in trustzone-build.bb to adapt license
7MTK_SRC = "${TOPDIR}/../src/bsp/trustzone/atf"
8ATF_VER = '1.2'
9CHIP_TYPE = ''
10LIC_FILES_CHKSUM = "file://${B}/v${ATF_VER}/${CHIP_TYPE}/license.md;md5=829bdeb34c1d9044f393d5a16c068371"
11EXTERNALSRC = "${MTK_SRC}"
12EXTERNALSRC_BUILD = "${MTK_SRC}"
13PACKAGE_ARCH = "${MACHINE_ARCH}"
14ATF_OUT = "${WORKDIR}/out"
15ATF_OUT_BINARY = "${ATF_OUT}/${ATF_INSTALL_MODE}/bl31.bin"
16DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}/trustzone"
17
18EXTRA_OEMAKE = "'CROSS_COMPILE=${TARGET_PREFIX}' \
19 'KERNEL_ARCH=${KERNEL_ARCH}' \
20 'PLAT=${MTK_MACH_TYPE}' \
21 'MACH_TYPE=${MTK_MACH_TYPE}' \
22 'SECURE_OS=${TEE_SUPPORT}' \
23 'BUILD_BASE=${ATF_OUT}'"
24
25CFLAGS[unexport] = "1"
26LDFLAGS[unexport] = "1"
27AS[unexport] = "1"
28LD[unexport] = "1"
29do_compile[nostamp] = "1"
30
31do_compile () {
32 oe_runmake -C ${B}/v${ATF_VER}/${CHIP_TYPE} -f ${B}/v${ATF_VER}/${CHIP_TYPE}/Makefile
33}
34
35do_deploy () {
36 install -d ${DEPLOYDIR}
37 install ${ATF_OUT_BINARY} ${DEPLOYDIR}/${ATF_RAW_BINARY}
38 install ${ATF_OUT_BINARY} ${DEPLOYDIR}/${ATF_SIGNED_BINARY}
39}
40
41addtask deploy before do_build after do_install