From fd26066cc6e20e000c70507b227f337b9e84ae4b Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 14 Aug 2023 11:41:17 +0800 Subject: [PATCH] Fix iMX8QM SMARC boot file device tree name --- conf/machine/smarcimx8qm4g.conf | 3 +++ conf/machine/smarcimx8qm8g.conf | 3 +++ recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend | 14 ++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/conf/machine/smarcimx8qm4g.conf b/conf/machine/smarcimx8qm4g.conf index d2aefdb..ee8086e 100644 --- a/conf/machine/smarcimx8qm4g.conf +++ b/conf/machine/smarcimx8qm4g.conf @@ -37,6 +37,9 @@ KERNEL_DEVICETREE = " \ embedian/imx8qm-smarc-edp.dtb \ " +# Set u-boot DTB +UBOOT_DTB_NAME = "imx8qm-smarc.dtb" + UBOOT_MAKE_TARGET = \ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '', \ 'u-boot.bin', d)}" diff --git a/conf/machine/smarcimx8qm8g.conf b/conf/machine/smarcimx8qm8g.conf index 3c360dc..16029ac 100644 --- a/conf/machine/smarcimx8qm8g.conf +++ b/conf/machine/smarcimx8qm8g.conf @@ -37,6 +37,9 @@ KERNEL_DEVICETREE = " \ embedian/imx8qm-smarc-edp.dtb \ " +# Set u-boot DTB +UBOOT_DTB_NAME = "imx8qm-smarc.dtb" + UBOOT_MAKE_TARGET = \ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '', \ 'u-boot.bin', d)}" diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend b/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend index 03cac45..37c92ac 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend @@ -1,4 +1,18 @@ # Workaround to fix do_compile() failure due to missing imx8mx-smarc.dtb +compile_mx8:prepend:smarcimx8qm4g() { + echo "Copying DTB" + if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8qm-smarc.dtb ]; then + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}/imx8qm-mek.dtb + fi +} + +compile_mx8:prepend:smarcimx8qm8g() { + echo "Copying DTB" + if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8qm-smarc.dtb ]; then + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}/imx8qm-mek.dtb + fi +} + compile_mx8m:prepend:smarcimx8mp2g() { echo "Copying DTB" if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mp-smarc.dtb ]; then -- 1.9.1