Thread (20 messages) 20 messages, 6 authors, 2021-01-12

Re: [RFC 2/2] scripts: dtc: Handle outform dtbo

From: Frank Rowand <hidden>
Date: 2021-01-12 00:37:50
Also in: linux-kbuild, lkml

On 1/5/21 9:37 AM, Rob Herring wrote:
On Tue, Jan 5, 2021 at 4:24 AM Viresh Kumar [off-list ref] wrote:
quoted
Update dtc compiler to accept dtbo as an outform.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

---
I feel that this needs to go directly to
https://git.kernel.org/pub/scm/utils/dtc/dtc.git

Right ? I will send it separately if the idea is accepted here.
Yes, needs to go to devicetree-compiler list. I think this came up
before and IIRC David wasn't completely in agreement. I looked briefly
and couldn't find the thread though...

We really don't need a different extension because we could just
examine the dtb to determine if it is an overlay or not. That's less
obvious. We could also add meta-data to overlays defining what base
they apply to. If we had that, a tool could just list all overlays
It may be valid to apply an overlay may be valid to more than one base FDT.

And for connector nodes and plugin overlays (which do not exist yet, I'm
way behind on bringing that concept forward), a single overlay may be
applied to more than one connector node in the base FDT.
that should apply to a base and we could use that info for build time
applying overlays. Of course, that and a dtbo extension/format are not
mutually exclusive.
quoted
---
 scripts/dtc/dtc.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
index bdb3f5945699..40fa7128b3d6 100644
--- a/scripts/dtc/dtc.c
+++ b/scripts/dtc/dtc.c
@@ -357,6 +357,8 @@ int main(int argc, char *argv[])
 #endif
        } else if (streq(outform, "dtb")) {
                dt_to_blob(outf, dti, outversion);
+       } else if (streq(outform, "dtbo")) {
+               dt_to_blob(outf, dti, outversion);
        } else if (streq(outform, "asm")) {
                dt_to_asm(outf, dti, outversion);
        } else if (streq(outform, "null")) {
You also need to extend guess_type_by_name().


Rob
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help