digi-sc-firmware: update to v1.11.0.1

This update includes automatic RAM configuration detection, and only one SCFW
binary is needed for all ccimx8x variants. Adapt the imx-boot recipe
accordingly.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2023-06-28 13:20:01 +02:00
parent 6feaa6e3c0
commit 609028fe66
3 changed files with 27 additions and 46 deletions

View File

@ -23,12 +23,6 @@ BOOTLOADER_SEEK_BOOT ?= "0"
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin" BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}" SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
# RAM variants
# This determines the number of different DCD files, and thus the number of
# different U-Boot binaries required.
# Last one is the default (the one the symlinks point at)
RAM_CONFIGS = "512MB_16bit 1GB_16bit 1GB_32bit 2GB_32bit"
# The original variable used by NXP to store the mkimage "REV" parameter, # 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 # 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, # images for multiple revisions and using the revision in the imx-boot filename,

View File

@ -21,9 +21,7 @@ compile_mx8x() {
bbnote 8QX boot binary build bbnote 8QX boot binary build
cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
for ramc in ${RAM_CONFIGS}; do cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}-${ramc} ${BOOT_STAGING}/
done
for type in ${UBOOT_CONFIG}; do for type in ${UBOOT_CONFIG}; do
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-${type}.bin ${BOOT_STAGING}/ cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-${type}.bin ${BOOT_STAGING}/
done done
@ -48,31 +46,23 @@ do_compile:ccimx8x () {
fi fi
# mkimage for i.MX8 # mkimage for i.MX8
for type in ${UBOOT_CONFIG}; do for type in ${UBOOT_CONFIG}; do
RAM_SIZE="$(echo ${type} | sed -e 's,.*[a-z]\+\([0-9]\+[M|G]B\)$,\1,g')" cd ${BOOT_STAGING}
for ramc in ${RAM_CONFIGS}; do ln -sf u-boot-${type}.bin u-boot.bin
if echo "${ramc}" | grep -qs "${RAM_SIZE}"; then cd -
# Match U-Boot memory size and and SCFW memory configuration for target in ${IMXBOOT_TARGETS}; do
cd ${BOOT_STAGING} for rev in ${SOC_REVISIONS}; do
ln -sf u-boot-${type}.bin u-boot.bin bbnote "building ${IMX_BOOT_SOC_TARGET} - ${type} - REV=${rev} ${target}"
ln -sf ${SC_FIRMWARE_NAME}-${ramc} scfw_tcm.bin make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} REV=${rev} ${target} > ${S}/mkimage-${target}.log 2>&1
cd - if [ -e "${BOOT_STAGING}/flash.bin" ]; then
for target in ${IMXBOOT_TARGETS}; do cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target}
for rev in ${SOC_REVISIONS}; do fi
bbnote "building ${IMX_BOOT_SOC_TARGET} - ${ramc} - REV=${rev} ${target}" SCFWBUILT="yes"
make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} REV=${rev} ${target} > ${S}/mkimage-${target}.log 2>&1 done
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
# Remove u-boot-atf.bin and u-boot-hash.bin so they get generated with the next iteration's U-Boot
rm ${BOOT_STAGING}/u-boot-atf.bin
rm ${BOOT_STAGING}/u-boot-hash.bin
fi
done done
rm ${BOOT_STAGING}/u-boot.bin
# Remove u-boot-atf.bin and u-boot-hash.bin so they get generated with the next iteration's U-Boot
rm ${BOOT_STAGING}/u-boot-atf.bin
rm ${BOOT_STAGING}/u-boot-hash.bin
done done
# Check that SCFW was built at least once # Check that SCFW was built at least once

View File

@ -1,6 +1,6 @@
# Copyright (C) 2016 Freescale Semiconductor # Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2018 NXP # Copyright 2017-2018 NXP
# Copyright (C) 2018-2021 Digi International. # Copyright (C) 2018-2023 Digi International.
DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms" DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms"
LICENSE = "Proprietary" LICENSE = "Proprietary"
@ -11,8 +11,8 @@ inherit pkgconfig deploy
SRC_URI = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz" SRC_URI = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz"
SRC_URI[md5sum] = "0d20c7bb41d53bb8c2688b259c7ddfd4" SRC_URI[md5sum] = "010415833c96c19e3f7210854374408c"
SRC_URI[sha256sum] = "36a02b956c288dad6ce6ecb2b13a4e6fb2983fd5c39cab5028ae9a7dafe4a4c9" SRC_URI[sha256sum] = "33ef40c46d062d2e509bbc45164335d3a2f06eb7548747fe5fc7add5aa4c15ac"
S = "${WORKDIR}/${PN}-${PV}" S = "${WORKDIR}/${PN}-${PV}"
@ -23,22 +23,19 @@ SYSROOT_DIRS += "/boot"
do_install () { do_install () {
install -d ${D}/boot install -d ${D}/boot
for ramc in ${RAM_CONFIGS}; do install -m 0644 ${S}/${SC_FIRMWARE_NAME} ${D}/boot/
install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${D}/boot/
done
} }
BOOT_TOOLS = "imx-boot-tools" BOOT_TOOLS = "imx-boot-tools"
do_deploy () { do_deploy () {
install -d ${DEPLOYDIR}/${BOOT_TOOLS} install -d ${DEPLOYDIR}/${BOOT_TOOLS}
for ramc in ${RAM_CONFIGS}; do install -m 0644 ${S}/${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/
install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${DEPLOYDIR}/${BOOT_TOOLS}/ cd ${DEPLOYDIR}/${BOOT_TOOLS}/
cd ${DEPLOYDIR}/${BOOT_TOOLS}/ rm -f ${symlink_name}
rm -f ${symlink_name}-${ramc} ln -sf ${SC_FIRMWARE_NAME} ${symlink_name}
ln -sf ${SC_FIRMWARE_NAME}-${ramc} ${symlink_name}-${ramc} cd -
cd -
done
} }
addtask deploy after do_install addtask deploy after do_install