On 8/10/26 2:06 PM, Anshul Dalal wrote:
On Wed Jul 29, 2026 at 4:12 PM IST, Quentin Schulz wrote:
Hi Anshul,
On 7/29/26 12:24 PM, Anshul Dalal wrote:
The phandles used inside a template are not copied to the node inserting
the template, leading to a missing phandle error.
The following example can be used to reproduce the issue:
&binman {
some_template: template-0 {
ti-secure-rom {
content = <&some_data>;
keyfile = "some_key";
};
some_data: blob-ext {
optional;
};
};
output-bin {
insert-template = <&some_template>;
};
};
What happens if you insert the template *twice*.
e.g. have:
&binman {
some_template: template-0 {
ti-secure-rom {
content = <&some_data>;
keyfile = "some_key";
};
some_data: blob-ext {
optional;
};
};
output-bin {
insert-template = <&some_template>;
};
output-bin2 {
insert-template = <&some_template>;
};
};
? Gut feeling is that this will fail to build because we now have the
same label for two different nodes.
Yes, it will cause a failure due to duplicated phandles. And as per the
docs[1], it seems to be an expected qwirk of how templates work.
What's the point of a template if we can only have it once?
Couldn't we simply have
&binman {
some_template: template-0 {
ti-secure-rom {
keyfile = "some_key";
};
blob-ext {
optional;
};
};
output-bin {
insert-template = <&some_template>;
ti-secure-rom {
content = <&{/binman/output-bin/blob-ext}>;
};
};
output-bin2 {
insert-template = <&some_template>;
ti-secure-rom {
content = <&{/binman/output-bin2/blob-ext}>;
};
};
or
&binman {
some_template: template-0 {
ti-secure-rom {
keyfile = "some_key";
};
blob-ext {
optional;
};
};
output-bin {
insert-template = <&some_template>;
ti-secure-rom {
content = <&output_bin_some_data>;
};
output_bin_some_data: blob-ext {};
};
output-bin2 {
insert-template = <&some_template>;
ti-secure-rom {
content = <&output_bin2_some_data>;
};
output_bin2_some_data: blob-ext {};
};
Cheers,
Quentin