From 771cd0567c812e92112cf4db9bb8889f4c1edbf4 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Tue, 18 Aug 2020 11:35:33 +0000 Subject: [PATCH] imx-atf: upgrade to 2.2 This adds support for additional i.MX8-based machines Signed-off-by: Andrey Zhizhikin (cherry picked from commit 3f8c343fd6215088f8112049853e078315b914b8) --- ...D_STRING-to-be-set-in-.revision-file.patch | 29 --------- ...imx-Fix-missing-inclusion-of-cdefs.h.patch | 62 +++++++++++++++++++ ...ix-multiple-definition-of-ipc_handle.patch | 13 ++-- .../{imx-atf_2.0.bb => imx-atf_2.2.bb} | 14 +++-- 4 files changed, 77 insertions(+), 41 deletions(-) delete mode 100644 recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch create mode 100644 recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch rename recipes-bsp/imx-atf/{imx-atf_2.0.bb => imx-atf_2.2.bb} (81%) 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 -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 ---- - 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/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch new file mode 100644 index 00000000..209098d6 --- /dev/null +++ b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch @@ -0,0 +1,62 @@ +From e8bb1c2caa19fa224090eca0793586857199af9e Mon Sep 17 00:00:00 2001 +From: Samuel Holland +Date: Wed, 4 Dec 2019 02:48:37 -0600 +Subject: [PATCH] imx: Fix missing inclusion of cdefs.h + +This was found by compiling with -fno-common: + +./build/picopi/release/bl2/imx_snvs.o:(.bss.__packed+0x0): multiple definition of `__packed'; +./build/picopi/release/bl2/imx_caam.o:(.bss.__packed+0x0): first defined here + +__packed was intended to be the attribute macro from cdefs.h, not an +object of the structure type. + +Upstream-Status: Backport + +Signed-off-by: Samuel Holland +Change-Id: Id02fac3f098be2d71c35c6b4a18012515532f32a +--- + plat/imx/common/include/imx_caam.h | 3 ++- + plat/imx/common/include/imx_snvs.h | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/plat/imx/common/include/imx_caam.h b/plat/imx/common/include/imx_caam.h +index 335bd0f8b..61005b51c 100644 +--- a/plat/imx/common/include/imx_caam.h ++++ b/plat/imx/common/include/imx_caam.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. ++ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +@@ -7,6 +7,7 @@ + #ifndef IMX_CAAM_H + #define IMX_CAAM_H + ++#include + #include + #include + #include +diff --git a/plat/imx/common/include/imx_snvs.h b/plat/imx/common/include/imx_snvs.h +index 0b3d1085f..565c451dd 100644 +--- a/plat/imx/common/include/imx_snvs.h ++++ b/plat/imx/common/include/imx_snvs.h +@@ -1,11 +1,12 @@ + /* +- * Copyright (C) 2018, ARM Limited and Contributors. All rights reserved. ++ * Copyright (C) 2018-2019, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + #ifndef IMX_SNVS_H + #define IMX_SNVS_H + ++#include + #include + + #include +-- +2.28.0 + diff --git a/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch index 000eff41..94050a06 100644 --- a/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch +++ b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch @@ -1,4 +1,4 @@ -From 8c433aa6c6b2eaed4084233beea99ee3fb0b652f Mon Sep 17 00:00:00 2001 +From 2338329e35254c1b8a887409d930ca76d9612093 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Wed, 4 Dec 2019 02:45:58 -0600 Subject: [PATCH] imx: Fix multiple definition of ipc_handle @@ -15,20 +15,19 @@ Change-Id: I6535954cc567d6efa06919069b91e3f50975b073 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plat/imx/common/include/sci/sci_ipc.h b/plat/imx/common/include/sci/sci_ipc.h -index 7cb109206..d2c3bba1c 100644 +index cc8e47b28..1e3e53247 100755 --- a/plat/imx/common/include/sci/sci_ipc.h +++ b/plat/imx/common/include/sci/sci_ipc.h -@@ -63,7 +63,7 @@ void sc_ipc_read(sc_ipc_t ipc, void *data); +@@ -63,6 +63,6 @@ void sc_ipc_read(sc_ipc_t ipc, void *data); */ void sc_ipc_write(sc_ipc_t ipc, const void *data); -sc_ipc_t ipc_handle; +extern sc_ipc_t ipc_handle; - #endif /* SC_IPC_H */ - + #endif /* SCI_IPC_H */ diff --git a/plat/imx/common/sci/ipc.c b/plat/imx/common/sci/ipc.c -index 68b0b8ef0..3169b7e0b 100644 +index f329482fe..bf35a5ead 100755 --- a/plat/imx/common/sci/ipc.c +++ b/plat/imx/common/sci/ipc.c @@ -11,6 +11,8 @@ @@ -37,7 +36,7 @@ index 68b0b8ef0..3169b7e0b 100644 +sc_ipc_t ipc_handle; + - #include + #include DEFINE_BAKERY_LOCK(sc_ipc_bakery_lock); #define sc_ipc_lock_init() bakery_lock_init(&sc_ipc_bakery_lock) -- diff --git a/recipes-bsp/imx-atf/imx-atf_2.0.bb b/recipes-bsp/imx-atf/imx-atf_2.2.bb similarity index 81% rename from recipes-bsp/imx-atf/imx-atf_2.0.bb rename to recipes-bsp/imx-atf/imx-atf_2.2.bb index 1e1baba3..ab99f2fe 100644 --- a/recipes-bsp/imx-atf/imx-atf_2.0.bb +++ b/recipes-bsp/imx-atf/imx-atf_2.2.bb @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2019 NXP +# Copyright (C) 2017-2020 NXP DESCRIPTION = "i.MX ARM Trusted Firmware" SECTION = "BSP" @@ -7,12 +7,12 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;m PV .= "+git${SRCPV}" -SRCBRANCH = "lf-5.4.y" +SRCBRANCH = "imx_5.4.24_2.1.0" 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 \ + file://0001-imx-Fix-missing-inclusion-of-cdefs.h.patch \ file://0001-imx-Fix-multiple-definition-of-ipc_handle.patch \ " -SRCREV = "7b3389d49815f1e3f7942bd312a27ee665bd2e33" +SRCREV = "b0a00f22b09c13572d3e87902a1069dee34763bd" S = "${WORKDIR}/git" @@ -22,10 +22,14 @@ BOOT_TOOLS = "imx-boot-tools" PLATFORM ?= "INVALID" PLATFORM_mx8qm = "imx8qm" -PLATFORM_mx8qxp = "imx8qx" +PLATFORM_mx8x = "imx8qx" PLATFORM_mx8mq = "imx8mq" PLATFORM_mx8mm = "imx8mm" PLATFORM_mx8mn = "imx8mn" +PLATFORM_mx8mp = "imx8mp" +PLATFORM_mx8dx = "imx8dx" +PLATFORM_imx8dxlevk = "imx8dxl" +PLATFORM_mx8dxlevk-phantom = "imx8qx" EXTRA_OEMAKE += " \ CROSS_COMPILE="${TARGET_PREFIX}" \ -- 2.40.1