From b61c4907b1926061cbf627ee1fd5dd8eb8e53d59 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Mon, 13 Jun 2022 09:05:11 +0000 Subject: layer-wide: define configurable default TF-A provider TF-A package can have several providers: upstream TF-A implementation, or NXP downstream fork. Functionality to switch this provider, and to select which package shall be included into the target image is missing in the layer however, defaulting the usage of the layer to NXP downstream fork only. Introduce the Default TF-A Provider define, make it overridable, and default it to NXP downstream fork. This allows user to re-define the package name later shall they choose to integrate upstream TF-A package instead. Current upstream TF-A version (v2.7) does not support HAB feature of i.MX8M family, see [1]. If the upstream TF-A version is chosen, then HAB will not be available for all SoCs that are opting-in. This is indicated in the comment where default TF-A provider variable is set. This might change with future TF-A release, so later it can be revised and statement in include file can be potentially removed. Signed-off-by: Andrey Zhizhikin Link: [1]: https://lists.trustedfirmware.org/archives/list/tf-a@lists.trustedfirmware.org/message/5UYYI4CNLQ5OWWHU466JBK6I5QIQ2VRS/ --- classes/imx-boot-container.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/imx-boot-container.bbclass') diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 71c2809d1..7765266db 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -29,7 +29,7 @@ ATF_MACHINE_NAME:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-o # appropriate dependencies for populate binaries task do_resolve_and_populate_binaries[depends] += " \ ${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \ - imx-atf:do_deploy \ + ${IMX_DEFAULT_ATF_PROVIDER}:do_deploy \ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os:do_deploy', '', d)} \ " -- cgit v1.2.3-54-g00ecf From 1ec9540091c6d2cb7faf679f3b01916bfb0a0397 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Mon, 13 Jun 2022 09:10:45 +0000 Subject: recipes-bsp: drop custom deploy location for TF-A binary Upstream TF-A and downstream TF-A fork uses different deployment locations for results binaries, which leads to failures during image build when switching between upstream and downstream versions. Drop the custom TF-A deployment location, which is only specific to NXP downstream deployment, allowing the TF-A binaries from upstream and downstream to be picked up from the same location, namely - image deployment folder. Signed-off-by: Andrey Zhizhikin --- classes/imx-boot-container.bbclass | 2 +- recipes-bsp/imx-atf/imx-atf_2.4.bb | 4 ++-- recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'classes/imx-boot-container.bbclass') diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 7765266db..711bbd9e5 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -47,7 +47,7 @@ do_resolve_and_populate_binaries() { cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/ done if [ -n "${ATF_MACHINE_NAME}" ]; then - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin + cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin else bberror "ATF binary is undefined, result binary would be unusable!" fi diff --git a/recipes-bsp/imx-atf/imx-atf_2.4.bb b/recipes-bsp/imx-atf/imx-atf_2.4.bb index 39158e6ca..a8068eb0e 100644 --- a/recipes-bsp/imx-atf/imx-atf_2.4.bb +++ b/recipes-bsp/imx-atf/imx-atf_2.4.bb @@ -61,9 +61,9 @@ do_compile() { do_install[noexec] = "1" do_deploy() { - install -Dm 0644 ${S}/build/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${ATF_PLATFORM}.bin + 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}/${BOOT_TOOLS}/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 diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 4e1b860a1..28bc88b80 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb @@ -88,13 +88,13 @@ compile_mx8m() { cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ ${BOOT_STAGING}/u-boot-nodtb.bin - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin + cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin } compile_mx8() { bbnote 8QM boot binary build cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin + cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then @@ -107,7 +107,7 @@ compile_mx8x() { bbnote 8QX boot binary build cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin + cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ -- cgit v1.2.3-54-g00ecf