devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dtc: Allow overlays to have .dtbo extension
@ 2021-01-06  9:56 Viresh Kumar
  2021-01-11 10:56 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Viresh Kumar @ 2021-01-06  9:56 UTC (permalink / raw)
  To: devicetree-compiler, David Gibson
  Cc: Viresh Kumar, Pantelis Antoniou, Frank Rowand, Rob Herring,
	devicetree, linux-kernel, Vincent Guittot, Bill Mills,
	anmar.oueja

Allow the overlays to have .dtbo extension instead of just .dtb. This
allows them to be identified easily by tools as well as humans.

Allow the dtbo outform in dtc.c for the same.

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

---
Hello,

This was earlier posted for the Linux Kernel and here is the thread
where Rob gave his feedback:

https://lore.kernel.org/lkml/CAL_Jsq+0dL=LHo8r9mY_weBP_bQ97UOBnt596J3JoVHwGNinHA@mail.gmail.com/
---
 dtc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dtc.c b/dtc.c
index bdb3f5945699..838c5df96c00 100644
--- a/dtc.c
+++ b/dtc.c
@@ -122,6 +122,8 @@ static const char *guess_type_by_name(const char *fname, const char *fallback)
 		return "dts";
 	if (!strcasecmp(s, ".yaml"))
 		return "yaml";
+	if (!strcasecmp(s, ".dtbo"))
+		return "dtb";
 	if (!strcasecmp(s, ".dtb"))
 		return "dtb";
 	return fallback;
@@ -357,6 +359,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")) {
-- 
2.25.0.rc1.19.g042ed3e048af


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-11 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-06  9:56 [PATCH] dtc: Allow overlays to have .dtbo extension Viresh Kumar
2021-01-11 10:56 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).