freescale-layer: imx-boot: sync with meta-freescale/meta-imx

Since our recipes handle native builds differently, port the latest version
of the recipes from meta-freescale to our layer while keeping our
customizations. Use the same revision for all platforms.

Adapt patches for lf-6.6.23-2.0.0 release and add the "Upstream-Status" tag to
them to avoid QA errors.

For now, use the imx-boot recipe from meta-freescale, but there's a chance we
might need to port the version of the recipe in meta-imx.

https://onedigi.atlassian.net/browse/DEL-9011
https://onedigi.atlassian.net/browse/DEL-9081

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2024-05-13 15:25:06 +02:00
parent 694cab41ff
commit 554729c92d
11 changed files with 95 additions and 482 deletions

View File

@ -1,6 +1,6 @@
From 70b7d067ca0f6659e4f842f8d841714a26bf9d8c Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Thu, 21 Oct 2021 08:53:38 +0000
From 3e0f78a4efeac4ea0651ac763099d780447a18b4 Mon Sep 17 00:00:00 2001
From: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Date: Wed, 19 Jul 2023 18:34:32 +0300
Subject: [PATCH] iMX8M: soc.mak: use native mkimage from sysroot
mkimage tool is provided as a part of sysroot from Yocto build. Current
@ -13,10 +13,12 @@ build.
Use it from the build sysroot, and do not pull the local version of it.
Upstream-Status: Inappropriate [OE-specific]
Reinjected the original patch from Andrey Zhizhikin <andrey.z@gmail.com>
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
---
iMX8M/soc.mak | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
@ -24,52 +26,52 @@ Index: git/iMX8M/soc.mak
===================================================================
--- git.orig/iMX8M/soc.mak
+++ git/iMX8M/soc.mak
@@ -149,7 +149,7 @@ u-boot.itb: $(dtb)
@@ -160,7 +160,7 @@ u-boot.itb: $(dtb) $(supp_dtbs)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) > u-boot.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
+ mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb) $(supp_dtbs)
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) $(supp_dtbs) > u-boot.its
- ./mkimage_uboot -E -p $(FIT_EXTERNAL_POSITION) -f u-boot.its u-boot.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot.its u-boot.itb
@rm -f u-boot.its $(dtb)
dtb_ddr3l = valddr3l.dtb
@@ -161,7 +161,7 @@ u-boot-ddr3l.itb: $(dtb_ddr3l)
@@ -172,7 +172,7 @@ u-boot-ddr3l.itb: $(dtb_ddr3l) $(supp_dt
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l) > u-boot-ddr3l.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l) $(supp_dtbs)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l) $(supp_dtbs) > u-boot-ddr3l.its
- ./mkimage_uboot -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr3l.its u-boot-ddr3l.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr3l.its u-boot-ddr3l.itb
@rm -f u-boot.its $(dtb_ddr3l)
dtb_ddr3l_evk = evkddr3l.dtb
@@ -173,7 +173,7 @@ u-boot-ddr3l-evk.itb: $(dtb_ddr3l_evk)
@@ -184,7 +184,7 @@ u-boot-ddr3l-evk.itb: $(dtb_ddr3l_evk) $
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l_evk) > u-boot-ddr3l-evk.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l_evk) $(supp_dtbs)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l_evk) $(supp_dtbs) > u-boot-ddr3l-evk.its
- ./mkimage_uboot -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
@rm -f u-boot.its $(dtb_ddr3l_evk)
dtb_ddr4 = valddr4.dtb
@@ -185,7 +185,7 @@ u-boot-ddr4.itb: $(dtb_ddr4)
@@ -196,7 +196,7 @@ u-boot-ddr4.itb: $(dtb_ddr4) $(supp_dtbs
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4) > u-boot-ddr4.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4) $(supp_dtbs)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4) $(supp_dtbs) > u-boot-ddr4.its
- ./mkimage_uboot -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr4.its u-boot-ddr4.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr4.its u-boot-ddr4.itb
@rm -f u-boot.its $(dtb_ddr4)
dtb_ddr4_evk = evkddr4.dtb
@@ -197,7 +197,7 @@ u-boot-ddr4-evk.itb: $(dtb_ddr4_evk)
@@ -208,7 +208,7 @@ u-boot-ddr4-evk.itb: $(dtb_ddr4_evk) $(s
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4_evk) > u-boot-ddr4-evk.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk) $(supp_dtbs)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4_evk) $(supp_dtbs) > u-boot-ddr4-evk.its
- ./mkimage_uboot -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
@rm -f u-boot.its $(dtb_ddr4_evk)
ifeq ($(HDMI),yes)
@@ -343,7 +343,6 @@ nightly :
@@ -358,7 +358,6 @@ nightly :
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-$(PLAT)-evk.dtb -O fsl-$(PLAT)-evk.dtb
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_hdmi_imx8m.bin -O signed_hdmi_imx8m.bin
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_dp_imx8m.bin -O signed_dp_imx8m.bin

View File

@ -14,31 +14,35 @@ file pointed at by the dtbs variable does no longer exist.
Remove the file removal to avoid this.
Upstream-Status: Inappropriate [digi specific]
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
iMX8M/soc.mak | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
iMX8M/soc.mak | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
index 0a69b7167c5c..4a0cd4e59360 100644
index 6751759..5a96614 100644
--- a/iMX8M/soc.mak
+++ b/iMX8M/soc.mak
@@ -154,7 +154,7 @@ u-boot.itb: $(dtb)
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) > u-boot.its
mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
@@ -161,7 +161,7 @@ u-boot.itb: $(dtb) $(supp_dtbs)
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb) $(supp_dtbs)
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) $(supp_dtbs) > u-boot.its
mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot.its u-boot.itb
- @rm -f u-boot.its $(dtb)
+ @rm -f u-boot.its
dtb_ddr3l = valddr3l.dtb
$(dtb_ddr3l):
@@ -322,7 +322,6 @@ print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb)
@@ -329,7 +329,8 @@ print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb) $(supp_dtbs)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb) $(supp_dtbs)
FIT_DATA_POS=$(FIT_EXTERNAL_POSITION) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb) $(supp_dtbs)
- @rm -f $(dtb)
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
+ TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk) $(supp_dtbs)
./$(PAD_IMAGE) $(TEE)

View File

@ -5,22 +5,24 @@ Subject: [PATCH] imx9: 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.
Upstream-Status: Inappropriate [digi specific]
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
iMX9/soc.mak | 7 ++++---
iMX93/soc.mak | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iMX9/soc.mak b/iMX9/soc.mak
index b17db6b7ca8c..c4bcac4e42cd 100644
--- a/iMX9/soc.mak
+++ b/iMX9/soc.mak
diff --git a/iMX93/soc.mak b/iMX93/soc.mak
index 560d38e..6339d80 100644
--- a/iMX93/soc.mak
+++ b/iMX93/soc.mak
@@ -1,4 +1,5 @@
MKIMG = ../mkimage_imx8
+MKIMAGE_LOG = "mkimage-$(firstword $(MAKECMDGOALS)).log"
CC ?= gcc
REV ?= A0
@@ -110,7 +111,7 @@ define append_container
REV ?= A1
@@ -58,7 +59,7 @@ define append_container
@flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \
psize=$$((0x400 * $(2))); \
pad_cnt=$$(((flashbin_size + psize - 1) / psize)); \
@ -29,7 +31,7 @@ index b17db6b7ca8c..c4bcac4e42cd 100644
dd if=$(1) of=flash.bin bs=1K seek=$$((pad_cnt * $(2)));
endef
@@ -209,7 +210,7 @@ u-boot-atf-container.img: bl31.bin u-boot-hash.bin
@@ -138,7 +139,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; \
@ -38,12 +40,12 @@ index b17db6b7ca8c..c4bcac4e42cd 100644
u-boot-atf-container-spinand.img: bl31.bin u-boot-hash.bin
if [ -f $(TEE) ]; then \
@@ -286,7 +287,7 @@ endif
@@ -214,7 +215,7 @@ endif
flash_singleboot: $(MKIMG) $(AHAB_IMG) $(SPL_A55_IMG) u-boot-atf-container.img $(OEI_A55_DDR)
./$(MKIMG) -soc IMX9 -append $(AHAB_IMG) -c $(OEI_OPT_A55) \
- -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin
+ -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin | tee -a $(MKIMAGE_LOG)
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 $(OEI_A55_DDR)
flash_singleboot_no_ahabfw: $(MKIMG) $(SPL_A55_IMG) u-boot-atf-container.img

View File

@ -5,13 +5,15 @@ Subject: [PATCH] imx8m: 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.
Upstream-Status: Inappropriate [digi specific]
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
iMX8M/soc.mak | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
index 4a0cd4e59360..6b3a01f2b790 100644
index 5a96614..5901d5e 100644
--- a/iMX8M/soc.mak
+++ b/iMX8M/soc.mak
@@ -1,5 +1,6 @@
@ -21,7 +23,7 @@ index 4a0cd4e59360..6b3a01f2b790 100644
CC ?= gcc
CFLAGS ?= -O2 -Wall -std=c99 -static
@@ -274,7 +275,7 @@ endif
@@ -281,7 +282,7 @@ endif
flash_evk_no_hdmi: $(MKIMG) u-boot-spl-ddr.bin u-boot.itb
@ -30,16 +32,18 @@ index 4a0cd4e59360..6b3a01f2b790 100644
flash_evk_no_hdmi_dual_bootloader: $(MKIMG) u-boot-spl-ddr.bin u-boot.itb
./mkimage_imx8 -version $(VERSION) -fit -loader u-boot-spl-ddr.bin $(SPL_LOAD_ADDR) -out $(OUTIMG)
@@ -318,10 +319,10 @@ flash_dp_spl_uboot: flash_dp_evk
@@ -325,12 +326,12 @@ flash_dp_spl_uboot: flash_dp_evk
flash_spl_uboot: flash_evk_no_hdmi
print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb)
print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb) $(supp_dtbs)
- ./$(PAD_IMAGE) $(TEE)
+ ./$(PAD_IMAGE) $(TEE) 2>&1 | tee $(MKIMAGE_LOG)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb) $(supp_dtbs)
FIT_DATA_POS=$(FIT_EXTERNAL_POSITION) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb) $(supp_dtbs)
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
- TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
+ { echo $@; TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb) 2>&1; } | tee -a $(MKIMAGE_LOG)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk) $(supp_dtbs)
./$(PAD_IMAGE) $(TEE)

View File

@ -2,24 +2,25 @@ From: Javier Viguera <javier.viguera@digi.com>
Date: Thu, 2 Nov 2023 15:03:13 +0100
Subject: [PATCH] imx9: soc.mak: add makefile target to build A0 revision
Upstream-Status: Inappropriate [digi specific]
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
iMX9/soc.mak | 5 +++++
1 file changed, 5 insertions(+)
iMX93/soc.mak | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/iMX9/soc.mak b/iMX9/soc.mak
index c4bcac4e42cd..4f741451d1d0 100644
--- a/iMX9/soc.mak
+++ b/iMX9/soc.mak
@@ -290,6 +290,11 @@ flash_singleboot: $(MKIMG) $(AHAB_IMG) $(SPL_A55_IMG) u-boot-atf-container.img $
-ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin | tee -a $(MKIMAGE_LOG)
diff --git a/iMX93/soc.mak b/iMX93/soc.mak
index 6339d80..dc739c2 100644
--- a/iMX93/soc.mak
+++ b/iMX93/soc.mak
@@ -218,6 +218,10 @@ 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 | tee -a $(MKIMAGE_LOG)
$(call append_container,u-boot-atf-container.img,1)
+flash_singleboot_a0: $(MKIMG) mx93a0-ahab-container.img $(SPL_A55_IMG) u-boot-atf-container.img $(OEI_A55_DDR)
+ ./$(MKIMG) -soc IMX9 -append mx93a0-ahab-container.img -c $(OEI_OPT_A55) \
+ -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin | tee -a $(MKIMAGE_LOG)
+flash_singleboot_a0: $(MKIMG) mx93a0-ahab-container.img $(SPL_A55_IMG) u-boot-atf-container.img
+ ./$(MKIMG) -soc IMX9 -append mx93a0-ahab-container.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 $(OEI_A55_DDR)
./$(MKIMG) -soc IMX9 -c $(OEI_OPT_A55) \
-ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin
flash_singleboot_no_ahabfw: $(MKIMG) $(SPL_A55_IMG) u-boot-atf-container.img
./$(MKIMG) -soc IMX9 -c -ap $(SPL_A55_IMG) a55 $(SPL_LOAD_ADDR) -out flash.bin
$(call append_container,u-boot-atf-container.img,1)

View File

@ -1,207 +0,0 @@
From: Ye Li <ye.li@nxp.com>
Date: Mon, 3 Jul 2023 17:31:32 +0800
Subject: [PATCH] LFU-573-1 imx8m: Generate hash of FIT FDT structure to SPL
image
Generate the hash of FIT FDT structure by SHA256 and append it
to end of SPL image (after DDR FW).
SPL will get the hash from the position to verify the FIT FDT
structure in loaded FIT image.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 2f2d426f03ebbcf7a9c28cf53680cd5777e70ea1)
---
iMX8M/mkimage_imx8.c | 109 ++++++++++++++++++++++++++++++++++++++++++-
iMX8M/soc.mak | 14 ++++--
2 files changed, 117 insertions(+), 6 deletions(-)
diff --git a/iMX8M/mkimage_imx8.c b/iMX8M/mkimage_imx8.c
index 54828d1..f8484d0 100644
--- a/iMX8M/mkimage_imx8.c
+++ b/iMX8M/mkimage_imx8.c
@@ -366,6 +366,31 @@ copy_file (int ifd, const char *datafile, int pad, int offset, int datafile_offs
(void) close (dfd);
}
+static void append_data(char *filename, uint8_t *data, int size)
+{
+ int dfd, ret;
+
+ if ((dfd = open(filename, O_RDWR|O_BINARY)) < 0) {
+ fprintf (stderr, "Can't open %s: %s\n",
+ filename, strerror(errno));
+ exit (EXIT_FAILURE);
+ }
+
+ ret = lseek(dfd, 0, SEEK_END);
+ if (ret < 0) {
+ fprintf(stderr, "%s: lseek error %s\n",
+ __func__, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ if (write(dfd, data, size) != size) {
+ fprintf (stderr, "Write error %s\n",
+ strerror(errno));
+ exit (EXIT_FAILURE);
+ }
+ (void) close (dfd);
+}
+
+
enum imximage_fld_types {
CFG_INVALID = -1,
CFG_COMMAND,
@@ -861,6 +886,77 @@ void generate_sld_with_ivt(char * input_file, uint32_t ep, char *out_file)
close(input_fd);
}
+#define HASH_MAX_LEN 32
+static void calc_fitimage_hash(char* filename, uint8_t *hash)
+{
+ int sld_fd;
+ FILE *fp = NULL;
+ char sha_command[512];
+ char *digest_type = "sha256sum";
+ char hash_char[2 * HASH_MAX_LEN + 1];
+ int digest_length = 64;
+
+ uimage_header_t image_header;
+ uint32_t fit_size;
+
+ sld_fd = open(filename, O_RDONLY | O_BINARY);
+ if (sld_fd < 0) {
+ fprintf(stderr, "%s: Can't open: %s\n",
+ filename, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+ if (read(sld_fd, (char *)&image_header, sizeof(uimage_header_t)) != sizeof(uimage_header_t)) {
+ fprintf (stderr, "generate_ivt_for_fit read failed: %s\n",
+ strerror(errno));
+ exit (EXIT_FAILURE);
+ }
+
+ if (be32_to_cpu(image_header.ih_magic) != FDT_MAGIC){
+ fprintf (stderr, "generate_ivt_for_fit error: not a FIT file\n");
+ exit (EXIT_FAILURE);
+ }
+
+ fit_size = fdt_totalsize(&image_header);
+
+ fprintf(stderr, "fit_size: %u\n", fit_size);
+
+ sprintf(sha_command, "dd if=\'%s\' of=tmp_pad bs=%d count=1;\
+ %s tmp_pad; rm -f tmp_pad;",
+ filename, fit_size, digest_type);
+
+ memset(hash, 0, HASH_MAX_LEN);
+
+ fp = popen(sha_command, "r");
+ if (fp == NULL) {
+ fprintf(stderr, "Failed to run command hash\n" );
+ exit(EXIT_FAILURE);
+ }
+
+ if(fgets(hash_char, digest_length + 1, fp) == NULL) {
+ fprintf(stderr, "Failed to hash file: %s\n", filename);
+ exit(EXIT_FAILURE);
+ }
+
+ for(int i = 0; i < strlen(hash_char)/2; i++){
+ sscanf(hash_char + 2*i, "%02hhx", &hash[i]);
+ }
+
+ pclose(fp);
+ (void) close (sld_fd);
+}
+
+void dump_fit_hash(uint8_t *hash, int size)
+{
+ int i;
+
+ fprintf(stderr, "FIT hash: ");
+ for (i = 0; i < size; i++) {
+ fprintf(stderr, "%x", hash[i]);
+ }
+ fprintf(stderr, "\n");
+}
+
/* Return this IVT offset in the final output file */
int generate_ivt_for_fit(int fd, int fit_offset, uint32_t ep, uint32_t *fit_load_addr)
{
@@ -943,6 +1039,8 @@ int main(int argc, char **argv)
uimage_header_t uimage_hdr;
uint32_t version = ROM_V1;
+ uint8_t fit_hash[HASH_MAX_LEN];
+
static struct option long_options[] =
{
{"loader", required_argument, NULL, 'i'},
@@ -1146,6 +1244,15 @@ int main(int argc, char **argv)
exit(1);
}
+ if (sld_img && using_fit) {
+ calc_fitimage_hash(sld_img, fit_hash);
+
+ /* Append hash to ap_img */
+ append_data(ap_img, fit_hash, HASH_MAX_LEN);
+
+ dump_fit_hash(fit_hash, HASH_MAX_LEN);
+ }
+
if (version == ROM_V2) {
/* On V2, flexspi IVT offset is 0, image offset is 0x1000 */
@@ -1638,7 +1745,7 @@ int main(int argc, char **argv)
}
/* The FLEXSPI configuration parameters will add to flash.bin by script, so need add 0x1000 offset to every offset prints */
- if ((version == ROM_V2 && rom_image_offset == IVT_OFFSET_FLEXSPI) ||
+ if ((version == ROM_V2 && rom_image_offset == IVT_OFFSET_FLEXSPI) ||
(version == ROM_V1 && ivt_offset == IVT_OFFSET_FLEXSPI)) {
header_image_off += IVT_OFFSET_FLEXSPI;
dcd_off += IVT_OFFSET_FLEXSPI;
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
index 6b3a01f..a30523b 100644
--- a/iMX8M/soc.mak
+++ b/iMX8M/soc.mak
@@ -101,8 +101,9 @@ u-boot-spl-ddr.bin: u-boot-spl.bin $(lpddr4_imem_1d) $(lpddr4_dmem_1d) $(lpddr4_
@objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 $(lpddr4_imem_1d) lpddr4_pmu_train_1d_imem_pad.bin
@objcopy -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 $(lpddr4_dmem_1d) lpddr4_pmu_train_1d_dmem_pad.bin
@objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 $(lpddr4_imem_2d) lpddr4_pmu_train_2d_imem_pad.bin
+ @objcopy -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 $(lpddr4_dmem_2d) lpddr4_pmu_train_2d_dmem_pad.bin
@cat lpddr4_pmu_train_1d_imem_pad.bin lpddr4_pmu_train_1d_dmem_pad.bin > lpddr4_pmu_train_1d_fw.bin
- @cat lpddr4_pmu_train_2d_imem_pad.bin $(lpddr4_dmem_2d) > lpddr4_pmu_train_2d_fw.bin
+ @cat lpddr4_pmu_train_2d_imem_pad.bin lpddr4_pmu_train_2d_dmem_pad.bin > lpddr4_pmu_train_2d_fw.bin
@dd if=u-boot-spl.bin of=u-boot-spl-pad.bin bs=4 conv=sync
@cat u-boot-spl-pad.bin lpddr4_pmu_train_1d_fw.bin lpddr4_pmu_train_2d_fw.bin > u-boot-spl-ddr.bin
@rm -f u-boot-spl-pad.bin lpddr4_pmu_train_1d_fw.bin lpddr4_pmu_train_2d_fw.bin lpddr4_pmu_train_1d_imem_pad.bin lpddr4_pmu_train_1d_dmem_pad.bin lpddr4_pmu_train_2d_imem_pad.bin
@@ -116,8 +117,9 @@ u-boot-spl-ddr4.bin: u-boot-spl.bin $(ddr4_imem_1d) $(ddr4_dmem_1d) $(ddr4_imem_
@objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 $(ddr4_imem_1d) ddr4_imem_1d_pad.bin
@objcopy -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 $(ddr4_dmem_1d) ddr4_dmem_1d_pad.bin
@objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 $(ddr4_imem_2d) ddr4_imem_2d_pad.bin
+ @objcopy -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 $(ddr4_dmem_2d) ddr4_dmem_2d_pad.bin
@cat ddr4_imem_1d_pad.bin ddr4_dmem_1d_pad.bin > ddr4_1d_fw.bin
- @cat ddr4_imem_2d_pad.bin $(ddr4_dmem_2d) > ddr4_2d_fw.bin
+ @cat ddr4_imem_2d_pad.bin ddr4_dmem_2d_pad.bin > ddr4_2d_fw.bin
@dd if=u-boot-spl.bin of=u-boot-spl-pad.bin bs=4 conv=sync
@cat u-boot-spl-pad.bin ddr4_1d_fw.bin ddr4_2d_fw.bin > u-boot-spl-ddr4.bin
@rm -f u-boot-spl-pad.bin ddr4_1d_fw.bin ddr4_2d_fw.bin ddr4_imem_1d_pad.bin ddr4_dmem_1d_pad.bin ddr4_imem_2d_pad.bin
@@ -127,10 +129,12 @@ ddr3_dmem_1d = ddr3_dmem_1d$(DDR_FW_VERSION).bin
u-boot-spl-ddr3l.bin: u-boot-spl.bin $(ddr3_imem_1d) $(ddr3_dmem_1d)
@objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 $(ddr3_imem_1d) ddr3_imem_1d.bin_pad.bin
- @cat ddr3_imem_1d.bin_pad.bin $(ddr3_dmem_1d) > ddr3_pmu_train_fw.bin
+ @objcopy -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 $(ddr3_dmem_1d) ddr3_dmem_1d.bin_pad.bin
+ @cat ddr3_imem_1d.bin_pad.bin ddr3_dmem_1d.bin_pad.bin > ddr3_pmu_train_fw.bin
+ @dd if=/dev/zero of=ddr3_fw_zero_pad.bin bs=1 count=49152 conv=sync
@dd if=u-boot-spl.bin of=u-boot-spl-pad.bin bs=4 conv=sync
- @cat u-boot-spl-pad.bin ddr3_pmu_train_fw.bin > u-boot-spl-ddr3l.bin
- @rm -f u-boot-spl-pad.bin ddr3_pmu_train_fw.bin ddr3_imem_1d.bin_pad.bin
+ @cat u-boot-spl-pad.bin ddr3_pmu_train_fw.bin ddr3_fw_zero_pad.bin > u-boot-spl-ddr3l.bin
+ @rm -f u-boot-spl-pad.bin ddr3_pmu_train_fw.bin ddr3_imem_1d.bin_pad.bin ddr3_fw_zero_pad.bin
u-boot-atf.bin: u-boot.bin bl31.bin
@cp bl31.bin u-boot-atf.bin

View File

@ -1,179 +0,0 @@
From: Ye Li <ye.li@nxp.com>
Date: Thu, 27 Jul 2023 09:52:33 +0800
Subject: [PATCH] LFU-573-2 imx8m: Reserve new IVT+CSF for FIT FDT signature
Without using FIT FDT hash, we also allow user to sign FIT FDT structure,
so that FIT image can upgrade individually. The option needs
CONFIG_IMX_SPL_FIT_FDT_SIGNATURE enabled in SPL.
imx-mkimage will insert the new IVT for FIT FDT signature by default
and reserve the CSF (0x2000) for the FIT FDT signature.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5a0faefc223e51e088433663b6e7d6fbce89bf59)
---
iMX8M/mkimage_imx8.c | 30 +++++++++++++++++++++++++++++-
iMX8M/print_fit_hab.sh | 4 ++--
iMX8M/soc.mak | 17 +++++++++--------
3 files changed, 40 insertions(+), 11 deletions(-)
diff --git a/iMX8M/mkimage_imx8.c b/iMX8M/mkimage_imx8.c
index f8484d0..c2a6c29 100644
--- a/iMX8M/mkimage_imx8.c
+++ b/iMX8M/mkimage_imx8.c
@@ -999,7 +999,7 @@ int generate_ivt_for_fit(int fd, int fit_offset, uint32_t ep, uint32_t *fit_load
}
/* ep is the u-boot entry. SPL loads the FIT before the u-boot address. 0x2000 is for CSF_SIZE */
- load_addr = (ep - (fit_size + CSF_SIZE) - 512 -
+ load_addr = (ep - (fit_size + 2 * CSF_SIZE) - 512 -
align_len) & ~align_len;
flash_header_v2_t ivt_header = { { 0xd1, 0x2000, 0x40 },
@@ -1013,6 +1013,24 @@ int generate_ivt_for_fit(int fd, int fit_offset, uint32_t ep, uint32_t *fit_load
exit(EXIT_FAILURE);
}
+ ret = lseek(fd, fit_offset + fit_size + CSF_SIZE, SEEK_SET);
+ if (ret < 0) {
+ fprintf(stderr, "%s: lseek error %s\n",
+ __func__, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+ flash_header_v2_t fdt_ivt_header = { { 0xd1, 0x2000, 0x40 },
+ load_addr, 0, 0, 0,
+ (load_addr + fit_size + CSF_SIZE ),
+ (load_addr + fit_size + CSF_SIZE + 0x20),
+ 0 };
+
+ if (write(fd, &fdt_ivt_header, sizeof(flash_header_v2_t)) != sizeof(flash_header_v2_t)) {
+ fprintf(stderr, "FIT FDT IVT writing error on fit image\n");
+ exit(EXIT_FAILURE);
+ }
+
*fit_load_addr = load_addr;
return fit_offset + fit_size;
@@ -1229,6 +1247,11 @@ int main(int argc, char **argv)
fprintf(stderr, " fit hab block: \t0x%x 0x%x 0x%x\n",
sld_load_addr, sld_src_off, sld_csf_off - sld_src_off);
+ fprintf(stderr, " fit-fdt_csf_off \t0x%x\n",
+ sld_csf_off + CSF_SIZE);
+ fprintf(stderr, " fit-fdt hab block: \t0x%x 0x%x 0x%x\n",
+ sld_load_addr, sld_src_off, sld_csf_off + CSF_SIZE - sld_src_off);
+
exit(0);
}
@@ -1769,6 +1792,11 @@ int main(int argc, char **argv)
fprintf(stderr, " sld hab block: \t0x%x 0x%x 0x%x\n",
sld_load_addr, sld_header_off, sld_csf_off - sld_header_off);
+ fprintf(stderr, " fit-fdt csf_off \t0x%x\n",
+ sld_csf_off + CSF_SIZE);
+ fprintf(stderr, " fit-fdt hab block: \t0x%x 0x%x 0x%x\n",
+ sld_load_addr, sld_header_off, sld_csf_off + CSF_SIZE - sld_header_off);
+
return 0;
}
diff --git a/iMX8M/print_fit_hab.sh b/iMX8M/print_fit_hab.sh
index 6f1a22d..d1e344a 100755
--- a/iMX8M/print_fit_hab.sh
+++ b/iMX8M/print_fit_hab.sh
@@ -24,10 +24,10 @@ fi
if [ "$BOOT_DEV" = "flexspi" ] || [ ${fit_off} == 0 ]; then
# We dd flash.bin to 0 offset for flexspi
- let uboot_sign_off=$((fit_off + 0x3000))
+ let uboot_sign_off=$((fit_off + $FIT_DATA_POS))
else
# We dd flash.bin to 33KB "0x8400" offset, so need minus 0x8400
- let uboot_sign_off=$((fit_off - 0x8000 - ivt_off + 0x3000))
+ let uboot_sign_off=$((fit_off - 0x8000 - ivt_off + $FIT_DATA_POS))
fi
let uboot_size=$(stat --printf="%s" $BL33)
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
index a30523b..d4946dc 100644
--- a/iMX8M/soc.mak
+++ b/iMX8M/soc.mak
@@ -84,6 +84,7 @@ VERSION = v1
CAPSULE_GUID = 296119cf-dd70-43de-8ac8-a7051f312577
endif
+FIT_EXTERNAL_POSITION = 0x5000
FW_DIR = imx-boot/imx-boot-tools/$(PLAT)
@@ -158,7 +159,7 @@ u-boot.itb: $(dtb)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) > u-boot.its
- mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot.its u-boot.itb
@rm -f u-boot.its
dtb_ddr3l = valddr3l.dtb
@@ -170,7 +171,7 @@ u-boot-ddr3l.itb: $(dtb_ddr3l)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l) > u-boot-ddr3l.its
- mkimage -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr3l.its u-boot-ddr3l.itb
@rm -f u-boot.its $(dtb_ddr3l)
dtb_ddr3l_evk = evkddr3l.dtb
@@ -182,7 +183,7 @@ u-boot-ddr3l-evk.itb: $(dtb_ddr3l_evk)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l_evk) > u-boot-ddr3l-evk.its
- mkimage -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
@rm -f u-boot.its $(dtb_ddr3l_evk)
dtb_ddr4 = valddr4.dtb
@@ -194,7 +195,7 @@ u-boot-ddr4.itb: $(dtb_ddr4)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4) > u-boot-ddr4.its
- mkimage -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr4.its u-boot-ddr4.itb
@rm -f u-boot.its $(dtb_ddr4)
dtb_ddr4_evk = evkddr4.dtb
@@ -206,7 +207,7 @@ u-boot-ddr4-evk.itb: $(dtb_ddr4_evk)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4_evk) > u-boot-ddr4-evk.its
- mkimage -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
+ mkimage -E -p $(FIT_EXTERNAL_POSITION) -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
@rm -f u-boot.its $(dtb_ddr4_evk)
ifeq ($(HDMI),yes)
@@ -326,20 +327,20 @@ print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb)
./$(PAD_IMAGE) $(TEE) 2>&1 | tee $(MKIMAGE_LOG)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
- { echo $@; TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb) 2>&1; } | tee -a $(MKIMAGE_LOG)
+ { echo $@; FIT_DATA_POS=$(FIT_EXTERNAL_POSITION) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb) 2>&1; } | tee -a $(MKIMAGE_LOG)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk)
./$(PAD_IMAGE) $(TEE)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk)
- TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb_ddr4_evk)
+ FIT_DATA_POS=$(FIT_EXTERNAL_POSITION) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb_ddr4_evk)
@rm -f $(dtb_ddr4_evk)
print_fit_hab_flexspi: u-boot-nodtb.bin bl31.bin $(dtb)
./$(PAD_IMAGE) $(TEE)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
- TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) BOOT_DEV="flexspi" ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
+ FIT_DATA_POS=$(FIT_EXTERNAL_POSITION) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) BOOT_DEV="flexspi" ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
@rm -f $(dtb)
nightly :

View File

@ -5,8 +5,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append:ccimx8m = " \
file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch \
file://0002-imx8m-soc.mak-capture-commands-output-into-a-log-fil.patch \
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:ccimx91 = " \
file://0001-imx91-soc.mak-capture-commands-output-into-a-log-fil.patch \
@ -16,24 +14,18 @@ SRC_URI:append:ccimx93 = " \
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: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:mx91-generic-bsp = "${S}/iMX91"
BOOT_STAGING:mx93-generic-bsp = "${S}/iMX9"
BOOT_STAGING:mx93-generic-bsp = "${S}/iMX93"
# Add SOC family
SOC_FAMILY:mx91-generic-bsp = "mx91"
REV_OPTION:ccimx91 = "REV=A0"
REV_OPTION:ccimx93 = "REV=A1"
compile_mx8m:append:ccimx8m() {

View File

@ -1,5 +1,5 @@
# Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2022 NXP
# Copyright (C) 2017-2022 NXP
require imx-mkimage_git.inc

View File

@ -6,11 +6,6 @@ SRC_URI:append:ccimx8m = " \
file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch \
"
# Use NXP's lf-6.1.55-2.2.0 release for ccimx9
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"
# "fmacro-prefix-map" is not supported on old versions of GCC
DEBUG_PREFIX_MAP:remove:class-nativesdk = "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"

View File

@ -1,13 +1,12 @@
# Copyright 2017-2022 NXP
# Copyright 2017-2023 NXP
DEPENDS = "zlib openssl"
SRC_URI = "${IMX_MKIMAGE_SRC};branch=${SRCBRANCH} \
SRC_URI = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH} \
file://0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch \
"
IMX_MKIMAGE_SRC ?= "git://github.com/nxp-imx/imx-mkimage.git;protocol=https"
SRCBRANCH = "lf-5.15.71_2.2.0"
SRCREV = "3bfcfccb71ddf894be9c402732ccb229fe72099e"
SRCBRANCH = "lf-6.6.23_2.0.0"
SRCREV = "ca5d6b2d3fd9ab15825b97f7ef6f1ce9a8644966"
S = "${WORKDIR}/git"