diff options
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 | 35 | ||||
-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, 68 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 38a992b3..00000000 --- a/recipes-bsp/atf/qoriq-atf-2.4.inc +++ /dev/null @@ -1,10 +0,0 @@ -DESCRIPTION = "ARM Trusted Firmware" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf.git;nobranch=1" -SRCREV = "bb4957067d4b96a6ee197a333425948e409e990d" - -S = "${WORKDIR}/git" - 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 @@ +DESCRIPTION = "ARM Trusted Firmware" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" + +ATF_BRANCH ?= "lf_v2.6" +ATF_SRC ?= "git://github.com/nxp-qoriq/atf.git;protocol=https" +SRC_URI = "${ATF_SRC};branch=${ATF_BRANCH}" +SRCREV = "616a4588f333522d50a55bedd2b9a90a51474a75" + +S = "${WORKDIR}/git" + 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 @@ -require recipes-bsp/atf/qoriq-atf-2.4.inc +require qoriq-atf-${PV}.inc DEPENDS += "openssl" -EXTRA_OEMAKE = "fiptool V=1 HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" +PV:append = "+${SRCPV}" + +EXTRA_OEMAKE = "fiptool V=1 PLAT=lx2162aqds HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" do_install () { 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..a8801082 --- /dev/null +++ b/recipes-bsp/atf/qoriq-atf/tf-a-tests-no-warn-rwx-segments.patch @@ -0,0 +1,35 @@ +From 9ceeb0cadffee1b1476718795d0568f6b244bf44 Mon Sep 17 00:00:00 2001 +From: Jun Zhu <junzhu@nxp.com> +Date: Mon, 31 Oct 2022 21:24:15 +0800 +Subject: [PATCH] tf-a-tests-no-warn-rwx-segments + +Binutils 2.39 now warns when a segment has RXW permissions[1]: + +aarch64-poky-linux-musl-ld: tftf.elf has a LOAD segment with RWX permissions + +There is a ticket filed upstream[2], so until that is resolved just disable the warning +[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 +[2] https://developer.trustedfirmware.org/T996 + +Upstream-Status: Backport [https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/19401] +Signed-off-by: Jun Zhu <junzhu@nxp.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index dccf0121d..0d082344b 100644 +--- a/Makefile ++++ b/Makefile +@@ -445,7 +445,7 @@ TF_LDFLAGS += --gc-sections + # ld.lld doesn't recognize the errata flags, + # therefore don't add those in that case + ifeq ($(findstring ld.lld,$(notdir $(LD))),) +-TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) ++TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) --no-warn-rwx-segments + endif + endif + +-- +2.25.1 + diff --git a/recipes-bsp/atf/qoriq-atf_2.4.bb b/recipes-bsp/atf/qoriq-atf_2.6.bb index b6716272..5ae2ed9d 100644 --- a/recipes-bsp/atf/qoriq-atf_2.4.bb +++ b/recipes-bsp/atf/qoriq-atf_2.6.bb @@ -1,14 +1,18 @@ -require recipes-bsp/atf/qoriq-atf-2.4.inc +require qoriq-atf-${PV}.inc inherit deploy -DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native rcw cst-native bc-native" -DEPENDS:append:lx2160a = " ddr-phy" -DEPENDS:append:lx2162a = " ddr-phy" +DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native rcw qoriq-cst-native bc-native" do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" -SRC_URI += "git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls;protocol=https" +PV:append = "+${SRCPV}" + +SRC_URI += "git://github.com/ARMmbed/mbedtls;protocol=https;nobranch=1;destsuffix=git/mbedtls;name=mbedtls \ + git://github.com/nxp/ddr-phy-binary;protocol=https;nobranch=1;destsuffix=git/ddr-phy-binary;name=ddr \ + file://tf-a-tests-no-warn-rwx-segments.patch \ +" SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708" +SRCREV_ddr = "fbc036b88acb6c06ffed02c898cbae9856ec75ba" SRCREV_FORMAT = "atf" COMPATIBLE_MACHINE = "(qoriq)" @@ -17,12 +21,14 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" PLATFORM = "${MACHINE}" PLATFORM:ls1088ardb-pb = "ls1088ardb" +PLATFORM:lx2160ardb-rev2 = "lx2160ardb" PLATFORM_ADDITIONAL_TARGET ??= "" PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" RCW_FOLDER ?= "${MACHINE}" RCW_FOLDER:ls1088ardb-pb = "ls1088ardb" RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2" +RCW_FOLDER:lx2160ardb-rev2 = "lx2160ardb_rev2" RCW_SUFFIX ?= ".bin" RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}" @@ -40,9 +46,9 @@ chassistype:ls1012a = "ls104x_1012" chassistype:ls1043a = "ls104x_1012" chassistype:ls1046a = "ls104x_1012" -DDR_PHY_BIN_PATH ?= "" -DDR_PHY_BIN_PATH:lx2160a = "${DEPLOY_DIR_IMAGE}/ddr-phy" -DDR_PHY_BIN_PATH:lx2162a = "${DEPLOY_DIR_IMAGE}/ddr-phy" +FIP_DDR ?= "" +FIP_DDR:lx2160a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'fip_ddr', '', d)}" +FIP_DDR:lx2162a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'fip_ddr', '', d)}" # requires CROSS_COMPILE set by hand as there is no configure script export CROSS_COMPILE="${TARGET_PREFIX}" @@ -125,18 +131,15 @@ do_compile() { cp *.pem build/${PLATFORM}/release/ fi - oe_runmake V=1 all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${UBOOT_BINARY} + 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} cp build/${PLATFORM}/release/bl2_${d}${SECURE_EXTENTION}.pbl . cp build/${PLATFORM}/release/fip.bin fip_uboot${SECURE_EXTENTION}.bin if [ -e build/${PLATFORM}/release/fuse_fip.bin ]; then cp build/${PLATFORM}/release/fuse_fip.bin . fi - if [ -n "${SECURE_EXTENTION}" -a -n "${DDR_PHY_BIN_PATH}" -a ! -f ddr_fip_sec.bin ]; then - oe_runmake V=1 fip_ddr PLAT=${PLATFORM} DDR_PHY_BIN_PATH=${DDR_PHY_BIN_PATH} - if [ -e build/${PLATFORM}/release/ddr_fip_sec.bin ]; then - cp build/${PLATFORM}/release/ddr_fip_sec.bin . - fi + if [ -e build/${PLATFORM}/release/ddr_fip_sec.bin ] && [ ! -f ddr_fip_sec.bin ]; then + cp build/${PLATFORM}/release/ddr_fip_sec.bin . fi if [ -e build/${PLATFORM}/release/rot_key.pem ] && [ ! -f rot_key.pem ]; then |