Hi Nishanth
On 24-Jan-24 2:22 AM, Nishanth Menon wrote:
On 20:28-20240123, Apurva Nandan wrote:
[...]
in j784s4-binman.dtsi:
&binman {
j784s4_tiboot3_hs_fs_template: template-9 {
and then in sk.dtsi:
sk.dtsi means sk-uboot.dtsi or sk-binman.dtsi?
you wont need an sk-binman.dtsi with template. sk-u-boot.dtsi and
r5-sk.dts ofcourse will instantiate the required templates!
&binman {
ti-j784s4-hs-evm.bin {
insert-template =<&j784s4_tiboot3_hs_fs_template>;
};
};
This allows boards to readily include the template for the binaries of
choice and generate just relevant output. Wont it save much confusion?
[...]
It is still little unclear what is the full thing that you are recommending
to implement here.
From what I understood, is it as follows?
- Three binman files will be there: j784s4-binman.dtsi (soc binman),
j784s4-evm-binman.dtsi and am69-sk-binman.dtsi (board binman)
Nope. just j784s4-binman.dtsi with bin file templates for different kinds
of devices.
- j784s4-binman.dtsi will be a SoC binman, and will have only templates for
all tiboot3 gp, hs, hsfs, and tispl/uboot
tiboot3.bin is a an example, but you should do templates for other files
(tispl, u-boot.img... )as well on similar lines. So all a board file
ideally should instantiate is device types it wants and overrides of
dtbs it needs.
- The board binman files will include these templates and update the dtb
files in them.
Correct.
- Final board.dts will use the correct board-binman.dtsi files
if the templates are abstract enough, the additional code will be so
minimal that we wont need a board-binman.dtsi - just u-boot.dtsi and
r5.dtsi can include the relevant templates.
Hope this helps.
So I took a stab at working on this for couple of days, a fix was needed
within the tool to allow binman to handle multiple consecutive templates
which is needed here etc. which is why it did not work as is; but the
built binaries are still not stable for boot. I think this will need
some additional work and debugging. As of now, templating is not widely
used, so I'm guessing some more minor fixes would be needed to get it
building as we intend.
If you are okay, I think we can take this series as is for now, I will
take action to start off a series cleaning up and using templating for
all the devices.
--
Thanking You
Neha Malcom Francis