All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/imx-mkimage: install print_fit_hab.sh
@ 2022-04-28  7:40 Thomas Perrot via buildroot
  2022-04-30 18:49 ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Perrot via buildroot @ 2022-04-28  7:40 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Perrot, thomas.petazzoni

This script gives the address, the offset and the size of binaries have been
stored into U-Boot FIT image that contains TF-A, U-Boot and OP-TEE.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
---

Changes v2:
 - Fix a typo, when the variable BL31 is empty, BL33 was initialized instead of
   BL31.

 ...rt-for-overriding-BL31-BL32-and-BL33.patch | 61 +++++++++++++++++++
 package/imx-mkimage/imx-mkimage.mk            |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch

diff --git a/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
new file mode 100644
index 000000000000..715b0f31d052
--- /dev/null
+++ b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
@@ -0,0 +1,61 @@
+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
+
+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/package/imx-mkimage/imx-mkimage.mk b/package/imx-mkimage/imx-mkimage.mk
index 17ba3596f752..b88be0ca6441 100644
--- a/package/imx-mkimage/imx-mkimage.mk
+++ b/package/imx-mkimage/imx-mkimage.mk
@@ -21,6 +21,7 @@ endef
 define HOST_IMX_MKIMAGE_INSTALL_CMDS
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_fit_atf.sh $(HOST_DIR)/bin/mkimage_fit_atf.sh
+	$(INSTALL) -D -m 755 $(@D)/iMX8M/print_fit_hab.sh $(HOST_DIR)/bin/print_fit_hab.sh
 endef
 else
 # i.MX8 and i.MX8X
--
2.35.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2] package/imx-mkimage: install print_fit_hab.sh
  2022-04-28  7:40 [Buildroot] [PATCH v2] package/imx-mkimage: install print_fit_hab.sh Thomas Perrot via buildroot
@ 2022-04-30 18:49 ` Arnout Vandecappelle
  0 siblings, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2022-04-30 18:49 UTC (permalink / raw)
  To: Thomas Perrot, buildroot; +Cc: thomas.petazzoni



On 28/04/2022 09:40, Thomas Perrot via buildroot wrote:
> This script gives the address, the offset and the size of binaries have been
> stored into U-Boot FIT image that contains TF-A, U-Boot and OP-TEE.
> 
> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
> 
> Changes v2:
>   - Fix a typo, when the variable BL31 is empty, BL33 was initialized instead of
>     BL31.
> 
>   ...rt-for-overriding-BL31-BL32-and-BL33.patch | 61 +++++++++++++++++++
>   package/imx-mkimage/imx-mkimage.mk            |  1 +
>   2 files changed, 62 insertions(+)
>   create mode 100644 package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
> 
> diff --git a/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
> new file mode 100644
> index 000000000000..715b0f31d052
> --- /dev/null
> +++ b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
> @@ -0,0 +1,61 @@
> +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
> +
> +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/package/imx-mkimage/imx-mkimage.mk b/package/imx-mkimage/imx-mkimage.mk
> index 17ba3596f752..b88be0ca6441 100644
> --- a/package/imx-mkimage/imx-mkimage.mk
> +++ b/package/imx-mkimage/imx-mkimage.mk
> @@ -21,6 +21,7 @@ endef
>   define HOST_IMX_MKIMAGE_INSTALL_CMDS
>   	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
>   	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_fit_atf.sh $(HOST_DIR)/bin/mkimage_fit_atf.sh
> +	$(INSTALL) -D -m 755 $(@D)/iMX8M/print_fit_hab.sh $(HOST_DIR)/bin/print_fit_hab.sh
>   endef
>   else
>   # i.MX8 and i.MX8X
> --
> 2.35.1
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v2] package/imx-mkimage: install print_fit_hab.sh
@ 2022-04-28  7:39 Thomas Perrot via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Perrot via buildroot @ 2022-04-28  7:39 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Perrot, thomas.petazzoni

This script gives the address, the offset and the size of binaries have been
stored into U-Boot FIT image that contains TF-A, U-Boot and OP-TEE.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
---

Changes v2:
 - Fix a typo, when the variable BL31 is empty, BL33 was initialized instead of
   BL31.

 ...rt-for-overriding-BL31-BL32-and-BL33.patch | 61 +++++++++++++++++++
 package/imx-mkimage/imx-mkimage.mk            |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch

diff --git a/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
new file mode 100644
index 000000000000..715b0f31d052
--- /dev/null
+++ b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch
@@ -0,0 +1,61 @@
+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
+
+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/package/imx-mkimage/imx-mkimage.mk b/package/imx-mkimage/imx-mkimage.mk
index 17ba3596f752..b88be0ca6441 100644
--- a/package/imx-mkimage/imx-mkimage.mk
+++ b/package/imx-mkimage/imx-mkimage.mk
@@ -21,6 +21,7 @@ endef
 define HOST_IMX_MKIMAGE_INSTALL_CMDS
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
 	$(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_fit_atf.sh $(HOST_DIR)/bin/mkimage_fit_atf.sh
+	$(INSTALL) -D -m 755 $(@D)/iMX8M/print_fit_hab.sh $(HOST_DIR)/bin/print_fit_hab.sh
 endef
 else
 # i.MX8 and i.MX8X
--
2.35.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-30 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28  7:40 [Buildroot] [PATCH v2] package/imx-mkimage: install print_fit_hab.sh Thomas Perrot via buildroot
2022-04-30 18:49 ` Arnout Vandecappelle
  -- strict thread matches above, loose matches on Subject: below --
2022-04-28  7:39 Thomas Perrot via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.