summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-04-17 08:38:06 -0300
committerGitHub <noreply@github.com>2023-04-17 08:38:06 -0300
commit31027e38d6930a68f1afd18731630dcb2082981b (patch)
treed4c54456d3b03555877fb86f0c78132f52b1731c
parent5dd6bfebacd3bbae8b824fff20d426cd14249459 (diff)
parent88c9f817bd344438a3739ab4235b2e28b729a5f4 (diff)
downloadmeta-freescale-31027e38d6930a68f1afd18731630dcb2082981b.tar.gz
Merge pull request #1500 from junzhuimx/master
qoriq-atf: Upgrade to v2.6
-rw-r--r--recipes-bsp/atf/qoriq-atf-2.4.inc10
-rw-r--r--recipes-bsp/atf/qoriq-atf-2.6.inc12
-rw-r--r--recipes-bsp/atf/qoriq-atf-tools_2.6.bb (renamed from recipes-bsp/atf/qoriq-atf-tools_2.4.bb)6
-rw-r--r--recipes-bsp/atf/qoriq-atf/tf-a-tests-no-warn-rwx-segments.patch34
-rw-r--r--recipes-bsp/atf/qoriq-atf_2.6.bb (renamed from recipes-bsp/atf/qoriq-atf_2.4.bb)31
5 files changed, 67 insertions, 26 deletions
diff --git a/recipes-bsp/atf/qoriq-atf-2.4.inc b/recipes-bsp/atf/qoriq-atf-2.4.inc
deleted file mode 100644
index 506c9538..00000000
--- a/recipes-bsp/atf/qoriq-atf-2.4.inc
+++ /dev/null
@@ -1,10 +0,0 @@
1DESCRIPTION = "ARM Trusted Firmware"
2
3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
5
6SRC_URI = "git://github.com/nxp-qoriq/atf.git;protocol=https;nobranch=1"
7SRCREV = "bb4957067d4b96a6ee197a333425948e409e990d"
8
9S = "${WORKDIR}/git"
10
diff --git a/recipes-bsp/atf/qoriq-atf-2.6.inc b/recipes-bsp/atf/qoriq-atf-2.6.inc
new file mode 100644
index 00000000..d5ef5e75
--- /dev/null
+++ b/recipes-bsp/atf/qoriq-atf-2.6.inc
@@ -0,0 +1,12 @@
1DESCRIPTION = "ARM Trusted Firmware"
2
3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
5
6ATF_BRANCH ?= "lf_v2.6"
7ATF_SRC ?= "git://github.com/nxp-qoriq/atf.git;protocol=https"
8SRC_URI = "${ATF_SRC};branch=${ATF_BRANCH}"
9SRCREV = "616a4588f333522d50a55bedd2b9a90a51474a75"
10
11S = "${WORKDIR}/git"
12
diff --git a/recipes-bsp/atf/qoriq-atf-tools_2.4.bb b/recipes-bsp/atf/qoriq-atf-tools_2.6.bb
index eccf12c8..2c1db306 100644
--- a/recipes-bsp/atf/qoriq-atf-tools_2.4.bb
+++ b/recipes-bsp/atf/qoriq-atf-tools_2.6.bb
@@ -1,8 +1,10 @@
1require recipes-bsp/atf/qoriq-atf-2.4.inc 1require qoriq-atf-${PV}.inc
2 2
3DEPENDS += "openssl" 3DEPENDS += "openssl"
4 4
5EXTRA_OEMAKE = "fiptool V=1 HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" 5PV:append = "+${SRCPV}"
6
7EXTRA_OEMAKE = "fiptool V=1 PLAT=lx2162aqds HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'"
6 8
7do_install () { 9do_install () {
8 install -m 0755 -d ${D}/${bindir} 10 install -m 0755 -d ${D}/${bindir}
diff --git a/recipes-bsp/atf/qoriq-atf/tf-a-tests-no-warn-rwx-segments.patch b/recipes-bsp/atf/qoriq-atf/tf-a-tests-no-warn-rwx-segments.patch
new file mode 100644
index 00000000..8412499e
--- /dev/null
+++ b/recipes-bsp/atf/qoriq-atf/tf-a-tests-no-warn-rwx-segments.patch
@@ -0,0 +1,34 @@
1From 9ceeb0cadffee1b1476718795d0568f6b244bf44 Mon Sep 17 00:00:00 2001
2From: Jun Zhu <junzhu@nxp.com>
3Date: Mon, 31 Oct 2022 21:24:15 +0800
4Subject: [PATCH] tf-a-tests-no-warn-rwx-segments
5
6Binutils 2.39 now warns when a segment has RXW permissions[1]:
7
8aarch64-poky-linux-musl-ld: tftf.elf has a LOAD segment with RWX permissions
9
10There is a ticket filed upstream[2], so until that is resolved just disable the warning
11[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
12[2] https://developer.trustedfirmware.org/T996
13
14Signed-off-by: Jun Zhu <junzhu@nxp.com>
15---
16 Makefile | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/Makefile b/Makefile
20index dccf0121d..0d082344b 100644
21--- a/Makefile
22+++ b/Makefile
23@@ -445,7 +445,7 @@ TF_LDFLAGS += --gc-sections
24 # ld.lld doesn't recognize the errata flags,
25 # therefore don't add those in that case
26 ifeq ($(findstring ld.lld,$(notdir $(LD))),)
27-TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
28+TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) --no-warn-rwx-segments
29 endif
30 endif
31
32--
332.25.1
34
diff --git a/recipes-bsp/atf/qoriq-atf_2.4.bb b/recipes-bsp/atf/qoriq-atf_2.6.bb
index ec953297..6ab938d8 100644
--- a/recipes-bsp/atf/qoriq-atf_2.4.bb
+++ b/recipes-bsp/atf/qoriq-atf_2.6.bb
@@ -1,14 +1,18 @@
1require recipes-bsp/atf/qoriq-atf-2.4.inc 1require qoriq-atf-${PV}.inc
2 2
3inherit deploy 3inherit deploy
4 4
5DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native rcw qoriq-cst-native bc-native" 5DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw qoriq-cst-native bc-native"
6DEPENDS:append:lx2160a = " ddr-phy"
7DEPENDS:append:lx2162a = " ddr-phy"
8do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" 6do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy"
9 7
10SRC_URI += "git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls;protocol=https" 8PV:append = "+${SRCPV}"
9
10SRC_URI += "git://github.com/ARMmbed/mbedtls;protocol=https;nobranch=1;destsuffix=git/mbedtls;name=mbedtls \
11 git://github.com/nxp/ddr-phy-binary;protocol=https;nobranch=1;destsuffix=git/ddr-phy-binary;name=ddr \
12 file://tf-a-tests-no-warn-rwx-segments.patch \
13"
11SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708" 14SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708"
15SRCREV_ddr = "fbc036b88acb6c06ffed02c898cbae9856ec75ba"
12SRCREV_FORMAT = "atf" 16SRCREV_FORMAT = "atf"
13 17
14COMPATIBLE_MACHINE = "(qoriq)" 18COMPATIBLE_MACHINE = "(qoriq)"
@@ -17,12 +21,14 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
17 21
18PLATFORM = "${MACHINE}" 22PLATFORM = "${MACHINE}"
19PLATFORM:ls1088ardb-pb = "ls1088ardb" 23PLATFORM:ls1088ardb-pb = "ls1088ardb"
24PLATFORM:lx2160ardb-rev2 = "lx2160ardb"
20PLATFORM_ADDITIONAL_TARGET ??= "" 25PLATFORM_ADDITIONAL_TARGET ??= ""
21PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" 26PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb"
22 27
23RCW_FOLDER ?= "${MACHINE}" 28RCW_FOLDER ?= "${MACHINE}"
24RCW_FOLDER:ls1088ardb-pb = "ls1088ardb" 29RCW_FOLDER:ls1088ardb-pb = "ls1088ardb"
25RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2" 30RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2"
31RCW_FOLDER:lx2160ardb-rev2 = "lx2160ardb_rev2"
26 32
27RCW_SUFFIX ?= ".bin" 33RCW_SUFFIX ?= ".bin"
28RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}" 34RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}"
@@ -40,9 +46,9 @@ chassistype:ls1012a = "ls104x_1012"
40chassistype:ls1043a = "ls104x_1012" 46chassistype:ls1043a = "ls104x_1012"
41chassistype:ls1046a = "ls104x_1012" 47chassistype:ls1046a = "ls104x_1012"
42 48
43DDR_PHY_BIN_PATH ?= "" 49FIP_DDR ?= ""
44DDR_PHY_BIN_PATH:lx2160a = "${DEPLOY_DIR_IMAGE}/ddr-phy" 50FIP_DDR:lx2160a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'fip_ddr', '', d)}"
45DDR_PHY_BIN_PATH:lx2162a = "${DEPLOY_DIR_IMAGE}/ddr-phy" 51FIP_DDR:lx2162a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'fip_ddr', '', d)}"
46 52
47# requires CROSS_COMPILE set by hand as there is no configure script 53# requires CROSS_COMPILE set by hand as there is no configure script
48export CROSS_COMPILE="${TARGET_PREFIX}" 54export CROSS_COMPILE="${TARGET_PREFIX}"
@@ -125,18 +131,15 @@ do_compile() {
125 cp *.pem build/${PLATFORM}/release/ 131 cp *.pem build/${PLATFORM}/release/
126 fi 132 fi
127 133
128 oe_runmake V=1 all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${UBOOT_BINARY} 134 oe_runmake V=1 all fip pbl ${FIP_DDR} PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${UBOOT_BINARY}
129 cp build/${PLATFORM}/release/bl2_${d}${SECURE_EXTENTION}.pbl . 135 cp build/${PLATFORM}/release/bl2_${d}${SECURE_EXTENTION}.pbl .
130 cp build/${PLATFORM}/release/fip.bin fip_uboot${SECURE_EXTENTION}.bin 136 cp build/${PLATFORM}/release/fip.bin fip_uboot${SECURE_EXTENTION}.bin
131 if [ -e build/${PLATFORM}/release/fuse_fip.bin ]; then 137 if [ -e build/${PLATFORM}/release/fuse_fip.bin ]; then
132 cp build/${PLATFORM}/release/fuse_fip.bin . 138 cp build/${PLATFORM}/release/fuse_fip.bin .
133 fi 139 fi
134 140
135 if [ -n "${SECURE_EXTENTION}" -a -n "${DDR_PHY_BIN_PATH}" -a ! -f ddr_fip_sec.bin ]; then 141 if [ -e build/${PLATFORM}/release/ddr_fip_sec.bin ] && [ ! -f ddr_fip_sec.bin ]; then
136 oe_runmake V=1 fip_ddr PLAT=${PLATFORM} DDR_PHY_BIN_PATH=${DDR_PHY_BIN_PATH} 142 cp build/${PLATFORM}/release/ddr_fip_sec.bin .
137 if [ -e build/${PLATFORM}/release/ddr_fip_sec.bin ]; then
138 cp build/${PLATFORM}/release/ddr_fip_sec.bin .
139 fi
140 fi 143 fi
141 144
142 if [ -e build/${PLATFORM}/release/rot_key.pem ] && [ ! -f rot_key.pem ]; then 145 if [ -e build/${PLATFORM}/release/rot_key.pem ] && [ ! -f rot_key.pem ]; then