diff options
author | Jun Zhu <junzhu@nxp.com> | 2023-04-17 18:51:34 +0800 |
---|---|---|
committer | Jun Zhu <junzhu@nxp.com> | 2023-04-17 10:44:22 +0800 |
commit | 88c9f817bd344438a3739ab4235b2e28b729a5f4 (patch) | |
tree | d4c54456d3b03555877fb86f0c78132f52b1731c /recipes-bsp/atf | |
parent | 5dd6bfebacd3bbae8b824fff20d426cd14249459 (diff) | |
download | meta-freescale-88c9f817bd344438a3739ab4235b2e28b729a5f4.tar.gz |
qoriq-atf: Upgrade to v2.6
Signed-off-by: Jun Zhu <junzhu@nxp.com>
Diffstat (limited to 'recipes-bsp/atf')
-rw-r--r-- | recipes-bsp/atf/qoriq-atf-2.4.inc | 10 | ||||
-rw-r--r-- | recipes-bsp/atf/qoriq-atf-2.6.inc | 12 | ||||
-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.patch | 34 | ||||
-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 @@ | |||
1 | DESCRIPTION = "ARM Trusted Firmware" | ||
2 | |||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
5 | |||
6 | SRC_URI = "git://github.com/nxp-qoriq/atf.git;protocol=https;nobranch=1" | ||
7 | SRCREV = "bb4957067d4b96a6ee197a333425948e409e990d" | ||
8 | |||
9 | S = "${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 @@ | |||
1 | DESCRIPTION = "ARM Trusted Firmware" | ||
2 | |||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
5 | |||
6 | ATF_BRANCH ?= "lf_v2.6" | ||
7 | ATF_SRC ?= "git://github.com/nxp-qoriq/atf.git;protocol=https" | ||
8 | SRC_URI = "${ATF_SRC};branch=${ATF_BRANCH}" | ||
9 | SRCREV = "616a4588f333522d50a55bedd2b9a90a51474a75" | ||
10 | |||
11 | S = "${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 @@ | |||
1 | require recipes-bsp/atf/qoriq-atf-2.4.inc | 1 | require qoriq-atf-${PV}.inc |
2 | 2 | ||
3 | DEPENDS += "openssl" | 3 | DEPENDS += "openssl" |
4 | 4 | ||
5 | EXTRA_OEMAKE = "fiptool V=1 HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" | 5 | PV:append = "+${SRCPV}" |
6 | |||
7 | EXTRA_OEMAKE = "fiptool V=1 PLAT=lx2162aqds HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" | ||
6 | 8 | ||
7 | do_install () { | 9 | do_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 @@ | |||
1 | From 9ceeb0cadffee1b1476718795d0568f6b244bf44 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jun Zhu <junzhu@nxp.com> | ||
3 | Date: Mon, 31 Oct 2022 21:24:15 +0800 | ||
4 | Subject: [PATCH] tf-a-tests-no-warn-rwx-segments | ||
5 | |||
6 | Binutils 2.39 now warns when a segment has RXW permissions[1]: | ||
7 | |||
8 | aarch64-poky-linux-musl-ld: tftf.elf has a LOAD segment with RWX permissions | ||
9 | |||
10 | There 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 | |||
14 | Signed-off-by: Jun Zhu <junzhu@nxp.com> | ||
15 | --- | ||
16 | Makefile | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/Makefile b/Makefile | ||
20 | index 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 | -- | ||
33 | 2.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 @@ | |||
1 | require recipes-bsp/atf/qoriq-atf-2.4.inc | 1 | require qoriq-atf-${PV}.inc |
2 | 2 | ||
3 | inherit deploy | 3 | inherit deploy |
4 | 4 | ||
5 | DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native rcw qoriq-cst-native bc-native" | 5 | DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw qoriq-cst-native bc-native" |
6 | DEPENDS:append:lx2160a = " ddr-phy" | ||
7 | DEPENDS:append:lx2162a = " ddr-phy" | ||
8 | do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" | 6 | do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" |
9 | 7 | ||
10 | SRC_URI += "git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls;protocol=https" | 8 | PV:append = "+${SRCPV}" |
9 | |||
10 | SRC_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 | " | ||
11 | SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708" | 14 | SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708" |
15 | SRCREV_ddr = "fbc036b88acb6c06ffed02c898cbae9856ec75ba" | ||
12 | SRCREV_FORMAT = "atf" | 16 | SRCREV_FORMAT = "atf" |
13 | 17 | ||
14 | COMPATIBLE_MACHINE = "(qoriq)" | 18 | COMPATIBLE_MACHINE = "(qoriq)" |
@@ -17,12 +21,14 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
17 | 21 | ||
18 | PLATFORM = "${MACHINE}" | 22 | PLATFORM = "${MACHINE}" |
19 | PLATFORM:ls1088ardb-pb = "ls1088ardb" | 23 | PLATFORM:ls1088ardb-pb = "ls1088ardb" |
24 | PLATFORM:lx2160ardb-rev2 = "lx2160ardb" | ||
20 | PLATFORM_ADDITIONAL_TARGET ??= "" | 25 | PLATFORM_ADDITIONAL_TARGET ??= "" |
21 | PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" | 26 | PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" |
22 | 27 | ||
23 | RCW_FOLDER ?= "${MACHINE}" | 28 | RCW_FOLDER ?= "${MACHINE}" |
24 | RCW_FOLDER:ls1088ardb-pb = "ls1088ardb" | 29 | RCW_FOLDER:ls1088ardb-pb = "ls1088ardb" |
25 | RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2" | 30 | RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2" |
31 | RCW_FOLDER:lx2160ardb-rev2 = "lx2160ardb_rev2" | ||
26 | 32 | ||
27 | RCW_SUFFIX ?= ".bin" | 33 | RCW_SUFFIX ?= ".bin" |
28 | RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}" | 34 | RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}" |
@@ -40,9 +46,9 @@ chassistype:ls1012a = "ls104x_1012" | |||
40 | chassistype:ls1043a = "ls104x_1012" | 46 | chassistype:ls1043a = "ls104x_1012" |
41 | chassistype:ls1046a = "ls104x_1012" | 47 | chassistype:ls1046a = "ls104x_1012" |
42 | 48 | ||
43 | DDR_PHY_BIN_PATH ?= "" | 49 | FIP_DDR ?= "" |
44 | DDR_PHY_BIN_PATH:lx2160a = "${DEPLOY_DIR_IMAGE}/ddr-phy" | 50 | FIP_DDR:lx2160a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'fip_ddr', '', d)}" |
45 | DDR_PHY_BIN_PATH:lx2162a = "${DEPLOY_DIR_IMAGE}/ddr-phy" | 51 | FIP_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 |
48 | export CROSS_COMPILE="${TARGET_PREFIX}" | 54 | export 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 |