From f8ba05d065c78c04153119f38df9237988e7b23a Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 10 Oct 2018 12:47:04 +0200 Subject: [PATCH] imx-boot, imx-sc-firmware: adapt recipes for step B0 of the i.MX8X CPU These adaptations include changing the mkimage targets and removing any handling of the DCD files, since they are now included in the SCFW. Note that these changes break support for step A0 of the silicon. The md5sum of the imx-sc-firmware tarball will be updated once the step B0 CPUs are ready. https://jira.digi.com/browse/DEL-6158 Signed-off-by: Gabriel Valcazar --- .../recipes-bsp/imx-mkimage/imx-boot_0.2.bb | 17 ++++------------- .../imx-sc-firmware/imx-sc-firmware_0.7.bb | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bb b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bb index b3e817eeb..f2e4f26c0 100644 --- a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bb +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bb @@ -71,8 +71,6 @@ DCD_NAME ?= "imx8qm_dcd.cfg.tmp" DCD_NAME_mx8qm = "imx8qm_dcd.cfg.tmp" DCD_NAME_mx8qxp = "imx8qx_dcd.cfg.tmp" -DCD_SRC_NAME = "imx8qx_dcd_1.2GHz.cfg" - UBOOT_NAME = "u-boot-${MACHINE}.bin" BOOT_CONFIG_MACHINE = "${BOOT_NAME}" @@ -92,9 +90,6 @@ IMXBOOT_TARGETS ?= "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi' IMXBOOT_TARGETS_mx8qxp = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \ 'flash_all flash', d), d)}" -IMXBOOT_TARGETS_ccimx8x = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi_a0', \ - bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand_a0', \ - 'flash_dcd_a0 flash_multi_cores_a0', d), d)}" IMXBOOT_TARGETS_imx8qxpddr3arm2 = "flash_ddr3_dcd_a0" S = "${WORKDIR}/git" @@ -129,10 +124,11 @@ do_compile () { cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin ${S}/${SOC_TARGET}/m40_tcm.bin cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin ${S}/${SOC_TARGET}/CM4.bin cp ${DEPLOY_DIR_IMAGE}/ahab-container.img ${S}/${SOC_TARGET}/ - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${S}/${SOC_TARGET}/scfw_tcm.bin cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${S}/${SOC_TARGET}/bl31.bin for type in ${UBOOT_CONFIG}; do + RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_NAME}-${type} ${S}/${SOC_TARGET}/u-boot.bin-${type} + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${S}/${SOC_TARGET}/scfw_tcm.bin-${RAM_SIZE} done fi @@ -146,7 +142,7 @@ do_compile () { cd ${S}/${SOC_TARGET} ln -sf u-boot.bin-${type} u-boot.bin RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" - ln -sf ${DCD_SRC_NAME}-${RAM_SIZE} ${DCD_SRC_NAME} + ln -sf scfw_tcm.bin-${RAM_SIZE} scfw_tcm.bin cd - for target in ${IMXBOOT_TARGETS}; do echo "building ${SOC_TARGET} - ${type} - ${target}" @@ -155,8 +151,7 @@ do_compile () { cp ${S}/${SOC_TARGET}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${type}.bin-${target} fi done - cp ${S}/${SOC_TARGET}/${DCD_NAME} ${S}/${SOC_TARGET}/${DCD_NAME}-${type} - rm ${S}/${SOC_TARGET}/${DCD_SRC_NAME} + rm ${S}/${SOC_TARGET}/scfw_tcm.bin rm ${S}/${SOC_TARGET}/u-boot.bin # Remove u-boot-atf.bin so it gets generated with the next iteration's U-Boot rm ${S}/${SOC_TARGET}/u-boot-atf.bin @@ -194,10 +189,6 @@ do_deploy () { install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} else - # the DCD only needs to get copied when using an A0 CPU - for type in ${UBOOT_CONFIG}; do - install -m 0644 ${S}/${SOC_TARGET}/${DCD_NAME}-${type} ${DEPLOYDIR}/${DEPLOYDIR_IMXBOOT} - done install -m 0644 ${S}/${SOC_TARGET}/ahab-container.img ${DEPLOYDIR}/${DEPLOYDIR_IMXBOOT} install -m 0644 ${S}/${SOC_TARGET}/m40_tcm.bin ${DEPLOYDIR}/${DEPLOYDIR_IMXBOOT} install -m 0644 ${S}/${SOC_TARGET}/CM4.bin ${DEPLOYDIR}/${DEPLOYDIR_IMXBOOT} diff --git a/meta-digi-arm/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.7.bb b/meta-digi-arm/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.7.bb index 37f16775f..d2d78432c 100644 --- a/meta-digi-arm/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.7.bb +++ b/meta-digi-arm/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.7.bb @@ -23,18 +23,24 @@ SYSROOT_DIRS += "/boot" do_install () { install -d ${D}/boot - install -m 0644 ${S}/${SC_FIRMWARE_NAME} ${D}/boot/ + for type in ${UBOOT_CONFIG}; do + RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" + install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${D}/boot/ + done } BOOT_TOOLS = "imx-boot-tools" do_deploy () { install -d ${DEPLOYDIR}/${BOOT_TOOLS} - 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 - + for type in ${UBOOT_CONFIG}; do + RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" + install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${DEPLOYDIR}/${BOOT_TOOLS}/ + cd ${DEPLOYDIR}/${BOOT_TOOLS}/ + rm -f ${symlink_name}-${RAM_SIZE} + ln -sf ${SC_FIRMWARE_NAME}-${RAM_SIZE} ${symlink_name}-${RAM_SIZE} + cd - + done } addtask deploy after do_install