diff options
Diffstat (limited to 'recipes-bsp/imx-mkimage/files')
5 files changed, 37 insertions, 254 deletions
diff --git a/recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch b/recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch deleted file mode 100644 index f8c68d45..00000000 --- a/recipes-bsp/imx-mkimage/files/0001-Add-LDFLAGS-to-link-step.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2a6e2d40a4af78d4a0824e384c3aec55db758fee Mon Sep 17 00:00:00 2001 -From: Erik Larsson <erik.larsson@combitech.se> -Date: Tue, 6 Mar 2018 12:28:39 +0100 -Subject: [PATCH] Add LDFLAGS to link step - -Upstream-Status: Pending - -Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com> ---- - iMX8M/soc.mak | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak -index 03b05f7aafeb..4d5df0777704 100644 ---- a/iMX8M/soc.mak -+++ b/iMX8M/soc.mak -@@ -84,7 +84,7 @@ FW_DIR = imx-boot/imx-boot-tools/$(PLAT) - $(MKIMG): mkimage_imx8.c - @echo "PLAT="$(PLAT) "HDMI="$(HDMI) - @echo "Compiling mkimage_imx8" -- $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz -+ $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(BUILD_LDFLAGS) -lz - - lpddr4_imem_1d = lpddr4_pmu_train_1d_imem$(LPDDR_FW_VERSION).bin - lpddr4_dmem_1d = lpddr4_pmu_train_1d_dmem$(LPDDR_FW_VERSION).bin --- -2.35.1 - diff --git a/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL31-BL32-and-BL33.patch b/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL31-BL32-and-BL33.patch deleted file mode 100644 index 4e0d954a..00000000 --- a/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL31-BL32-and-BL33.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8fc8fc3dfce7533b9c965185277d34e27055cc8f Mon Sep 17 00:00:00 2001 -From: Thomas Perrot <thomas.perrot@bootlin.com> -Date: Tue, 26 Apr 2022 15:10:04 +0200 -Subject: [PATCH] Add support for overriding BL31, BL32 and BL33 - -Upstream-Status: Pending - -Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> ---- - iMX8M/print_fit_hab.sh | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/iMX8M/print_fit_hab.sh b/iMX8M/print_fit_hab.sh -index b915115d1ecc..dbc28f2d9af5 100755 ---- a/iMX8M/print_fit_hab.sh -+++ b/iMX8M/print_fit_hab.sh -@@ -1,12 +1,16 @@ - #!/bin/bash - --BL32="tee.bin" -- - let fit_off=$1 - - # keep backward compatibility - [ -z "$TEE_LOAD_ADDR" ] && TEE_LOAD_ADDR="0xfe000000" - -+[ -z "$BL31" ] && BL31="bl31.bin" -+ -+[ -z "$BL32" ] && BL32="tee.bin" -+ -+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin" -+ - if [ -z "$ATF_LOAD_ADDR" ]; then - echo "ERROR: BL31 load address is not set" >&2 - exit 0 -@@ -26,7 +30,7 @@ else - let uboot_sign_off=$((fit_off - 0x8000 - ivt_off + 0x3000)) - fi - --let uboot_size=$(ls -lct u-boot-nodtb.bin | awk '{print $5}') -+let uboot_size=$(ls -lct $BL33 | awk '{print $5}') - let uboot_load_addr=0x40200000 - - let last_sign_off=$(((uboot_sign_off + uboot_size + 3) & ~3)) -@@ -64,13 +68,13 @@ done - - let atf_sign_off=$((last_sign_off)) - let atf_load_addr=$ATF_LOAD_ADDR --let atf_size=$(ls -lct bl31.bin | awk '{print $5}') -+let atf_size=$(ls -lct $BL31 | awk '{print $5}') - - if [ ! -f $BL32 ]; then - let tee_size=0x0 - let tee_sign_off=$((atf_sign_off + atf_size)) - else -- let tee_size=$(ls -lct tee.bin | awk '{print $5}') -+ let tee_size=$(ls -lct $BL32 | awk '{print $5}') - - let tee_sign_off=$(((atf_sign_off + atf_size + 3) & ~3)) - let tee_load_addr=$TEE_LOAD_ADDR --- -2.35.1 diff --git a/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch b/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch deleted file mode 100644 index 72d83e63..00000000 --- a/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch +++ /dev/null @@ -1,71 +0,0 @@ -From ef28030129a04b1d70dbca3f2236fe7b1c67b4ed Mon Sep 17 00:00:00 2001 -From: Erik Larsson <erik.larsson@combitech.se> -Date: Thu, 8 Mar 2018 19:04:37 +0100 -Subject: [PATCH] Add support for overriding BL32 and BL33 not only BL31 - -Upstream-Status: Pending - -Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com> -Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com> -Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> -Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> ---- - iMX8M/mkimage_fit_atf.sh | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/iMX8M/mkimage_fit_atf.sh b/iMX8M/mkimage_fit_atf.sh -index 10903ea3bbf5..341a4b3da1ef 100755 ---- a/iMX8M/mkimage_fit_atf.sh -+++ b/iMX8M/mkimage_fit_atf.sh -@@ -6,6 +6,7 @@ - # usage: $0 <dt_name> [<dt_name> [<dt_name] ...] - - [ -z "$BL31" ] && BL31="bl31.bin" -+ - # keep backward compatibility - [ -z "$TEE_LOAD_ADDR" ] && TEE_LOAD_ADDR="0xfe000000" - -@@ -18,23 +19,23 @@ if [ ! -f $BL31 ]; then - echo "ERROR: BL31 file $BL31 NOT found" >&2 - exit 0 - else -- echo "bl31.bin size: " >&2 -- ls -lct bl31.bin | awk '{print $5}' >&2 -+ echo "$BL31 size: " >&2 -+ ls -lct $BL31 | awk '{print $5}' >&2 - fi - --BL32="tee.bin" -+[ -z "$BL32" ] && BL32="tee.bin" - LOADABLES="\"atf-1\"" - - if [ ! -f $BL32 ]; then - BL32=/dev/null - else -- echo "Building with TEE support, make sure your bl31 is compiled with spd. If you do not want tee, please delete tee.bin" >&2 -- echo "tee.bin size: " >&2 -- ls -lct tee.bin | awk '{print $5}' >&2 -+ echo "Building with TEE support, make sure $BL31 is compiled with spd. If you do not want tee, please delete $BL32" >&2 -+ echo "$BL32 size: " >&2 -+ ls -lct $BL32 | awk '{print $5}' >&2 - LOADABLES="$LOADABLES, \"tee-1\"" - fi - --BL33="u-boot-nodtb.bin" -+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin" - DEK_BLOB="dek_blob_fit_dummy.bin" - - if [ ! -f $DEK_BLOB ]; then -@@ -49,8 +50,8 @@ if [ ! -f $BL33 ]; then - exit 0 - else - -- echo "u-boot-nodtb.bin size: " >&2 -- ls -lct u-boot-nodtb.bin | awk '{print $5}' >&2 -+ echo "$BL33 size: " >&2 -+ ls -lct $BL33 | awk '{print $5}' >&2 - fi - - for dtname in $* --- -2.35.1 diff --git a/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch b/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch index a879208c..f182a2f1 100644 --- a/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch +++ b/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch @@ -1,6 +1,6 @@ -From a4af3747abd88247bf4498ec0cf67a4151e64d41 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,63 +13,65 @@ 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(-) -diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak -index 4bfdc37..03b05f7 100644 ---- a/iMX8M/soc.mak -+++ b/iMX8M/soc.mak -@@ -148,7 +148,7 @@ u-boot.itb: $(dtb) +Index: git/iMX8M/soc.mak +=================================================================== +--- git.orig/iMX8M/soc.mak ++++ git/iMX8M/soc.mak +@@ -160,7 +160,7 @@ u-boot.itb: $(dtb) $(supp_dtbs) ./$(PAD_IMAGE) bl31.bin - ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb) - DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./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 -@@ -160,7 +160,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) ./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 -@@ -172,7 +172,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) ./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 -@@ -184,7 +184,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) ./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 -@@ -196,7 +196,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) ./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) -@@ -312,7 +312,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 @@ -77,6 +79,3 @@ index 4bfdc37..03b05f7 100644 archive : git ls-files --others --exclude-standard -z | xargs -0 tar rvf $(ARCHIVE_PATH)/$(ARCHIVE_NAME) --- -2.17.1 - diff --git a/recipes-bsp/imx-mkimage/files/0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch b/recipes-bsp/imx-mkimage/files/0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch deleted file mode 100644 index 5a4a895b..00000000 --- a/recipes-bsp/imx-mkimage/files/0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f281b935985f1b592534ee2837ce0d0b28c7dc43 Mon Sep 17 00:00:00 2001 -From: Andrey Zhizhikin <andrey.z@gmail.com> -Date: Tue, 11 Jan 2022 15:32:05 -0600 -Subject: [PATCH] mkimage_fit_atf: fix fit generator node naming - -Extend sections which contains "firmware" in their types with "os" -parameter to conform to the latest FIT specification. - -Indicate that load and entry addresses are covered by one 32-bit value -by adding "address-cells" in the root node of the generated ITS. - -Upstream-Status: Inappropriate [script is imx-boot specific] -Link: [1] https://github.com/u-boot/u-boot/commit/79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4 -Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> -Cc: Tom Hochstein <tom.hochstein@nxp.com> ---- - iMX8M/mkimage_fit_atf.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/iMX8M/mkimage_fit_atf.sh b/iMX8M/mkimage_fit_atf.sh -index 4f2b3f3..10903ea 100755 ---- a/iMX8M/mkimage_fit_atf.sh -+++ b/iMX8M/mkimage_fit_atf.sh -@@ -64,10 +64,12 @@ cat << __HEADER_EOF - - / { - description = "Configuration to load ATF before U-Boot"; -+ #address-cells = <1>; - - images { - uboot-1 { - description = "U-Boot (64-bit)"; -+ os = "u-boot"; - data = /incbin/("$BL33"); - type = "standalone"; - arch = "arm64"; -@@ -93,6 +95,7 @@ done - cat << __HEADER_EOF - atf-1 { - description = "ARM Trusted Firmware"; -+ os = "arm-trusted-firmware"; - data = /incbin/("$BL31"); - type = "firmware"; - arch = "arm64"; -@@ -106,6 +109,7 @@ if [ -f $BL32 ]; then - cat << __HEADER_EOF - tee-1 { - description = "TEE firmware"; -+ os = "op-tee-firmware"; - data = /incbin/("$BL32"); - type = "firmware"; - arch = "arm64"; --- -2.17.1 - |