imx-boot: build ccimx8x images for B0 and C0 silicon revisions

Modify the imx-seco recipe so it deploys the B0 and C0 versions of the SECO
firmware, Then, modify the imx-boot recipe so it builds every possible
combination of:

    * RAM configuration
    * imx-boot target (with and without M4 demos)
    * Silicon revision

https://jira.digi.com/browse/DEL-7069

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2020-05-04 17:31:43 +02:00
parent 37071483f7
commit 3fbd38ca46
3 changed files with 38 additions and 21 deletions

View File

@ -26,6 +26,13 @@ SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
# Last one is the default (the one the symlinks point at)
RAM_CONFIGS = "1.2GHz_512MB_16bit 1.2GHz_1GB_16bit 1.2GHz_1GB_32bit 1.2GHz_2GB_32bit"
# The original variable used by NXP to store the mkimage "REV" parameter,
# REV_OPTION, has a format of "REV=X0". Since we are interested in building
# images for multiple revisions and using the revision in the imx-boot filename,
# use a new variable for our redefined compile, install and deploy functions in
# the imx-boot recipe.
SOC_REVISIONS = "B0 C0"
# Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx8_defconfig"

View File

@ -72,12 +72,14 @@ do_compile () {
ln -sf ${SC_FIRMWARE_NAME}-${ramc} scfw_tcm.bin
cd -
for target in ${IMXBOOT_TARGETS}; do
bbnote "building ${SOC_TARGET} - ${ramc} - ${REV_OPTION} ${target}"
make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target}
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target}
fi
SCFWBUILT="yes"
for rev in ${SOC_REVISIONS}; do
bbnote "building ${SOC_TARGET} - ${ramc} - REV=${rev} ${target}"
make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} REV=${rev} ${target}
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target}
fi
SCFWBUILT="yes"
done
done
rm ${BOOT_STAGING}/scfw_tcm.bin
rm ${BOOT_STAGING}/u-boot.bin
@ -122,7 +124,9 @@ do_install () {
else
for ramc in ${UBOOT_RAM_COMBINATIONS}; do
for target in ${IMXBOOT_TARGETS}; do
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target} ${D}/boot/
for rev in ${SOC_REVISIONS}; do
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} ${D}/boot/
done
done
done
fi
@ -156,21 +160,23 @@ do_deploy () {
ln -sf mkimage-${IMAGE_IMXBOOT_TARGET}.log mkimage.log
else
for ramc in ${UBOOT_RAM_COMBINATIONS}; do
IMAGE_IMXBOOT_TARGET=""
for target in ${IMXBOOT_TARGETS}; do
# Use first "target" as IMAGE_IMXBOOT_TARGET
if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then
IMAGE_IMXBOOT_TARGET="$target"
echo "Set boot target as $IMAGE_IMXBOOT_TARGET"
fi
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target} ${DEPLOYDIR}
for rev in ${SOC_REVISIONS}; do
IMAGE_IMXBOOT_TARGET=""
for target in ${IMXBOOT_TARGETS}; do
# Use first "target" as IMAGE_IMXBOOT_TARGET
if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then
IMAGE_IMXBOOT_TARGET="$target"
echo "Set boot target as $IMAGE_IMXBOOT_TARGET"
fi
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} ${DEPLOYDIR}
done
cd ${DEPLOYDIR}
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin
# Link to default bootable U-Boot filename. It gets overwritten
# on every loop so the only last RAM_CONFIG will survive.
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
cd -
done
cd ${DEPLOYDIR}
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin
# Link to default bootable U-Boot filename. It gets overwritten
# on every loop so the only last RAM_CONFIG will survive.
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
cd -
done
fi

View File

@ -4,3 +4,7 @@ SECO_FIRMWARE_NAME_mx8qxp = "mx8qxb0-ahab-container.img"
SECO_FIRMWARE_NAME_mx8qxpc0 = "mx8qxc0-ahab-container.img"
SECO_FIRMWARE_NAME_mx8phantomdxl = "mx8qxb0-ahab-container.img"
SECO_FIRMWARE_NAME_mx8dxl = "mx8dxla0-ahab-container.img"
# For the ccimx8x, we generate images for both the B0 and the C0 revisions of
# the i.MX8X silicon, so deploy both versions of the firmware.
SECO_FIRMWARE_NAME_ccimx8x = "mx8qx*0-ahab-container.img"