imx-boot: add support for ccimx91

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2024-08-21 18:45:21 +02:00
parent 2c9cc2c0ff
commit e8a99542f3
2 changed files with 68 additions and 7 deletions

View File

@ -0,0 +1,49 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Mon, 19 Aug 2024 17:07:33 +0200
Subject: [PATCH] imx91: soc.mak: capture commands output into a log file
This is later used to get the needed information for the signing of the
boot artifacts.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
iMX91/soc.mak | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iMX91/soc.mak b/iMX91/soc.mak
index b87a5bef79ce..3db3760c546d 100644
--- a/iMX91/soc.mak
+++ b/iMX91/soc.mak
@@ -1,4 +1,5 @@
MKIMG = ../mkimage_imx8
+MKIMAGE_LOG = "mkimage-$(firstword $(MAKECMDGOALS)).log"
CC ?= gcc
REV ?= A0
@@ -51,7 +52,7 @@ define append_container
@flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \
psize=$$((0x400 * $(2))); \
pad_cnt=$$(((flashbin_size + psize - 1) / psize)); \
- echo "append $(1) at $$((pad_cnt * $(2))) KB, psize=$$psize"; \
+ echo "append $(1) at $$((pad_cnt * $(2))) KB, psize=$$psize" | tee -a $(MKIMAGE_LOG); \
dd if=$(1) of=flash.bin bs=1K seek=$$((pad_cnt * $(2)));
endef
@@ -126,7 +127,7 @@ u-boot-atf-container.img: bl31.bin u-boot-hash.bin
-ap bl31.bin a55 $(ATF_LOAD_ADDR) \
-ap u-boot-hash.bin a55 $(UBOOT_LOAD_ADDR) \
-out u-boot-atf-container.img; \
- fi
+ fi | tee $(MKIMAGE_LOG)
u-boot-atf-container-spinand.img: bl31.bin u-boot-hash.bin
if [ -f $(TEE) ]; then \
@@ -202,7 +203,7 @@ endif
flash_singleboot: $(MKIMG) $(AHAB_IMG) $(SPL_A55_IMG) u-boot-atf-container.img
- ./$(MKIMG) -soc IMX9 -append $(AHAB_IMG) -c -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin
+ ./$(MKIMG) -soc IMX9 -append $(AHAB_IMG) -c -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin | tee -a $(MKIMAGE_LOG)
$(call append_container,u-boot-atf-container.img,1)
flash_singleboot_no_ahabfw: $(MKIMG) $(SPL_A55_IMG) u-boot-atf-container.img

View File

@ -8,28 +8,31 @@ SRC_URI:append:ccimx8m = " \
file://0003-LFU-573-1-imx8m-Generate-hash-of-FIT-FDT-structure-t.patch \
file://0004-LFU-573-2-imx8m-Reserve-new-IVT-CSF-for-FIT-FDT-sign.patch \
"
SRC_URI:append:ccimx9 = " \
file://0001-imx9-soc.mak-capture-commands-output-into-a-log-file.patch \
SRC_URI:append:ccimx91 = " \
file://0001-imx91-soc.mak-capture-commands-output-into-a-log-fil.patch \
"
SRC_URI:append:ccimx93 = " \
file://0001-imx9-soc.mak-capture-commands-output-into-a-log-file.patch \
file://0002-imx9-soc.mak-add-makefile-target-to-build-A0-revisio.patch \
"
# Use NXP's lf-6.1.55-2.2.0 release for ccimx93
SRC_URI:ccimx9 = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
SRCBRANCH:ccimx9 = "lf-6.1.55_2.2.0"
SRCREV:ccimx9 = "c4365450fb115d87f245df2864fee1604d97c06a"
SRCBRANCH:ccimx91 = "lf-6.6.23_2.0.0"
SRCBRANCH:ccimx93 = "lf-6.1.55_2.2.0"
SRCREV:ccimx91 = "ca5d6b2d3fd9ab15825b97f7ef6f1ce9a8644966"
SRCREV:ccimx93 = "c4365450fb115d87f245df2864fee1604d97c06a"
DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}"
# Do not tag imx-boot
UUU_BOOTLOADER = ""
UUU_BOOTLOADER_TAGGED = ""
BOOT_STAGING:mx9-generic-bsp = "${S}/iMX9"
BOOT_STAGING:mx91-generic-bsp = "${S}/iMX91"
BOOT_STAGING:mx93-generic-bsp = "${S}/iMX9"
# Add SOC family
SOC_FAMILY:mx91-generic-bsp = "mx93"
SOC_FAMILY:mx91-generic-bsp = "mx91"
REV_OPTION:ccimx93 = "REV=A1"
@ -52,6 +55,11 @@ compile_mx93:append:ccimx93() {
fi
}
compile_mx91() {
bbnote i.MX 91 boot binary build
compile_mx93
}
do_compile:append:ccimx8m() {
bbnote "building ${IMX_BOOT_SOC_TARGET} - print_fit_hab"
make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} print_fit_hab
@ -89,6 +97,10 @@ do_install:ccimx8x () {
done
}
deploy_mx91() {
deploy_mx93
}
generate_symlinks() {
# imx-boot recipe in meta-freescale supports *multiple* build configurations.
# We assume here only ONE build configuration for our platforms (otherwise