rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | inherit externalsrc |
| 2 | inherit deploy trustzone-build |
| 3 | |
| 4 | DESCRIPTION = "ARM trusted firmware" |
| 5 | LICENSE = "BSD" |
| 6 | # code src may be change in trustzone-build.bb to adapt license |
| 7 | MTK_SRC = "${TOPDIR}/../src/bsp/trustzone/atf" |
| 8 | ATF_VER = '1.2' |
| 9 | CHIP_TYPE = '' |
| 10 | LIC_FILES_CHKSUM = "file://${B}/v${ATF_VER}/${CHIP_TYPE}/license.md;md5=829bdeb34c1d9044f393d5a16c068371" |
| 11 | EXTERNALSRC = "${MTK_SRC}" |
| 12 | EXTERNALSRC_BUILD = "${MTK_SRC}" |
| 13 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 14 | ATF_OUT = "${WORKDIR}/out" |
| 15 | ATF_OUT_BINARY = "${ATF_OUT}/${ATF_INSTALL_MODE}/bl31.bin" |
| 16 | DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}/trustzone" |
| 17 | |
| 18 | EXTRA_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 | |
| 25 | CFLAGS[unexport] = "1" |
| 26 | LDFLAGS[unexport] = "1" |
| 27 | AS[unexport] = "1" |
| 28 | LD[unexport] = "1" |
| 29 | do_compile[nostamp] = "1" |
| 30 | |
| 31 | do_compile () { |
| 32 | oe_runmake -C ${B}/v${ATF_VER}/${CHIP_TYPE} -f ${B}/v${ATF_VER}/${CHIP_TYPE}/Makefile |
| 33 | } |
| 34 | |
| 35 | do_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 | |
| 41 | addtask deploy before do_build after do_install |