From: Neha Malcom Francis <n-francis@ti.com>
To: Manorit Chawdhry <m-chawdhry@ti.com>
Cc: <u-boot@lists.denx.de>, <trini@konsulko.com>, <sjg@chromium.org>,
<alpernebiyasak@gmail.com>, <bb@ti.com>, <nm@ti.com>,
<sumit.garg@linaro.org>, <michal.simek@amd.com>, <marex@denx.de>,
<neil.armstrong@linaro.org>, <afd@ti.com>, <vigneshr@ti.com>,
<kamlesh@ti.com>, <u-kumar1@ti.com>
Subject: Re: [PATCH 3/4] arm: dts: k3-*-binman.dtsi: Clean up and templatize boot binaries
Date: Mon, 25 Mar 2024 15:50:24 +0530 [thread overview]
Message-ID: <ad97dffa-08d5-4327-b28e-bfc460aa5dad@ti.com> (raw)
In-Reply-To: <20240325092028.cjbtsdu4t7eo67dp@uda0497581>
Hi Manorit
On 25/03/24 14:50, Manorit Chawdhry wrote:
> Hi Neha,
>
> On 18:40-20240322, Neha Malcom Francis wrote:
>> Clean up templatized boot binaries for all K3 boards. This includes
>> modifying the k3-binman.dtsi to use SPL_BOARD_DTB, BOARD_DESCRIPTION and
>> UBOOT_BOARD_DESCRIPTION from the files that include it to further reuse
>> code.
>>
>> All k3-<soc>-binman.dtsi will contain only templates. Only required boot
>> binaries can be built from the templates in the boards' respective
>> -u-boot.dtsi file (or k3-<board>-binman.dtsi if it exists). This allows
>> clear distinction between the SoC common stuff vs. what is additionally
>> needed to boot up a specific board.
>>
>> Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
>> ---
>> arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 161 +---------
>> arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 291 +----------------
>> arch/arm/dts/k3-am625-r5-beagleplay.dts | 39 ---
>> arch/arm/dts/k3-am625-sk-binman.dtsi | 148 +--------
>> arch/arm/dts/k3-am625-sk-u-boot.dtsi | 42 +++
>> .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 296 +-----------------
>> arch/arm/dts/k3-am62a-sk-binman.dtsi | 146 +--------
>> arch/arm/dts/k3-am62a7-sk-u-boot.dtsi | 42 +++
>> arch/arm/dts/k3-am642-evm-u-boot.dtsi | 42 +++
>> arch/arm/dts/k3-am642-sk-u-boot.dtsi | 42 +++
>> arch/arm/dts/k3-am64x-binman.dtsi | 239 +-------------
>> arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 49 +++
>> arch/arm/dts/k3-am65x-binman.dtsi | 144 +--------
>> .../arm/dts/k3-am68-sk-base-board-u-boot.dtsi | 26 ++
>> arch/arm/dts/k3-am69-sk-u-boot.dtsi | 31 +-
>> arch/arm/dts/k3-binman.dtsi | 96 ++++++
>> arch/arm/dts/k3-j7200-binman.dtsi | 145 +--------
>> .../k3-j7200-common-proc-board-u-boot.dtsi | 40 +++
>> .../dts/k3-j721e-beagleboneai64-u-boot.dtsi | 154 +--------
>> arch/arm/dts/k3-j721e-binman.dtsi | 262 +++-------------
>> .../k3-j721e-common-proc-board-u-boot.dtsi | 84 +++++
>> arch/arm/dts/k3-j721e-r5-beagleboneai64.dts | 91 +-----
>> arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 84 +++++
>> arch/arm/dts/k3-j721s2-binman.dtsi | 231 +-------------
>> .../k3-j721s2-common-proc-board-u-boot.dtsi | 42 +++
>> arch/arm/dts/k3-j784s4-binman.dtsi | 154 +--------
>> arch/arm/dts/k3-j784s4-evm-u-boot.dtsi | 42 +++
>> 27 files changed, 858 insertions(+), 2305 deletions(-)
>>
>
> [ snip ]
>
>> diff --git a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
>> index ed50bfeb031..14fc8468c56 100644
>> --- a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
>> +++ b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
>> @@ -6,309 +6,48 @@
>> * Author: Wadim Egorov <w.egorov@phytec.de>
>> */
>>
>> -#include "k3-binman.dtsi"
>> +#define SPL_BOARD_DTB "spl/dts/k3-am625-phyboard-lyra-rdk.dtb"
>> +#define BOARD_DESCRIPTION "k3-am625-phyboard-lyra-rdk"
>> +#define UBOOT_BOARD_DESCRIPTION "U-Boot for phyCORE-AM62x"
>> +
>> +#include "k3-am625-sk-binman.dtsi"
>>
>> #ifdef CONFIG_TARGET_PHYCORE_AM62X_R5
>> &binman {
>> tiboot3-am62x-hs-phycore-som.bin {
>> filename = "tiboot3-am62x-hs-phycore-som.bin";
>> - ti-secure-rom {
>> - content = <&u_boot_spl>, <&ti_fs_enc>, <&combined_tifs_cfg>,
>> - <&combined_dm_cfg>, <&sysfw_inner_cert>;
>> - combined;
>> - dm-data;
>> - sysfw-inner-cert;
>> - keyfile = "custMpk.pem";
>> - sw-rev = <1>;
>> - content-sbl = <&u_boot_spl>;
>> - content-sysfw = <&ti_fs_enc>;
>> - content-sysfw-data = <&combined_tifs_cfg>;
>> - content-sysfw-inner-cert = <&sysfw_inner_cert>;
>> - content-dm-data = <&combined_dm_cfg>;
>
> I was looking between SoCs that we have and all this data seems common
> to me on first glance, like there is only some delta in tiboot3
> templates as well and maybe we can minimise those as well if am not
> missing anything.
>
> in k3-binman.dtsi:
>
> tiboot3_combined_gp: template-x {
> section {
> ti-secure-rom {
> content = <&u_boot_spl_unsigned>, <&ti_fs_gp>,
> <&combined_tifs_cfg_gp>, <&combined_dm_cfg_gp>;
> combined;
> dm-data;
> content-sbl = <&u_boot_spl_unsigned>;
> content-sysfw = <&ti_fs_gp>;
> content-sysfw-data = <&combined_tifs_cfg_gp>;
> content-dm-data = <&combined_dm_cfg_gp>;
> sw-rev = <1>;
> keyfile = "ti-degenerate-key.pem";
> };
> u_boot_spl_unsigned: u-boot-spl {
> no-expanded;
> };
> ti_fs_gp: ti-fs-gp.bin {
> type = "blob-ext";
> optional;
> };
> combined_tifs_cfg_gp: combined-tifs-cfg-gp.bin {
> filename = "combined-tifs-cfg.bin";
> type = "blob-ext";
> };
> combined_dm_cfg_gp: combined-dm-cfg-gp.bin {
> filename = "combined-dm-cfg.bin";
> type = "blob-ext";
> };
> };
> };
>
> in k3-j721s2-binman.dtsi:
>
> tiboot3_j721s2_gp_evm {
> insert-template = <&tiboot3_combined_gp>;
> filename = "tiboot3-j721s2-gp-evm.bin";
> section {
> ti-secure-rom {
> load = <0x41c00000>;
> load-sysfw = <0x40000>;
> load-sysfw-data = <0x67000>;
> load-dm-data = <0x41c80000>;
> }
> ti_fs_gp {
> filename = "ti-sysfw/ti-fs-firmware-j721s2-gp.bin";
> }
> }
> };
>
> in k3-j784s4-binman.dtsi:
>
> tiboot3_j784s4_gp_evm {
> insert-template = <&tiboot3_combined_gp>;
> filename = "tiboot3-j784s4-gp-evm.bin";
> section {
> ti-secure-rom {
> load = <0x41c00000>;
> load-sysfw = <0x40000>;
> load-sysfw-data = <0x66800>;
> load-dm-data = <0x41c80000>;
> }
> ti_fs_gp {
> filename = "ti-sysfw/ti-fs-firmware-j784s4-gp.bin";
> }
> }
>
> }
>
> Similar re-use can be done for other GP devices as well based on
> this template and similar can be extended for other variants HS-FS,
> HS-SE and other SR variants. This might end up a bit complicated as well
> as we do have a lot of combinations of combined boot and other boot
> variants that we have so let me know if you don't find improvement with
> this but I feel this might help in more readability and understanding
> for the initial bootloader template designs as well.
>
> Regards,
> Manorit
Yes I think we can pull these changes into k3-binman.dtsi as well, will reduce
code duplication a great deal. Thanks!
>
>> - load = <0x43c00000>;
>> - load-sysfw = <0x40000>;
>> - load-sysfw-data = <0x67000>;
>> - load-dm-data = <0x43c3a800>;
>
>
>> - };
>> - u_boot_spl: u-boot-spl {
>> - no-expanded;
>> - };
>> - ti_fs_enc: ti-fs-enc.bin {
>> - filename = "ti-sysfw/ti-fs-firmware-am62x-hs-enc.bin";
>> - type = "blob-ext";
>> - optional;
>> - };
>> - combined_tifs_cfg: combined-tifs-cfg.bin {
>> - filename = "combined-tifs-cfg.bin";
>> - type = "blob-ext";
>> - };
>> - sysfw_inner_cert: sysfw-inner-cert {
>> - filename = "ti-sysfw/ti-fs-firmware-am62x-hs-cert.bin";
>> - type = "blob-ext";
>> - optional;
>> - };
>> - combined_dm_cfg: combined-dm-cfg.bin {
>> - filename = "combined-dm-cfg.bin";
>> - type = "blob-ext";
>> - };
>> + insert-template = <&tiboot3_am62x_hs>;
>> };
>> -};
>>
>> -&binman {
>> tiboot3-am62x-hs-fs-phycore-som.bin {
>> filename = "tiboot3-am62x-hs-fs-phycore-som.bin";
>> - symlink = "tiboot3.bin";
>> - ti-secure-rom {
>> - content = <&u_boot_spl_fs>, <&ti_fs_enc_fs>, <&combined_tifs_cfg_fs>,
>> - <&combined_dm_cfg_fs>, <&sysfw_inner_cert_fs>;
>> - combined;
>> - dm-data;
>> - sysfw-inner-cert;
>> - keyfile = "custMpk.pem";
>> - sw-rev = <1>;
>> - content-sbl = <&u_boot_spl_fs>;
>> - content-sysfw = <&ti_fs_enc_fs>;
>> - content-sysfw-data = <&combined_tifs_cfg_fs>;
>> - content-sysfw-inner-cert = <&sysfw_inner_cert_fs>;
>> - content-dm-data = <&combined_dm_cfg_fs>;
>> - load = <0x43c00000>;
>> - load-sysfw = <0x40000>;
>> - load-sysfw-data = <0x67000>;
>> - load-dm-data = <0x43c3a800>;
>> - };
>> - u_boot_spl_fs: u-boot-spl {
>> - no-expanded;
>> - };
>> - ti_fs_enc_fs: ti-fs-enc.bin {
>> - filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-enc.bin";
>> - type = "blob-ext";
>> - optional;
>> - };
>> - combined_tifs_cfg_fs: combined-tifs-cfg.bin {
>> - filename = "combined-tifs-cfg.bin";
>> - type = "blob-ext";
>> - };
>> - sysfw_inner_cert_fs: sysfw-inner-cert {
>> - filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-cert.bin";
>> - type = "blob-ext";
>> - optional;
>> - };
>> - combined_dm_cfg_fs: combined-dm-cfg.bin {
>> - filename = "combined-dm-cfg.bin";
>> - type = "blob-ext";
>> - };
>> + insert-template = <&tiboot3_am62x_hs_fs>;
>> };
>> -};
>>
>> -&binman {
>> tiboot3-am62x-gp-phycore-som.bin {
>> filename = "tiboot3-am62x-gp-phycore-som.bin";
>> - ti-secure-rom {
>> - content = <&u_boot_spl_unsigned>, <&ti_fs_gp>,
>> - <&combined_tifs_cfg_gp>, <&combined_dm_cfg_gp>;
>> - combined;
>> - dm-data;
>> - content-sbl = <&u_boot_spl_unsigned>;
>> - load = <0x43c00000>;
>> - content-sysfw = <&ti_fs_gp>;
>> - load-sysfw = <0x40000>;
>> - content-sysfw-data = <&combined_tifs_cfg_gp>;
>> - load-sysfw-data = <0x67000>;
>> - content-dm-data = <&combined_dm_cfg_gp>;
>> - load-dm-data = <0x43c3a800>;
>> - sw-rev = <1>;
>> - keyfile = "ti-degenerate-key.pem";
>> - };
>> - u_boot_spl_unsigned: u-boot-spl {
>> - no-expanded;
>> - };
>> - ti_fs_gp: ti-fs-gp.bin {
>> - filename = "ti-sysfw/ti-fs-firmware-am62x-gp.bin";
>> - type = "blob-ext";
>> - optional;
>> - };
>> - combined_tifs_cfg_gp: combined-tifs-cfg-gp.bin {
>> - filename = "combined-tifs-cfg.bin";
>> - type = "blob-ext";
>> - };
>> - combined_dm_cfg_gp: combined-dm-cfg-gp.bin {
>> - filename = "combined-dm-cfg.bin";
>> - type = "blob-ext";
>> - };
>> + insert-template = <&tiboot3_am62x_gp>;
>> };
>> };
>> #endif /* CONFIG_TARGET_PHYCORE_AM62X_R5 */
--
Thanking You
Neha Malcom Francis
next prev parent reply other threads:[~2024-03-25 10:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 13:10 [PATCH 0/4] Cleanup K3 binman templating Neha Malcom Francis
2024-03-22 13:10 ` [PATCH 1/4] configs: j721e_sk: Move to separate defconfig for J721E SK board Neha Malcom Francis
2024-03-22 13:10 ` [PATCH 2/4] tools: binman: control.py: Delete template nodes after parsing Neha Malcom Francis
2024-03-22 13:10 ` [PATCH 3/4] arm: dts: k3-*-binman.dtsi: Clean up and templatize boot binaries Neha Malcom Francis
2024-03-23 16:07 ` Andrew Davis
2024-03-25 3:35 ` Neha Malcom Francis
2024-03-25 9:20 ` Manorit Chawdhry
2024-03-25 10:20 ` Neha Malcom Francis [this message]
2024-03-26 12:27 ` Nishanth Menon
2024-03-26 12:33 ` Neha Malcom Francis
2024-03-26 13:48 ` Michael Walle
2024-03-27 7:01 ` Neha Malcom Francis
2024-03-27 14:33 ` Michael Walle
2024-03-28 11:18 ` Neha Malcom Francis
2024-03-28 11:56 ` Michael Walle
2024-04-03 5:32 ` Neha Malcom Francis
2024-04-03 10:34 ` Manorit Chawdhry
2024-04-03 15:51 ` Michael Walle
2024-04-04 8:04 ` Matthias Schiffer
2024-04-04 9:10 ` Neha Malcom Francis
2024-04-05 7:42 ` Michael Walle
2024-04-12 3:03 ` Neha Malcom Francis
2024-04-12 11:43 ` Michael Walle
2024-03-22 13:10 ` [PATCH 4/4] arm: dts: k3-j721e: Move to OF_UPSTREAM Neha Malcom Francis
2024-03-26 6:37 ` Sumit Garg
2024-04-12 14:50 ` [PATCH 0/4] Cleanup K3 binman templating Tom Rini
2024-04-15 19:13 ` Neha Malcom Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad97dffa-08d5-4327-b28e-bfc460aa5dad@ti.com \
--to=n-francis@ti.com \
--cc=afd@ti.com \
--cc=alpernebiyasak@gmail.com \
--cc=bb@ti.com \
--cc=kamlesh@ti.com \
--cc=m-chawdhry@ti.com \
--cc=marex@denx.de \
--cc=michal.simek@amd.com \
--cc=neil.armstrong@linaro.org \
--cc=nm@ti.com \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox