From da00e61f8037d95ae27a33b0e94bd11f4a42b3e8 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 21 Oct 2025 17:52:37 +0200 Subject: [PATCH] imx-boot: generalize Cortex-M default image handling Different platforms use different Cortex-M processors, so instead of using the M4_DEFAULT_IMAGE_MX95 (as meta-imx does) for an M7 processor, generalize to the CORTEXM_DEFAULT_IMAGE variable name. Also, move it to the imx-boot recipe (where it is used) and deploy that image to the imx-boot-tools directory, so the imx-boot image can be regenerated externally (without yocto). https://onedigi.atlassian.net/browse/DEL-9768 Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/ccimx95-dvk.conf | 2 -- .../recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend | 9 ++++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccimx95-dvk.conf b/meta-digi-arm/conf/machine/ccimx95-dvk.conf index 9cabaf5ea..f91305c08 100644 --- a/meta-digi-arm/conf/machine/ccimx95-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx95-dvk.conf @@ -50,8 +50,6 @@ KERNEL_DEVICETREE ?= " \ " FIT_CONF_DEFAULT_DTB = "ccimx95-dvk.dtb" -M4_DEFAULT_IMAGE_MX95 = "imx95-19x19-evk_m7_TCM_power_mode_switch.bin" - # Boot artifacts to be copied from the deploy dir to the installer ZIP BOOTABLE_ARTIFACTS = " \ imx-boot##SIGNED##-ccimx95-dvk.bin \ diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend index e8fe4788f..8d86ceaf7 100644 --- a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend @@ -22,10 +22,13 @@ UUU_BOOTLOADER:mx9-generic-bsp = "" IMX_CORTEXM_DEMOS = "" IMX_CORTEXM_DEMOS:ccimx95 = "imx-m7-demos:do_deploy" +CORTEXM_DEFAULT_IMAGE = "" +CORTEXM_DEFAULT_IMAGE:ccimx95 = "imx95-19x19-evk_m7_TCM_power_mode_switch.bin" + do_compile[depends] += "${IMX_CORTEXM_DEMOS}" compile_mx95:append:ccimx95() { - cp ${DEPLOY_DIR_IMAGE}/mcore-demos/imx95-19x19-evk_m7_TCM_power_mode_switch.bin ${BOOT_STAGING}/m7_image.bin + cp ${DEPLOY_DIR_IMAGE}/mcore-demos/${CORTEXM_DEFAULT_IMAGE} ${BOOT_STAGING}/m7_image.bin } # Revert compile_mx8m() to how it was in kirkstone branch of meta-freescale, @@ -127,6 +130,10 @@ generate_symlinks() { ln -sf imx-boot-${MACHINE}.bin-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/imx-boot } +deploy_mx95:append:ccimx95() { + install -m 0644 ${DEPLOY_DIR_IMAGE}/mcore-demos/${CORTEXM_DEFAULT_IMAGE} ${DEPLOYDIR}/${BOOT_TOOLS} +} + do_deploy:append:ccimx8m() { generate_symlinks for target in ${IMXBOOT_TARGETS}; do