summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL31-BL32-and-BL33.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL31-BL32-and-BL33.patch')
-rw-r--r--recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL31-BL32-and-BL33.patch62
1 files changed, 62 insertions, 0 deletions
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
new file mode 100644
index 00000000..eadba937
--- /dev/null
+++ b/recipes-bsp/imx-mkimage/files/0001-Add-support-for-overriding-BL31-BL32-and-BL33.patch
@@ -0,0 +1,62 @@
1From ff3204addcf737b7285a0c44eb0a34c9ca82be4e Mon Sep 17 00:00:00 2001
2From: Thomas Perrot <thomas.perrot@bootlin.com>
3Date: Tue, 26 Apr 2022 15:10:04 +0200
4Subject: [PATCH] Add support for overriding BL31, BL32 and BL33
5
6Upstream-Status: Pending
7
8Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
9---
10 iMX8M/print_fit_hab.sh | 14 +++++++++-----
11 1 file changed, 9 insertions(+), 5 deletions(-)
12
13diff --git a/iMX8M/print_fit_hab.sh b/iMX8M/print_fit_hab.sh
14index b915115d1ecc..9e025b78c04d 100755
15--- a/iMX8M/print_fit_hab.sh
16+++ b/iMX8M/print_fit_hab.sh
17@@ -1,12 +1,16 @@
18 #!/bin/bash
19
20-BL32="tee.bin"
21-
22 let fit_off=$1
23
24 # keep backward compatibility
25 [ -z "$TEE_LOAD_ADDR" ] && TEE_LOAD_ADDR="0xfe000000"
26
27+[ -z "$BL31" ] && BL33="bl31.bin"
28+
29+[ -z "$BL32" ] && BL32="tee.bin"
30+
31+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin"
32+
33 if [ -z "$ATF_LOAD_ADDR" ]; then
34 echo "ERROR: BL31 load address is not set" >&2
35 exit 0
36@@ -26,7 +30,7 @@ else
37 let uboot_sign_off=$((fit_off - 0x8000 - ivt_off + 0x3000))
38 fi
39
40-let uboot_size=$(ls -lct u-boot-nodtb.bin | awk '{print $5}')
41+let uboot_size=$(ls -lct $BL33 | awk '{print $5}')
42 let uboot_load_addr=0x40200000
43
44 let last_sign_off=$(((uboot_sign_off + uboot_size + 3) & ~3))
45@@ -64,13 +68,13 @@ done
46
47 let atf_sign_off=$((last_sign_off))
48 let atf_load_addr=$ATF_LOAD_ADDR
49-let atf_size=$(ls -lct bl31.bin | awk '{print $5}')
50+let atf_size=$(ls -lct $BL31 | awk '{print $5}')
51
52 if [ ! -f $BL32 ]; then
53 let tee_size=0x0
54 let tee_sign_off=$((atf_sign_off + atf_size))
55 else
56- let tee_size=$(ls -lct tee.bin | awk '{print $5}')
57+ let tee_size=$(ls -lct $BL32 | awk '{print $5}')
58
59 let tee_sign_off=$(((atf_sign_off + atf_size + 3) & ~3))
60 let tee_load_addr=$TEE_LOAD_ADDR
61--
622.35.1