Cleanup K3 binman FIT images
cover Cleanup K3 binman FIT images
Instead of duplicating the same FIT formats over and over again for different K3 devices, make use of the templating support to have FIT templates for the same.
Note: I purposely did not add the trial to template out the non-FIT bootloader image (tiboot3.bin) as it reduces the readibility and understandability of how the image is packaged because of the various different boot flows.
Boot logs:
https://gist.github.com/nehamalcom/9abe7955ebb4a251923e76412834c886
Neha Malcom Francis (2):
arm: dts: k3-binman: Add support for FIT templates
arm: dts: k3-*-binman: Move to using templated FITs
arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-binman.dtsi | 327 +++++++++++++++++ arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 9 files changed, 381 insertions(+), 1488 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/2 arm: dts: k3-binman: Add support for FIT templates
Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)
--- arch/arm/dts/k3-binman.dtsi | 327 ++++++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+)
arch/arm/dts/k3-binman.dtsi +327 -0
@@ -113,4 +113,331 @@ }; }; +&binman { + itb_template: template-5 { + fit { + description = "SYSFW and Config fragments"; + #address-cells = <1>; + images { + sysfw.bin { + description = "sysfw"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "sysfw.bin"; + }; + }; + board-cfg.bin { + description = "board-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&board_cfg>; + keyfile = "custMpk.pem"; + }; + board_cfg: board-cfg { + filename = "board-cfg.bin"; + type = "blob-ext"; + }; + + }; + pm-cfg.bin { + description = "pm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&pm_cfg>; + keyfile = "custMpk.pem"; + }; + pm_cfg: pm-cfg { + filename = "pm-cfg.bin"; + type = "blob-ext"; + }; + }; + rm-cfg.bin { + description = "rm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&rm_cfg>; + keyfile = "custMpk.pem"; + }; + rm_cfg: rm-cfg { + filename = "rm-cfg.bin"; + type = "blob-ext"; + }; + }; + sec-cfg.bin { + description = "sec-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&sec_cfg>; + keyfile = "custMpk.pem"; + }; + sec_cfg: sec-cfg { + filename = "sec-cfg.bin"; + type = "blob-ext"; + }; + }; + }; + }; + }; + + itb_unsigned_template: template-6 { + fit { + description = "SYSFW and Config fragments"; + #address-cells = <1>; + images { + sysfw.bin { + description = "sysfw"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "sysfw.bin_fs"; + }; + }; + board-cfg.bin { + description = "board-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + board-cfg { + filename = "board-cfg.bin"; + type = "blob-ext"; + }; + + }; + pm-cfg.bin { + description = "pm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + pm-cfg { + filename = "pm-cfg.bin"; + type = "blob-ext"; + }; + }; + rm-cfg.bin { + description = "rm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + rm-cfg { + filename = "rm-cfg.bin"; + type = "blob-ext"; + }; + }; + sec-cfg.bin { + description = "sec-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + sec-cfg { + filename = "sec-cfg.bin"; + type = "blob-ext"; + }; + }; + }; + }; + }; +}; + +#else + +&binman { + ti_spl_template: template-1 { + filename = "tispl.bin"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + ti-secure { + content = <&atf>; + keyfile = "custMpk.pem"; + }; + atf: atf-bl31 { + }; + }; + + tee { + description = "OP-TEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + ti-secure { + content = <&tee>; + keyfile = "custMpk.pem"; + }; + tee: tee-os { + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + ti-secure { + content = <&u_boot_spl_nodtb>; + keyfile = "custMpk.pem"; + + }; + u_boot_spl_nodtb: blob-ext { + filename = "spl/u-boot-spl-nodtb.bin"; + }; + }; + + }; + }; + }; + ti_spl_unsigned_template: template-2 { + filename = "tispl.bin_unsigned"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + atf-bl31 { + filename = "bl31.bin"; + }; + }; + + tee { + description = "OP-TEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + tee-os { + filename = "tee-raw.bin"; + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + blob-ext { + filename = "spl/u-boot-spl-nodtb.bin"; + }; + }; + }; + }; + }; + u_boot_template: template-3 { + filename = "u-boot.img"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + ti-secure { + content = <&u_boot_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_nodtb: u-boot-nodtb { + }; + hash { + algo = "crc32"; + }; + }; + }; + }; + }; + u_boot_unsigned_template: template-4 { + filename = "u-boot.img_unsigned"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + blob { + filename = "u-boot-nodtb.bin"; + }; + hash { + algo = "crc32"; + }; + }; + }; + }; + }; + +}; + #endif
Signature · 1 line
2.34.1
Re: [PATCH 1/2] arm: dts: k3-binman: Add support for FIT templates
Hi Neha,
Quoted 7 lines · Neha Malcom Francis
Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)
Quoted 5 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-binman.dtsi | 327 ++++++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+)
What is the DM binary?
Regards,
Simon
Re: [PATCH 1/2] arm: dts: k3-binman: Add support for FIT templates
Hi Simon
Quoted 16 lines · Simon Glass
Hi Neha,
Quoted 7 lines · Neha Malcom Francis
Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)Quoted 5 lines
Signed-off-by Neha Malcom Francis <[email protected]>---
arch/arm/dts/k3-binman.dtsi | 327 ++++++++++++++++++++++++++++++++++++1 file changed, 327 insertions(+)
Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>What is the DM binary?
From [1]:
DM - Device Management firmware also called TI System Control Interface server (TISCI Server) - This component purely plays the role of managing device resources such as power, clock, interrupts, dma etc. This firmware runs on a dedicated or multi-use microcontroller outside the security enclave.
[1] https://docs.u-boot.org/en/latest/board/ti/am62x_sk.html
Quoted 2 lines
Regards,
Simon
Cheers
Marcel
Re: [PATCH 1/2] arm: dts: k3-binman: Add support for FIT templates
Hi Marcel,
Quoted 29 lines · Marcel Ziswiler
Hi Simon
Quoted 16 lines · Simon Glass
Hi Neha,
Quoted 7 lines · Neha Malcom Francis
Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)Quoted 5 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-binman.dtsi | 327 ++++++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+)Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>What is the DM binary?
From [1]:
DM - Device Management firmware also called TI System Control Interface server (TISCI Server) - This component purely plays the role of managing device resources such as power, clock, interrupts, dma etc. This firmware runs on a dedicated or multi-use microcontroller outside the security enclave.
Quoted 8 lines
[1] https://docs.u-boot.org/en/latest/board/ti/am62x_sk.html
Quoted 2 lines
Regards,
SimonCheers
Marcel
Thanks for explaining!
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH 1/2] arm: dts: k3-binman: Add support for FIT templates
In reply to Neha Malcom FrancisQuoted 8 lines · Neha Malcom Francis
Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH 2/2 arm: dts: k3-*-binman: Move to using templated FITs
In reply to Neha Malcom FrancisReduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).
--- arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 8 files changed, 54 insertions(+), 1488 deletions(-)
arch/arm/dts/k3-am625-sk-binman.dtsi +6 -151
@@ -141,10 +141,7 @@ #ifdef CONFIG_TARGET_AM625_A53_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_AM625_SK_DTB "spl/dts/k3-am625-sk.dtb" - -#define UBOOT_NODTB "u-boot-nodtb.bin" #define AM625_SK_DTB "u-boot.dtb" &binman {
@@ -155,55 +152,11 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; ti-secure { content = <&dm>; keyfile = "custMpk.pem";
@@ -213,23 +166,6 @@ }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-am625-sk"; type = "flat_dt";
@@ -263,29 +199,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM625 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM625 Board"; }; fdt-0 {
@@ -323,67 +242,17 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob { - filename = "spl/u-boot-spl-nodtb.bin"; - }; - }; - fdt-0 { description = "k3-am625-sk"; type = "flat_dt";
@@ -411,26 +280,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM625 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM625 Board"; }; fdt-0 {
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi +6 -149
214 lines not on this page · raw message
arch/arm/dts/k3-am62a-sk-binman.dtsi +6 -152
216 lines not on this page · raw message
arch/arm/dts/k3-am64x-binman.dtsi +6 -145
213 lines not on this page · raw message
arch/arm/dts/k3-am65x-binman.dtsi +8 -265
348 lines not on this page · raw message
arch/arm/dts/k3-j7200-binman.dtsi +6 -153
220 lines not on this page · raw message
arch/arm/dts/k3-j721e-binman.dtsi +10 -322
417 lines not on this page · raw message
arch/arm/dts/k3-j721s2-binman.dtsi +6 -151
217 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH 2/2] arm: dts: k3-*-binman: Move to using templated FITs
Quoted 5 lines · Neha Malcom Francis
Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).
Signed-off-by Neha Malcom Francis <[email protected]>
Quoted 10 lines
--- arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 8 files changed, 54 insertions(+), 1488 deletions(-)
1488 deletions, nice!
Minor question, why was ti-secure not factored out of dm nodes like it was for atf/tee nodes? Guessing it has to do with not all SoCs needing this blob and signing nothing results in something, which messes up the 0 size check when loading it, but it wasn't clear to me.
Anyway,
Re: [PATCH 2/2] arm: dts: k3-*-binman: Move to using templated FITs
Hi Andrew,
Quoted 17 lines · Andrew Davis
Quoted 9 lines · Neha Malcom Francis
Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).
Signed-off-by Neha Malcom Francis <[email protected]>---
arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +--------Quoted 6 lines
arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 8 files changed, 54 insertions(+), 1488 deletions(-)
Quoted 7 lines
1488 deletions, nice!
Minor question, why was
ti-securenot factored out ofdmnodes like it was foratf/teenodes? Guessing it has to do with not all SoCs needing this blob and signing nothing results in something, which messes up the 0 size check when loading it, but it wasn't clear to me.
Yes that's right! It ends up being non-zero for devices that don't have DM and DM load fails.
Quoted 3 lines
Anyway,
Acked-by Andrew Davis <[email protected]>
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH 2/2] arm: dts: k3-*-binman: Move to using templated FITs
In reply to Neha Malcom FrancisHi Neha,
Quoted 6 lines · Neha Malcom Francis
Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).
Signed-off-by Neha Malcom Francis <[email protected]>
Quoted 11 lines
--- arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 8 files changed, 54 insertions(+), 1488 deletions(-)
Gosh that's a huge improvement!
Regards,
Simon
Re: [PATCH 2/2] arm: dts: k3-*-binman: Move to using templated FITs
In reply to Neha Malcom FrancisHi Neha,
Quoted 47 lines · Neha Malcom Francis
Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 8 files changed, 54 insertions(+), 1488 deletions(-)arch/arm/dts/k3-am625-sk-binman.dtsi +1
-11@@ -141,10 +141,7 @@ #ifdef CONFIG_TARGET_AM625_A53_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_AM625_SK_DTB "spl/dts/k3-am625-sk.dtb" - -#define UBOOT_NODTB "u-boot-nodtb.bin" #define AM625_SK_DTB "u-boot.dtb" &binman {@@ -155,55 +152,11 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware";
arch/arm/dts/k3-am625-sk-binman.dtsi line 178
Quoted 10 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +0
-10- type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - };
For ATF/OP-TEE Firewalling, can you keep these nodes intact? Just keep the ti-secure inside atf and tee nodes similar to how you have done that for DM as all the ATF/OPTEE nodes in the tispl.bin would be different for devices w.r.t certifications but we can still use templates for other common stuff.
With this change,
Regards,
Manorit
Quoted 2,103 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +5
-130- atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; ti-secure { content = <&dm>; keyfile = "custMpk.pem";@@ -213,23 +166,6 @@ }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-am625-sk"; type = "flat_dt";@@ -263,29 +199,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM625 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM625 Board"; }; fdt-0 {@@ -323,67 +242,17 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob { - filename = "spl/u-boot-spl-nodtb.bin"; - }; - }; - fdt-0 { description = "k3-am625-sk"; type = "flat_dt";@@ -411,26 +280,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM625 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM625 Board"; }; fdt-0 {arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi +6
-149@@ -214,10 +214,7 @@ #ifdef CONFIG_TARGET_VERDIN_AM62_A53 -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_VERDIN_AM62_DTB "spl/dts/k3-am625-verdin-wifi-dev.dtb" - -#define UBOOT_NODTB "u-boot-nodtb.bin" #define VERDIN_AM62_DTB "u-boot.dtb" &binman {@@ -228,54 +225,12 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; images { - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; ti-secure { content = <&dm>; keyfile = "custMpk.pem";@@ -285,23 +240,6 @@ }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-am625-verdin-wifi-dev"; type = "flat_dt";@@ -333,29 +271,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM625 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot fot AM625 Verdin Board"; }; fdt-0 {@@ -392,66 +313,16 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob { - filename = "spl/u-boot-spl-nodtb.bin"; - }; - }; - fdt-0 { description = "k3-am625-verdin-wifi-dev"; type = "flat_dt";@@ -479,26 +350,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM625 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM625 Verdin Board"; }; fdt-0 {arch/arm/dts/k3-am62a-sk-binman.dtsi +6
-152@@ -144,10 +144,7 @@ #ifdef CONFIG_TARGET_AM62A7_A53_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_AM62A7_SK_DTB "spl/dts/k3-am62a7-sk.dtb" - -#define UBOOT_NODTB "u-boot-nodtb.bin" #define AM62A7_SK_DTB "u-boot.dtb" &binman {@@ -158,55 +155,11 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; ti-secure { content = <&dm>; keyfile = "custMpk.pem";@@ -216,23 +169,6 @@ }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-am62a7-sk"; type = "flat_dt";@@ -266,29 +202,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM62Ax board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM62Ax Board"; }; fdt-0 {@@ -326,67 +245,16 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob { - filename = "spl/u-boot-spl-nodtb.bin"; - }; - }; - fdt-0 { description = "k3-am62a7-sk"; type = "flat_dt";@@ -414,26 +282,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM62Ax board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM62Ax Board"; }; fdt-0 {arch/arm/dts/k3-am64x-binman.dtsi +6
-145@@ -118,87 +118,27 @@ #ifdef CONFIG_TARGET_AM642_A53_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_AM642_EVM_DTB "spl/dts/k3-am642-evm.dtb" #define SPL_AM642_SK_DTB "spl/dts/k3-am642-sk.dtb" -#define UBOOT_NODTB "u-boot-nodtb.bin" #define AM642_EVM_DTB "u-boot.dtb" #define AM642_SK_DTB "arch/arm/dts/k3-am642-sk.dtb" &binman { ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { description = "Configuration to load ATF and SPL"; #address-cells = <1>; images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "/dev/null"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; fdt-0 { description = "k3-am642-evm";@@ -254,29 +194,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM64 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM64 Board"; }; fdt-0 {@@ -340,65 +263,17 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "/dev/null"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob { - filename = "spl/u-boot-spl-nodtb.bin"; - }; - }; - fdt-0 { description = "k3-am642-evm"; type = "flat_dt";@@ -443,26 +318,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM64 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM64 Board"; }; fdt-0 {arch/arm/dts/k3-am65x-binman.dtsi +8
-265@@ -42,77 +42,7 @@ }; itb { filename = "sysfw-am65x_sr2-hs-evm.itb"; - fit { - description = "SYSFW and Config fragments"; - #address-cells = <1>; - images { - sysfw.bin { - description = "sysfw"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "sysfw.bin"; - }; - }; - board-cfg.bin { - description = "board-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&board_cfg>; - keyfile = "custMpk.pem"; - }; - board_cfg: board-cfg { - filename = "board-cfg.bin"; - type = "blob-ext"; - }; - }; - pm-cfg.bin { - description = "pm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&pm_cfg>; - keyfile = "custMpk.pem"; - }; - pm_cfg: pm-cfg { - filename = "pm-cfg.bin"; - type = "blob-ext"; - }; - }; - rm-cfg.bin { - description = "rm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&rm_cfg>; - keyfile = "custMpk.pem";\ - }; - rm_cfg: rm-cfg { - filename = "rm-cfg.bin"; - type = "blob-ext"; - }; - }; - sec-cfg.bin { - description = "sec-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&sec_cfg>; - keyfile = "custMpk.pem"; - }; - sec_cfg: sec-cfg { - filename = "sec-cfg.bin"; - type = "blob-ext"; - }; - }; - }; - }; + insert-template = <&itb_template>; }; };@@ -149,55 +79,14 @@ itb_gp { filename = "sysfw-am65x_sr2-gp-evm.itb"; symlink = "sysfw.itb"; + insert-template = <&itb_unsigned_template>; fit { - description = "SYSFW and Config fragments"; - #address-cells = <1>; images { sysfw.bin { - description = "sysfw"; - type = "firmware"; - arch = "arm"; - compression = "none"; blob-ext { filename = "sysfw.bin_gp"; }; }; - board-cfg.bin { - description = "board-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "board-cfg.bin"; - }; - }; - pm-cfg.bin { - description = "pm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "pm-cfg.bin"; - }; - }; - rm-cfg.bin { - description = "rm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "rm-cfg.bin"; - }; - }; - sec-cfg.bin { - description = "sec-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "sec-cfg.bin"; - }; - }; }; }; };@@ -206,86 +95,22 @@ #ifdef CONFIG_TARGET_AM654_A53_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb" - -#define UBOOT_NODTB "u-boot-nodtb.bin" #define AM654_EVM_DTB "u-boot.dtb" &binman { ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "/dev/null"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-am654-base-board"; type = "flat_dt";@@ -317,29 +142,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM65 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM65 Board"; }; fdt-0 {@@ -378,67 +186,16 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "/dev/null"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-j721e-common-proc-board"; type = "flat_dt";@@ -466,26 +223,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for AM65 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for AM65 Board"; }; fdt-0 {arch/arm/dts/k3-j7200-binman.dtsi +6
-153@@ -180,10 +180,7 @@ #ifdef CONFIG_TARGET_J7200_A72_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_J7200_EVM_DTB "spl/dts/k3-j7200-common-proc-board.dtb" - -#define UBOOT_NODTB "u-boot-nodtb.bin" #define J7200_EVM_DTB "u-boot.dtb" &binman {@@ -194,82 +191,20 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; ti-secure { content = <&dm>; keyfile = "custMpk.pem"; }; - dm: blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-j7200-common-proc-board"; type = "flat_dt";@@ -302,29 +237,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for J7200 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for J7200 Board"; }; fdt-0 {@@ -362,67 +280,16 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob { - filename = SPL_NODTB; - }; - }; - fdt-1 { description = "k3-j7200-common-proc-board"; type = "flat_dt";@@ -450,26 +317,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for J7200 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for J7200 Board"; }; fdt-1 {arch/arm/dts/k3-j721e-binman.dtsi +10
-322@@ -42,78 +42,7 @@ }; itb { filename = "sysfw-j721e_sr1_1-hs-evm.itb"; - fit { - description = "SYSFW and Config fragments"; - #address-cells = <1>; - images { - sysfw.bin { - description = "sysfw"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "sysfw.bin"; - }; - }; - board-cfg.bin { - description = "board-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&board_cfg>; - keyfile = "custMpk.pem"; - }; - board_cfg: board-cfg { - filename = "board-cfg.bin"; - type = "blob-ext"; - }; - - }; - pm-cfg.bin { - description = "pm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&pm_cfg>; - keyfile = "custMpk.pem"; - }; - pm_cfg: pm-cfg { - filename = "pm-cfg.bin"; - type = "blob-ext"; - }; - }; - rm-cfg.bin { - description = "rm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&rm_cfg>; - keyfile = "custMpk.pem"; - }; - rm_cfg: rm-cfg { - filename = "rm-cfg.bin"; - type = "blob-ext"; - }; - }; - sec-cfg.bin { - description = "sec-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - ti-secure { - content = <&sec_cfg>; - keyfile = "custMpk.pem"; - }; - sec_cfg: sec-cfg { - filename = "sec-cfg.bin"; - type = "blob-ext"; - }; - }; - }; - }; + insert-template = <&itb_template>; }; };@@ -145,62 +74,7 @@ }; itb_fs { filename = "sysfw-j721e_sr2-hs-fs-evm.itb"; - fit { - description = "SYSFW and Config fragments"; - #address-cells = <1>; - images { - sysfw.bin { - description = "sysfw"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "sysfw.bin_fs"; - }; - }; - board-cfg.bin { - description = "board-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - board-cfg { - filename = "board-cfg.bin"; - type = "blob-ext"; - }; - - }; - pm-cfg.bin { - description = "pm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - pm-cfg { - filename = "pm-cfg.bin"; - type = "blob-ext"; - }; - }; - rm-cfg.bin { - description = "rm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - rm-cfg { - filename = "rm-cfg.bin"; - type = "blob-ext"; - }; - }; - sec-cfg.bin { - description = "sec-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - sec-cfg { - filename = "sec-cfg.bin"; - type = "blob-ext"; - }; - }; - }; - }; + insert-template = <&itb_unsigned_template>; }; };@@ -237,55 +111,15 @@ itb_gp { filename = "sysfw-j721e-gp-evm.itb"; symlink = "sysfw.itb"; + insert-template = <&itb_unsigned_template>; + fit { - description = "SYSFW and Config fragments"; - #address-cells = <1>; images { sysfw.bin { - description = "sysfw"; - type = "firmware"; - arch = "arm"; - compression = "none"; blob-ext { filename = "sysfw.bin_gp"; }; }; - board-cfg.bin { - description = "board-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "board-cfg.bin"; - }; - }; - pm-cfg.bin { - description = "pm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "pm-cfg.bin"; - }; - }; - rm-cfg.bin { - description = "rm-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "rm-cfg.bin"; - }; - }; - sec-cfg.bin { - description = "sec-cfg"; - type = "firmware"; - arch = "arm"; - compression = "none"; - blob-ext { - filename = "sec-cfg.bin"; - }; - }; }; }; };@@ -294,11 +128,9 @@ #ifdef CONFIG_TARGET_J721E_A72_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_J721E_EVM_DTB "spl/dts/k3-j721e-common-proc-board.dtb" #define SPL_J721E_SK_DTB "spl/dts/k3-j721e-sk.dtb" -#define UBOOT_NODTB "u-boot-nodtb.bin" #define J721E_EVM_DTB "u-boot.dtb" #define J721E_SK_DTB "arch/arm/dts/k3-j721e-sk.dtb"@@ -310,55 +142,11 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; ti-secure { content = <&dm>; keyfile = "custMpk.pem";@@ -368,24 +156,6 @@ }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-j721e-common-proc-board"; type = "flat_dt";@@ -439,29 +209,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; - + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; images { uboot { - description = "U-Boot for j721e board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for J721E Board"; }; fdt-0 {@@ -524,67 +277,16 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-j721e-common-proc-board"; type = "flat_dt";@@ -629,26 +331,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for j721e board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for J721E Board"; }; fdt-0 {arch/arm/dts/k3-j721s2-binman.dtsi +6
-151@@ -141,11 +141,9 @@ #ifdef CONFIG_TARGET_J721S2_A72_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_J721S2_EVM_DTB "spl/dts/k3-j721s2-common-proc-board.dtb" #define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb" -#define UBOOT_NODTB "u-boot-nodtb.bin" #define J721S2_EVM_DTB "u-boot.dtb" #define AM68_SK_DTB "arch/arm/dts/k3-am68-sk-base-board.dtb"@@ -157,55 +155,11 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>; - keyfile = "custMpk.pem"; - }; - atf: atf-bl31 { - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - ti-secure { - content = <&tee>; - keyfile = "custMpk.pem"; - }; - tee: tee-os { - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; ti-secure { content = <&dm>; keyfile = "custMpk.pem";@@ -215,23 +169,6 @@ }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - ti-secure { - content = <&u_boot_spl_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_spl_nodtb: blob-ext { - filename = SPL_NODTB; - }; - }; - fdt-0 { description = "k3-j721s2-common-proc-board"; type = "flat_dt";@@ -285,29 +222,12 @@ &binman { u-boot { - filename = "u-boot.img"; - pad-byte = <0xff>; + insert-template = <&u_boot_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for J721S2 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - ti-secure { - content = <&u_boot_nodtb>; - keyfile = "custMpk.pem"; - }; - u_boot_nodtb: u-boot-nodtb { - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for J721S2 Board"; }; fdt-0 {@@ -371,67 +291,16 @@ &binman { ti-spl_unsigned { - filename = "tispl.bin_unsigned"; - pad-byte = <0xff>; + insert-template = <&ti_spl_unsigned_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - atf-bl31 { - filename = "bl31.bin"; - }; - }; - - tee { - description = "OP-TEE"; - type = "tee"; - arch = "arm64"; - compression = "none"; - os = "tee"; - load = <0x9e800000>; - entry = <0x9e800000>; - tee-os { - filename = "tee-raw.bin"; - }; - }; - dm { - description = "DM binary"; - type = "firmware"; - arch = "arm32"; - compression = "none"; - os = "DM"; - load = <0x89000000>; - entry = <0x89000000>; blob-ext { filename = "ti-dm.bin"; }; }; - spl { - description = "SPL (64-bit)"; - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <CONFIG_SPL_TEXT_BASE>; - entry = <CONFIG_SPL_TEXT_BASE>; - blob { - filename = "spl/u-boot-spl-nodtb.bin"; - }; - }; - fdt-0 { description = "k3-j721s2-common-proc-board"; type = "flat_dt";@@ -475,26 +344,12 @@ &binman { u-boot_unsigned { - filename = "u-boot.img_unsigned"; - pad-byte = <0xff>; + insert-template = <&u_boot_unsigned_template>; fit { - description = "FIT image with multiple configurations"; - images { uboot { - description = "U-Boot for J721S2 board"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compression = "none"; - load = <CONFIG_TEXT_BASE>; - blob { - filename = UBOOT_NODTB; - }; - hash { - algo = "crc32"; - }; + description = "U-Boot for J721S2 Board"; }; fdt-0 {Signature · 1 line
2.34.1
Re: [PATCH 2/2] arm: dts: k3-*-binman: Move to using templated FITs
Hi Manorit
Quoted 58 lines · Manorit Chawdhry
Hi Neha,
Quoted 55 lines · Neha Malcom Francis
Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 8 files changed, 54 insertions(+), 1488 deletions(-)arch/arm/dts/k3-am625-sk-binman.dtsi +1
-19@@ -141,10 +141,7 @@ #ifdef CONFIG_TARGET_AM625_A53_EVM -#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" #define SPL_AM625_SK_DTB "spl/dts/k3-am625-sk.dtb" - -#define UBOOT_NODTB "u-boot-nodtb.bin" #define AM625_SK_DTB "u-boot.dtb" &binman {@@ -155,55 +152,11 @@ }; }; ti-spl { - filename = "tispl.bin"; - pad-byte = <0xff>; + insert-template = <&ti_spl_template>; fit { - description = "Configuration to load ATF and SPL"; - #address-cells = <1>; - images { - - atf { - description = "ARM Trusted Firmware"; - type = "firmware"; - arch = "arm64"; - compression = "none"; - os = "arm-trusted-firmware"; - load = <CONFIG_K3_ATF_LOAD_ADDR>; - entry = <CONFIG_K3_ATF_LOAD_ADDR>; - ti-secure { - content = <&atf>;
Quoted 9 lines
arch/arm/dts/k3-am625-sk-binman.dtsi line 178
Quoted 2 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +0
-2- keyfile = "custMpk.pem"; - };For ATF/OP-TEE Firewalling, can you keep these nodes intact? Just keep the ti-secure inside atf and tee nodes similar to how you have done that for DM as all the ATF/OPTEE nodes in the tispl.bin would be different for devices w.r.t certifications but we can still use templates for other common stuff.
I believe you will still be able to process firewalling by adding the extra parameters in the board binman DTSI file. The reason for retaining DM was different. For example, for J721E:
arch/arm/dts/k3-j721e-binman.dtsi +21 -0
@@ -146,6 +146,27 @@ fit { images { + atf { + ti-secure { + auth-in-place = <0xa02>; + + firewall-257-0 { + /* cpu_0_cpu_0_msmc Background Firewall */ + id = <257>; + region = <0>; + control = <(FWCTRL_EN | FWCTRL_LOCK | + FWCTRL_BG | FWCTRL_CACHE)>; + permissions = <((FWPRIVID_ALL << FWPRIVID_SHIFT) | + FWPERM_SECURE_PRIV_RWCD | + FWPERM_SECURE_USER_RWCD | + FWPERM_NON_SECURE_PRIV_RWCD | + FWPERM_NON_SECURE_USER_RWCD)>; + start_address = <0x0 0x0>; + end_address = <0xff 0xffffffff>; + }; + }; + }; + dm { ti-secure { content = <&dm>;
I have only checked whether this builds fine without any errors. If you could check whether the intended functionality also works, we should be good.
Quoted 10 lines
With this change,
Reviewed-by Manorit Chawdhry <[email protected]>Regards,
ManoritQuoted 4 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +0
-4- atf: atf-bl31 { - }; - }; -
[...]
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH 2/2] arm: dts: k3-*-binman: Move to using templated FITs
In reply to Neha Malcom FrancisQuoted 8 lines · Neha Malcom Francis
Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).
Signed-off-by Neha Malcom Francis <[email protected]>Acked-by Andrew Davis <[email protected]>Reviewed-by Simon Glass <[email protected]>Reviewed-by Manorit Chawdhry <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Hi Neha
Quoted 11 lines · Neha Malcom Francis
Instead of duplicating the same FIT formats over and over again for different K3 devices, make use of the templating support to have FIT templates for the same.
Note: I purposely did not add the trial to template out the non-FIT bootloader image (tiboot3.bin) as it reduces the readibility and understandability of how the image is packaged because of the various different boot flows.
Boot logs:
https://gist.github.com/nehamalcom/9abe7955ebb4a251923e76412834c886
For the whole series:
Quoted 13 lines
Neha Malcom Francis (2):
arm: dts: k3-binman: Add support for FIT templates
arm: dts: k3-*-binman: Move to using templated FITsarch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-binman.dtsi | 327 +++++++++++++++++ arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +--------
Quoted 1 line
9 files changed, 381 insertions(+), 1488 deletions(-)
Thanks!
Cheers
Marcel
Hi Marcel,
Quoted 12 lines · Marcel Ziswiler
Hi Neha
Quoted 9 lines · Neha Malcom Francis
Instead of duplicating the same FIT formats over and over again for different K3 devices, make use of the templating support to have FIT templates for the same.
Note: I purposely did not add the trial to template out the non-FIT bootloader image (tiboot3.bin) as it reduces the readibility and understandability of how the image is packaged because of the various different boot flows.
Quoted 7 lines
Quoted 2 lines
Boot logs:
https://gist.github.com/nehamalcom/9abe7955ebb4a251923e76412834c886For the whole series:
Tested-by Marcel Ziswiler <[email protected]>
Thanks for testing!
Quoted 20 lines
Quoted 4 lines
Neha Malcom Francis (2):
arm: dts: k3-binman: Add support for FIT templates
arm: dts: k3-*-binman: Move to using templated FITsQuoted 10 lines
arch/arm/dts/k3-am625-sk-binman.dtsi | 157 +-------- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 155 +------- arch/arm/dts/k3-am62a-sk-binman.dtsi | 158 +-------- arch/arm/dts/k3-am64x-binman.dtsi | 151 +------- arch/arm/dts/k3-am65x-binman.dtsi | 273 +------------- arch/arm/dts/k3-binman.dtsi | 327 +++++++++++++++++ arch/arm/dts/k3-j7200-binman.dtsi | 159 +-------- arch/arm/dts/k3-j721e-binman.dtsi | 332 +----------------- arch/arm/dts/k3-j721s2-binman.dtsi | 157 +-------- 9 files changed, 381 insertions(+), 1488 deletions(-)Thanks!
Cheers
Marcel
Signature · 2 lines
Thanking You Neha Malcom Francis