meta-digi: support WIC images for NXP-based modules
Notice that we need to create u-boot and imx-boot symlinks in the deploy directory, as they are required for the bootloader of the wic images. https://onedigi.atlassian.net/browse/DEL-9768 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
a02d48dc78
commit
d98b875ea5
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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)}"
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue