hardknott: imx-boot: explicitly set IMX_BOOT_SOC_TARGET and ATF_PLATFORM

These variables were originally set in NXP's recipes, but they moved their
definitions to each platform's configuration file. Set the appropriate values
where needed. While at it, replace every mention of the SOC_TARGET variable
with its new name, IMX_BOOT_SOC_TARGET.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2021-12-22 15:48:57 +01:00
parent 4d483a665e
commit 99a72aa189
4 changed files with 18 additions and 8 deletions

View File

@ -19,6 +19,8 @@ SPL_BINARY = "spl/u-boot-spl.bin"
# Set u-boot DTB # Set u-boot DTB
UBOOT_DTB_NAME = "ccimx8mm-dvk.dtb" UBOOT_DTB_NAME = "ccimx8mm-dvk.dtb"
ATF_PLATFORM = "imx8mm"
KERNEL_DEVICETREE ?= " \ KERNEL_DEVICETREE ?= " \
digi/ccimx8mm-dvk.dtb \ digi/ccimx8mm-dvk.dtb \
digi/_ov_board_flexspi_ccimx8m-dvk.dtbo \ digi/_ov_board_flexspi_ccimx8m-dvk.dtbo \

View File

@ -19,6 +19,8 @@ SPL_BINARY = "spl/u-boot-spl.bin"
# Set u-boot DTB # Set u-boot DTB
UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb" UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb"
ATF_PLATFORM = "imx8mn"
KERNEL_DEVICETREE ?= " \ KERNEL_DEVICETREE ?= " \
digi/ccimx8mn-dvk.dtb \ digi/ccimx8mn-dvk.dtb \
digi/_ov_board_flexspi_ccimx8m-dvk.dtbo \ digi/_ov_board_flexspi_ccimx8m-dvk.dtbo \

View File

@ -34,6 +34,8 @@ RAM_CONFIGS = "512MB_16bit 1GB_16bit 1GB_32bit 2GB_32bit"
# the imx-boot recipe. # the imx-boot recipe.
SOC_REVISIONS = "B0 C0" SOC_REVISIONS = "B0 C0"
ATF_PLATFORM = "imx8qx"
# Linux kernel configuration # Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx8_defconfig" KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx8_defconfig"

View File

@ -97,6 +97,10 @@ SRC_URI_append_ccimx8m = " file://0001-imx8m-soc.mak-preserve-dtbs-after-build.p
IMX_EXTRA_FIRMWARE_ccimx8x = "digi-sc-firmware imx-seco" IMX_EXTRA_FIRMWARE_ccimx8x = "digi-sc-firmware imx-seco"
IMX_BOOT_SOC_TARGET_mx8mm = "iMX8MM"
IMX_BOOT_SOC_TARGET_mx8mn = "iMX8MN"
IMX_BOOT_SOC_TARGET_mx8x = "iMX8QX"
DEPENDS_append_ccimx8x = " coreutils-native" DEPENDS_append_ccimx8x = " coreutils-native"
DEPENDS_append_mx8 += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}" DEPENDS_append_mx8 += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}"
@ -179,7 +183,7 @@ do_compile () {
fi fi
# mkimage for i.MX8 # mkimage for i.MX8
for type in ${UBOOT_CONFIG}; do for type in ${UBOOT_CONFIG}; do
if [ "${SOC_TARGET}" = "iMX8QX" ]; then if [ "${IMX_BOOT_SOC_TARGET}" = "iMX8QX" ]; then
RAM_SIZE="$(echo ${type} | sed -e 's,.*[a-z]\+\([0-9]\+[M|G]B\)$,\1,g')" RAM_SIZE="$(echo ${type} | sed -e 's,.*[a-z]\+\([0-9]\+[M|G]B\)$,\1,g')"
for ramc in ${RAM_CONFIGS}; do for ramc in ${RAM_CONFIGS}; do
if echo "${ramc}" | grep -qs "${RAM_SIZE}"; then if echo "${ramc}" | grep -qs "${RAM_SIZE}"; then
@ -190,8 +194,8 @@ do_compile () {
cd - cd -
for target in ${IMXBOOT_TARGETS}; do for target in ${IMXBOOT_TARGETS}; do
for rev in ${SOC_REVISIONS}; do for rev in ${SOC_REVISIONS}; do
bbnote "building ${SOC_TARGET} - ${ramc} - REV=${rev} ${target}" bbnote "building ${IMX_BOOT_SOC_TARGET} - ${ramc} - REV=${rev} ${target}"
make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} REV=${rev} ${target} > ${S}/mkimage-${target}.log 2>&1 make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} REV=${rev} ${target} > ${S}/mkimage-${target}.log 2>&1
if [ -e "${BOOT_STAGING}/flash.bin" ]; then if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target}
fi fi
@ -208,21 +212,21 @@ do_compile () {
else else
# mkimage for i.MX8M # mkimage for i.MX8M
for target in ${IMXBOOT_TARGETS}; do for target in ${IMXBOOT_TARGETS}; do
bbnote "building ${SOC_TARGET} - ${REV_OPTION} ${target}" bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}"
make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target} > ${S}/mkimage-${target}.log 2>&1 make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target} > ${S}/mkimage-${target}.log 2>&1
if [ -e "${BOOT_STAGING}/flash.bin" ]; then if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}.bin-${target} cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}.bin-${target}
fi fi
done done
# Log HAB FIT information # Log HAB FIT information
bbnote "building ${SOC_TARGET} - print_fit_hab" bbnote "building ${IMX_BOOT_SOC_TARGET} - print_fit_hab"
make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} print_fit_hab > ${S}/mkimage-print_fit_hab.log 2>&1 make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} print_fit_hab > ${S}/mkimage-print_fit_hab.log 2>&1
fi fi
done done
# Check that SCFW was built at least once # Check that SCFW was built at least once
if [ "${SOC_TARGET}" = "iMX8QX" and "${SCFWBUILT}" != "yes" ]; then if [ "${IMX_BOOT_SOC_TARGET}" = "iMX8QX" and "${SCFWBUILT}" != "yes" ]; then
bbfatal "SCFW was not built!" bbfatal "SCFW was not built!"
fi fi
} }