Hi Neha,

On Wed, 19 Jul 2023 at 13:11, Simon Glass <s...@chromium.org> wrote:
>
> Hi Neha,
>
> On Wed, 19 Jul 2023 at 05:08, Neha Malcom Francis <n-fran...@ti.com> wrote:
> >
> > Hi Simon
> >
> > On 18/07/23 18:54, Simon Glass wrote:
> > > Collections can used to collect the contents of other entries into a
> > > single entry, but they result in a single entry, with the original entries
> > > 'left behind' in their old place.
> > >
> > > It is useful to be able to specific a set of entries ones and have it used
> > > in multiple images, or parts of an image.
> > >
> > > Implement this mechanism.
> > >
> > > Signed-off-by: Simon Glass <s...@chromium.org>
> > > ---
> > >
> > > (no changes since v4)
> > >
> > > Changes in v4:
> > > - Copy over properties from the top-level template node
> > >
> > > Changes in v2:
> > > - Correct ordering of template nodes
> > > - Fix 'preseverd' and 'inserter' typos
> > >
> > >   tools/binman/binman.rst            | 87 ++++++++++++++++++++++++++++++
> > >   tools/binman/control.py            | 26 +++++++++
> > >   tools/binman/etype/section.py      |  3 +-
> > >   tools/binman/ftest.py              |  8 +++
> > >   tools/binman/test/286_template.dts | 42 +++++++++++++++
> > >   5 files changed, 165 insertions(+), 1 deletion(-)
> > >   create mode 100644 tools/binman/test/286_template.dts
> > >
>
> [..]
>
> >
> > While trying to use the templating feature in the K3 boot-loader 
> > generation, I
> > seem to face an issue getting a node via phandle. My dts looks something 
> > like this:
> >
> > ti_spl_template: template-1 {
> >         fit {
> >                 images {
> >                         atf {
> >                                 ti-secure {
> >                                         content = <&atf>;
> >                                         keyfile = "key.pem";
> >                                 };
> >                                 atf: atf-bl31 {
> >                                 };
> >                         };
> >                 };
> >         };
> > };
> >
> > ti-spl {
> >         insert-template = <&ti_spl_template>;
> >         fit {
> >                 images {
> >                         fdt-0 {
> >                                 ti-secure {
> >                                         content = <&foo_dtb>;
> >                                         keyfile = "key.pem";
> >                                 };
> >                                 foo_dtb: blob-ext {
> >                                         filename = "foo.dtb";
> >                                 };
> >                         };
> >                 };
> >         };
> > };
> >
> > The signing in the template node throws the error:
> > binman: Node '/binman/ti-spl/fit/images/atf/ti-secure': Cannot find entry 
> > for
> > node 'atf-bl31'
> >
> > I understand the phandle is not copied over. And I can work around this by
> > moving the signing contents over to the target node instead of the 
> > template. But
> > again, trying for least code duplication here; so any way around?
>
> I can repeat this, so will take a look, hopefully tomorrow.

I have an initial series to deal with this, available at u-boot-dm/bina-working

I will send the patches.

Regards,
Simon

Reply via email to