From 609028fe6654ec3306b82021e452c497ff2fe9c9 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 28 Jun 2023 13:20:01 +0200 Subject: [PATCH] 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 --- .../conf/machine/include/ccimx8x.inc | 6 --- .../imx-mkimage/imx-boot_1.0.bbappend | 44 +++++++------------ ...1.11.0.bb => digi-sc-firmware_1.11.0.1.bb} | 23 +++++----- 3 files changed, 27 insertions(+), 46 deletions(-) rename meta-digi-arm/recipes-bsp/digi-sc-firmware/{digi-sc-firmware_1.11.0.bb => digi-sc-firmware_1.11.0.1.bb} (57%) diff --git a/meta-digi-arm/conf/machine/include/ccimx8x.inc b/meta-digi-arm/conf/machine/include/ccimx8x.inc index 47eb22a8b..d7e0748cd 100644 --- a/meta-digi-arm/conf/machine/include/ccimx8x.inc +++ b/meta-digi-arm/conf/machine/include/ccimx8x.inc @@ -23,12 +23,6 @@ BOOTLOADER_SEEK_BOOT ?= "0" BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin" 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, # 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, 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 dc627945f..2afe1b837 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 @@ -21,9 +21,7 @@ compile_mx8x() { bbnote 8QX boot binary build cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} 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}-${ramc} ${BOOT_STAGING}/ - done + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/ for type in ${UBOOT_CONFIG}; do cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-${type}.bin ${BOOT_STAGING}/ done @@ -48,31 +46,23 @@ do_compile:ccimx8x () { fi # mkimage for i.MX8 for type in ${UBOOT_CONFIG}; do - RAM_SIZE="$(echo ${type} | sed -e 's,.*[a-z]\+\([0-9]\+[M|G]B\)$,\1,g')" - for ramc in ${RAM_CONFIGS}; do - if echo "${ramc}" | grep -qs "${RAM_SIZE}"; then - # Match U-Boot memory size and and SCFW memory configuration - cd ${BOOT_STAGING} - ln -sf u-boot-${type}.bin u-boot.bin - ln -sf ${SC_FIRMWARE_NAME}-${ramc} scfw_tcm.bin - cd - - for target in ${IMXBOOT_TARGETS}; do - for rev in ${SOC_REVISIONS}; do - bbnote "building ${IMX_BOOT_SOC_TARGET} - ${ramc} - REV=${rev} ${target}" - 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 - 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 + cd ${BOOT_STAGING} + ln -sf u-boot-${type}.bin u-boot.bin + cd - + for target in ${IMXBOOT_TARGETS}; do + for rev in ${SOC_REVISIONS}; do + bbnote "building ${IMX_BOOT_SOC_TARGET} - ${type} - REV=${rev} ${target}" + 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 + cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} + fi + SCFWBUILT="yes" + 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 # Check that SCFW was built at least once diff --git a/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.11.0.bb b/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.11.0.1.bb similarity index 57% rename from meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.11.0.bb rename to meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.11.0.1.bb index ed6649a55..753bb4c56 100644 --- a/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.11.0.bb +++ b/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.11.0.1.bb @@ -1,6 +1,6 @@ # Copyright (C) 2016 Freescale Semiconductor # 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" LICENSE = "Proprietary" @@ -11,8 +11,8 @@ inherit pkgconfig deploy SRC_URI = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz" -SRC_URI[md5sum] = "0d20c7bb41d53bb8c2688b259c7ddfd4" -SRC_URI[sha256sum] = "36a02b956c288dad6ce6ecb2b13a4e6fb2983fd5c39cab5028ae9a7dafe4a4c9" +SRC_URI[md5sum] = "010415833c96c19e3f7210854374408c" +SRC_URI[sha256sum] = "33ef40c46d062d2e509bbc45164335d3a2f06eb7548747fe5fc7add5aa4c15ac" S = "${WORKDIR}/${PN}-${PV}" @@ -23,22 +23,19 @@ SYSROOT_DIRS += "/boot" do_install () { install -d ${D}/boot - for ramc in ${RAM_CONFIGS}; do - install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${D}/boot/ - done + install -m 0644 ${S}/${SC_FIRMWARE_NAME} ${D}/boot/ + } BOOT_TOOLS = "imx-boot-tools" do_deploy () { install -d ${DEPLOYDIR}/${BOOT_TOOLS} - for ramc in ${RAM_CONFIGS}; do - install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${DEPLOYDIR}/${BOOT_TOOLS}/ - cd ${DEPLOYDIR}/${BOOT_TOOLS}/ - rm -f ${symlink_name}-${ramc} - ln -sf ${SC_FIRMWARE_NAME}-${ramc} ${symlink_name}-${ramc} - cd - - done + install -m 0644 ${S}/${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/ + cd ${DEPLOYDIR}/${BOOT_TOOLS}/ + rm -f ${symlink_name} + ln -sf ${SC_FIRMWARE_NAME} ${symlink_name} + cd - } addtask deploy after do_install