summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-atf/imx-atf_2.6.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/imx-atf/imx-atf_2.6.bb')
-rw-r--r--recipes-bsp/imx-atf/imx-atf_2.6.bb72
1 files changed, 72 insertions, 0 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf_2.6.bb b/recipes-bsp/imx-atf/imx-atf_2.6.bb
new file mode 100644
index 00000000..b0cd4d3d
--- /dev/null
+++ b/recipes-bsp/imx-atf/imx-atf_2.6.bb
@@ -0,0 +1,72 @@
1# Copyright (C) 2017-2021 NXP
2
3DESCRIPTION = "i.MX ARM Trusted Firmware"
4SECTION = "BSP"
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
7
8FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
9
10PV .= "+git${SRCPV}"
11
12SRCBRANCH = "lf_v2.6"
13SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \
14 file://0001-Makefile-Suppress-array-bounds-error.patch"
15SRCREV = "c6a19b1a351308cc73443283f6aa56b2eff791b8"
16
17S = "${WORKDIR}/git"
18
19inherit deploy
20
21BOOT_TOOLS = "imx-boot-tools"
22
23ATF_PLATFORM ??= "INVALID"
24
25EXTRA_OEMAKE += " \
26 CROSS_COMPILE="${TARGET_PREFIX}" \
27 PLAT=${ATF_PLATFORM} \
28"
29
30# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application
31CFLAGS[unexport] = "1"
32LDFLAGS[unexport] = "1"
33AS[unexport] = "1"
34LD[unexport] = "1"
35
36# Baremetal, just need a compiler
37DEPENDS:remove = "virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
38
39BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
40
41# CC and LD introduce arguments which conflict with those otherwise provided by
42# this recipe. The heads of these variables excluding those arguments
43# are therefore used instead.
44def remove_options_tail (in_string):
45 from itertools import takewhile
46 return ' '.join(takewhile(lambda x: not x.startswith('-'), in_string.split(' ')))
47
48EXTRA_OEMAKE += 'LD="${@remove_options_tail(d.getVar('LD'))}"'
49
50EXTRA_OEMAKE += 'CC="${@remove_options_tail(d.getVar('CC'))}"'
51
52do_compile() {
53 # Clear LDFLAGS to avoid the option -Wl recognize issue
54 oe_runmake bl31
55 if ${BUILD_OPTEE}; then
56 oe_runmake clean BUILD_BASE=build-optee
57 oe_runmake BUILD_BASE=build-optee SPD=opteed bl31
58 fi
59}
60
61do_install[noexec] = "1"
62
63do_deploy() {
64 install -Dm 0644 ${S}/build/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${ATF_PLATFORM}.bin
65 if ${BUILD_OPTEE}; then
66 install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${ATF_PLATFORM}.bin-optee
67 fi
68}
69addtask deploy after do_compile
70
71PACKAGE_ARCH = "${MACHINE_SOCARCH}"
72COMPATIBLE_MACHINE = "(mx8-generic-bsp)"