diff options
Diffstat (limited to 'recipes-bsp/imx-atf')
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch | 42 | ||||
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf_2.8.bb (renamed from recipes-bsp/imx-atf/imx-atf_2.4.bb) | 44 |
2 files changed, 26 insertions, 60 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch b/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch deleted file mode 100644 index 37b5ce6f..00000000 --- a/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 85f576054a4d5496706bbd37a520942f51cb74b9 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein <tom.hochstein@nxp.com> -Date: Mon, 16 May 2022 13:45:16 -0500 -Subject: [PATCH] Makefile: Suppress array-bounds error - -The array-bounds error is triggered now in cases where it was silent before, -causing errors like: - -``` -plat/imx/imx8m/hab.c: In function 'imx_hab_handler': -plat/imx/imx8m/hab.c:64:57: error: array subscript 0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'} [-Werror=array-bounds] - 64 | #define HAB_RVT_CHECK_TARGET_ARM64 ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x18)) - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``` - -It appears that these new cases will be silenced soon in gcc [1], so for -now just silence the warning locally as a workaround. - -[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c39 - -Upstream-Status: Inappropriate [other] -Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index c87c3ae08..2d6b90f47 100644 ---- a/Makefile -+++ b/Makefile -@@ -346,7 +346,7 @@ WARNINGS += -Wshift-overflow -Wshift-sign-overflow \ - endif - - ifneq (${E},0) --ERRORS := -Werror -+ERRORS := -Werror -Wno-error=array-bounds - endif - - CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \ --- -2.17.1 - diff --git a/recipes-bsp/imx-atf/imx-atf_2.4.bb b/recipes-bsp/imx-atf/imx-atf_2.8.bb index a8068eb0..8bd6ad12 100644 --- a/recipes-bsp/imx-atf/imx-atf_2.4.bb +++ b/recipes-bsp/imx-atf/imx-atf_2.8.bb @@ -1,29 +1,28 @@ -# Copyright (C) 2017-2021 NXP +# 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" -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - PV .= "+git${SRCPV}" -SRCBRANCH = "lf_v2.4" -SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \ - file://0001-Makefile-Suppress-array-bounds-error.patch" -SRCREV = "05f788b9bbb13d002997e35008a4b945f7e2957b" +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 -BOOT_TOOLS = "imx-boot-tools" - 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}" \ + CROSS_COMPILE=${TARGET_PREFIX} \ PLAT=${ATF_PLATFORM} \ " @@ -34,7 +33,11 @@ AS[unexport] = "1" LD[unexport] = "1" # Baremetal, just need a compiler -DEPENDS:remove = "virtual/${TARGET_PREFIX}compilerlibs virtual/libc" +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)}" @@ -45,28 +48,33 @@ 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'))}"' +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 + 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 + install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${ATF_PLATFORM}.bin-optee fi } -addtask deploy after do_compile -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(mx8-generic-bsp)" +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx8-generic-bsp|mx9-generic-bsp)" |