diff options
Diffstat (limited to 'recipes-bsp/imx-atf')
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch | 29 | ||||
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf_2.0.bb | 56 | ||||
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf_2.8.bb | 80 |
3 files changed, 80 insertions, 85 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch b/recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch deleted file mode 100644 index be747789..00000000 --- a/recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4123893a8a4d93362a0a36f72134f75436fee457 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein <tom.hochstein@nxp.com> -Date: Thu, 18 Oct 2018 18:03:46 -0500 -Subject: [PATCH] Allow BUILD_STRING to be set in .revision file. - -Upstream-Status: Pending - -Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> ---- - Makefile | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/Makefile b/Makefile -index 57c4a90..ec49397 100644 ---- a/Makefile -+++ b/Makefile -@@ -97,6 +97,9 @@ endif - - # Default build string (git branch and commit) - ifeq (${BUILD_STRING},) -+ BUILD_STRING := $(shell cat .revision 2> /dev/null) -+endif -+ifeq (${BUILD_STRING},) - BUILD_STRING := $(shell git describe --long --always --dirty --tags 2> /dev/null) - endif - VERSION_STRING := v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING} --- -2.7.4 - diff --git a/recipes-bsp/imx-atf/imx-atf_2.0.bb b/recipes-bsp/imx-atf/imx-atf_2.0.bb deleted file mode 100644 index 15122520..00000000 --- a/recipes-bsp/imx-atf/imx-atf_2.0.bb +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2017-2019 NXP - -DESCRIPTION = "i.MX ARM Trusted Firmware" -SECTION = "BSP" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" - -PV .= "+git${SRCPV}" - -SRCBRANCH = "imx_4.14.98_2.0.0_ga" -SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \ - file://0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch \ -" -SRCREV = "1cb68fa0a0dd8bc00b9871b51d4c4e1d0a827b2d" - -S = "${WORKDIR}/git" - -inherit deploy - -BOOT_TOOLS = "imx-boot-tools" - -PLATFORM ?= "INVALID" -PLATFORM_mx8qm = "imx8qm" -PLATFORM_mx8qxp = "imx8qx" -PLATFORM_mx8mq = "imx8mq" -PLATFORM_mx8mm = "imx8mm" - -EXTRA_OEMAKE += " \ - CROSS_COMPILE="${TARGET_PREFIX}" \ - PLAT=${PLATFORM} \ -" - -BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" - -do_compile() { - # Clear LDFLAGS to avoid the option -Wl recognize issue - unset LDFLAGS - oe_runmake bl31 - if ${BUILD_OPTEE}; then - oe_runmake clean BUILD_BASE=build-optee - oe_runmake BUILD_BASE=build-optee SPD=opteed bl31 - fi -} - -do_install[noexec] = "1" - -do_deploy() { - install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin - if ${BUILD_OPTEE}; then - install -m 0644 ${S}/build-optee/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin-optee - fi -} -addtask deploy after do_compile - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(mx8)" diff --git a/recipes-bsp/imx-atf/imx-atf_2.8.bb b/recipes-bsp/imx-atf/imx-atf_2.8.bb new file mode 100644 index 00000000..8bd6ad12 --- /dev/null +++ b/recipes-bsp/imx-atf/imx-atf_2.8.bb @@ -0,0 +1,80 @@ +# Copyright (C) 2017-2023 NXP + +DESCRIPTION = "i.MX ARM Trusted Firmware" +SECTION = "BSP" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +PV .= "+git${SRCPV}" + +SRC_URI = "git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH}" +SRCBRANCH = "lf_v2.8" +SRCREV = "8dbe28631802a51b3ec8179b2c5635b00393ad97" + +S = "${WORKDIR}/git" + +inherit deploy + +ATF_PLATFORM ??= "INVALID" + +# FIXME: We should return INVALID here but currently only i.MX8M has support to override the UART +# base address in source code. +ATF_BOOT_UART_BASE ?= "" + +EXTRA_OEMAKE += " \ + CROSS_COMPILE=${TARGET_PREFIX} \ + PLAT=${ATF_PLATFORM} \ +" + +# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application +CFLAGS[unexport] = "1" +LDFLAGS[unexport] = "1" +AS[unexport] = "1" +LD[unexport] = "1" + +# Baremetal, just need a compiler +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "virtual/${HOST_PREFIX}gcc" + +# Bring in clang compiler if using clang as default +DEPENDS:append:toolchain-clang = " clang-cross-${TARGET_ARCH}" + +BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" + +# CC and LD introduce arguments which conflict with those otherwise provided by +# this recipe. The heads of these variables excluding those arguments +# are therefore used instead. +def remove_options_tail (in_string): + from itertools import takewhile + return ' '.join(takewhile(lambda x: not x.startswith('-'), in_string.split(' '))) + +EXTRA_OEMAKE += 'LD="${@remove_options_tail(d.getVar('LD'))}.bfd"' + +EXTRA_OEMAKE += 'CC="${@remove_options_tail(d.getVar('CC'))}"' + +# Set the UART to use during the boot. +EXTRA_OEMAKE += 'IMX_BOOT_UART_BASE=${ATF_BOOT_UART_BASE}' + +do_configure[noexec] = "1" + +do_compile() { + # Clear LDFLAGS to avoid the option -Wl recognize issue + oe_runmake bl31 + if ${BUILD_OPTEE}; then + oe_runmake clean BUILD_BASE=build-optee + oe_runmake BUILD_BASE=build-optee SPD=opteed bl31 + fi +} + +do_install[noexec] = "1" + +addtask deploy after do_compile +do_deploy() { + install -Dm 0644 ${S}/build/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${ATF_PLATFORM}.bin + if ${BUILD_OPTEE}; then + install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${ATF_PLATFORM}.bin-optee + fi +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx8-generic-bsp|mx9-generic-bsp)" |