From f50044623d99e4e5c72db2e1d1c97f16c8e8903a Mon Sep 17 00:00:00 2001 From: Rogerio Guerra Borin Date: Mon, 24 Jun 2024 22:25:44 -0300 Subject: imx-boot: inherit from uboot-config rather than uboot-sign Since commit 5e12dc911d0c541f43aa6d0c046fb87e8b7c1f7e on layer openembedded-core, the class uboot-sign is supposed to be inherited by u-boot recipes only, but the imx-boot recipe is currently inheriting it. With this commit we change this situation by inheriting from uboot-config instead so it can access relevant variables related to the U-Boot configuration without inheriting the tasks defined by uboot-sign which pertain exclusively to u-boot recipes (uboot_generate_rsa_keys, uboot_assemble_fitimage); this in turn allows us to get rid of the prepend to uboot_assemble_fitimage which only existed to allow that extraneous task to succeed. Nevertheless, the main issue solved by the commit is a conflict that happens when imx-boot is used together a U-Boot configured not to generate a boot container, i.e. with UBOOT_PROVIDES_BOOT_CONTAINER="0" in which case both the U-Boot and the imx-boot recipe would try to deploy the same files due to to extraneous tasks inherited, leading to build errors like this: ERROR: imx-boot-1.0-r0 do_deploy: Recipe imx-boot is trying to install files into a shared area when those files already exist. The files and the manifests listing them are: /workdir/.../deploy/images/colibri-imx8x/u-boot-colibri-imx8x.dtb (matched in manifest-colibri_imx8x-u-boot-toradex.deploy) /workdir/.../deploy/images/colibri-imx8x/u-boot.dtb (matched in manifest-colibri_imx8x-u-boot-toradex.deploy) ... As part of this change we set variable UBOOT_DTB_BINARY to match the setting in uboot-sign.bbclass, which duplicates information. This is not ideal but it should work as that value is unlikely to change. The ideal solution would likely be setting it in uboot-config.bbclass (provided by layer openembedded-core); that's left as a future improvement. Signed-off-by: Rogerio Guerra Borin (cherry picked from commit 45941f64766cd78f1491f74bf7483de52c43c9c5) Signed-off-by: Tom Hochstein --- recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 631217daf..0b18ba477 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb @@ -7,7 +7,7 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" SECTION = "BSP" -inherit use-imx-security-controller-firmware uboot-sign +inherit use-imx-security-controller-firmware uboot-config DEPENDS += " \ u-boot \ @@ -85,11 +85,7 @@ MKIMAGE_EXTRA_ARGS:imx95-19x19-verdin ?= " \ ${MKIMAGE_EXTRA_ARGS:mx95-nxp-bsp} \ QSPI_HEADER=./scripts/fspi_header_133" -do_uboot_assemble_fitimage:prepend:imx-generic-bsp() { - for config in ${UBOOT_MACHINE}; do - mkdir -p ${B}/${config} - done -} +UBOOT_DTB_BINARY ?= "u-boot.dtb" compile_mx8m() { bbnote 8MQ/8MM/8MN/8MP boot binary build -- cgit v1.2.3-54-g00ecf From bbc65d387fe8a5ff712d592381b96e620a513f7f Mon Sep 17 00:00:00 2001 From: Rogerio Guerra Borin Date: Mon, 24 Jun 2024 22:27:06 -0300 Subject: imx-boot: fix indentation / spacing Signed-off-by: Rogerio Guerra Borin (cherry picked from commit dc6b22f9151e5487258a22de1aa564f5239c0e1b) Signed-off-by: Tom Hochstein --- recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 0b18ba477..3f5b2c65d 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb @@ -114,6 +114,7 @@ compile_mx8m() { cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${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 -- cgit v1.2.3-54-g00ecf