diff --git a/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf index 6ea18d62d..33c812742 100644 --- a/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mm-dvk.conf @@ -29,6 +29,7 @@ UBOOT_INSTALL_SD_INDEX = "1" ATF_PLATFORM = "imx8mm" IMX_BOOT_SOC_TARGET = "iMX8MM" +IMX_BOOT_SEEK = "33" KERNEL_DEVICETREE ?= " \ digi/ccimx8m_bt.dtbo \ diff --git a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf index 5966e7529..51be10bb3 100644 --- a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf @@ -28,6 +28,7 @@ UBOOT_INSTALL_SD_INDEX = "1" ATF_PLATFORM = "imx8mn" IMX_BOOT_SOC_TARGET = "iMX8MN" +IMX_BOOT_SEEK = "32" KERNEL_DEVICETREE ?= " \ digi/ccimx8m_bt.dtbo \ diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index 0ba6e1dd2..b58cc248c 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -5,6 +5,8 @@ include conf/machine/include/digi-defaults.inc # IMX_DEFAULT_BSP = "nxp" # include conf/machine/include/imx-base.inc +require conf/machine/include/utilities.inc + # Machines or distros can define which BSP it should use by default. We are # intending to default for mainline BSP by default and specific machines or # DISTROs might change it if need. @@ -13,6 +15,15 @@ include conf/machine/include/digi-defaults.inc IMX_DEFAULT_BSP ?= "nxp" MACHINEOVERRIDES =. "use-${IMX_DEFAULT_BSP}-bsp:" +# UBOOT_BINARY is used inside the wks files to dynamically find the required +# U-Boot file. +UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" + +# Some SoC can utilize the boot container provided by U-Boot, +# below variable sets that those SoC do use this rather than +# assembling it in the imx-boot recipe. +UBOOT_PROVIDES_BOOT_CONTAINER = "0" + # Allow setting the UART used during the boot by ATF. # FIXME: We should return INVALID here but currently only i.MX8M has support to override the UART @@ -349,6 +360,28 @@ PREFERRED_VERSION_opencv:mx9-nxp-bsp ??= "4.10.0.imx" EXTRA_IMAGEDEPENDS += "u-boot" +# Do not update fstab file when using wic images +WIC_CREATE_EXTRA_ARGS ?= "--no-fstab-update" + +IMAGE_BOOT_FILES ?= " \ + ${KERNEL_IMAGETYPE}-${MACHINE}.bin \ + ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${@make_dtb_boot_files(d)} boot.scr', d)} \ +" + +WKS_FILE_DEPENDS ?= " \ + virtual/bootloader \ + e2fsprogs-native \ + bmaptool-native \ +" +WKS_FILE_DEPENDS:append:mx8-nxp-bsp = " imx-boot" +WKS_FILE_DEPENDS:append:mx9-nxp-bsp = " imx-boot" + +SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks.in" +SOC_DEFAULT_WKS_FILE:mx8-generic-bsp ?= "imx-imx-boot-bootpart.wks.in" +SOC_DEFAULT_WKS_FILE:mx9-generic-bsp ?= "imx-imx-boot-bootpart.wks.in" + +WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" + KERNEL_IMAGETYPE = "zImage" KERNEL_IMAGETYPE:aarch64 = "Image.gz" 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 8d86ceaf7..d4e7c8fbd 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 @@ -15,10 +15,6 @@ SRC_URI:append:dey = " \ file://0008-imx95-soc.mak-capture-commands-output-into-a-log-fil.patch \ " -# Do not tag imx-boot -UUU_BOOTLOADER:mx8-generic-bsp = "" -UUU_BOOTLOADER:mx9-generic-bsp = "" - IMX_CORTEXM_DEMOS = "" IMX_CORTEXM_DEMOS:ccimx95 = "imx-m7-demos:do_deploy" @@ -200,6 +196,9 @@ do_deploy:ccimx8x () { ln -sf ${UBOOT_PREFIX}-${MACHINE}-${rev}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME} cd - done + + # Generate an imx-boot symlink to the last SOC_REVISION. This is required for WIC images + ln -sf ${UBOOT_PREFIX}-${MACHINE}-${rev}.bin-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/imx-boot } do_deploy[postfuncs] += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence_sign_imxboot', '', d)}" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc index 201352ad0..6029e3605 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc @@ -38,7 +38,11 @@ BUILD_UBOOT_SCRIPTS ?= "true" BOOTLOADER_IMAGE_RECIPE ?= "u-boot" LOCALVERSION ?= "" -inherit ${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'fsl-u-boot-localversion', '', d)} +inherit ${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'fsl-u-boot-localversion uuu_bootloader_tag', '', d)} + +# Disable u-boot tagging for imx8/9, as the boot image is imx-boot +UUU_BOOTLOADER:mx8-generic-bsp = "" +UUU_BOOTLOADER:mx9-generic-bsp = "" # Disable u-boot environment artifacts UBOOT_INITIAL_ENV = "" @@ -157,8 +161,7 @@ uboot_deploy_config:append() { # SD card image generation rm -f ${DEPLOYDIR}/${UBOOT_SYMLINK} fi - rm -f ${DEPLOYDIR}/${UBOOT_BINARY}-${type} \ - ${DEPLOYDIR}/${UBOOT_BINARY} + rm -f ${DEPLOYDIR}/${UBOOT_BINARY}-${type} ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} } uboot_deploy_spl_config:append() {