devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fdtoverlay: Remove bogus type info from help text
@ 2024-05-29 10:11 Geert Uytterhoeven
  2024-05-30 12:31 ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2024-05-29 10:11 UTC (permalink / raw)
  To: Rob Herring, Saravana Kannan
  Cc: Uwe Kleine-König, devicetree, Geert Uytterhoeven

"fdtoverlay -h" shows a.o.:

    <type>	s=string, i=int, u=unsigned, x=hex
	    Optional modifier prefix:
		    hh or b=byte, h=2 byte, l=4 byte (default)

However, unlike fdtget and fdtput, fdtoverlay does not support the
"-t"/"--type" option.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Upstream dtc has Uwe's commit 2cdf93a6d402a161 ("fdtoverlay: Fix usage
string to not mention "<type>"").

v2:
  - Drop Fixes: tag referring to dtc repo.
---
 scripts/dtc/fdtoverlay.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/dtc/fdtoverlay.c b/scripts/dtc/fdtoverlay.c
index 5350af65679f7fbd..cac6b6576c289c18 100644
--- a/scripts/dtc/fdtoverlay.c
+++ b/scripts/dtc/fdtoverlay.c
@@ -23,9 +23,7 @@
 /* Usage related data. */
 static const char usage_synopsis[] =
 	"apply a number of overlays to a base blob\n"
-	"	fdtoverlay <options> [<overlay.dtbo> [<overlay.dtbo>]]\n"
-	"\n"
-	USAGE_TYPE_MSG;
+	"	fdtoverlay <options> [<overlay.dtbo> [<overlay.dtbo>]]";
 static const char usage_short_opts[] = "i:o:v" USAGE_COMMON_SHORT_OPTS;
 static struct option const usage_long_opts[] = {
 	{"input",            required_argument, NULL, 'i'},
-- 
2.34.1


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

* Re: [PATCH v2] fdtoverlay: Remove bogus type info from help text
  2024-05-29 10:11 [PATCH v2] fdtoverlay: Remove bogus type info from help text Geert Uytterhoeven
@ 2024-05-30 12:31 ` Rob Herring
  2024-05-30 13:31   ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2024-05-30 12:31 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Saravana Kannan, Uwe Kleine-König, devicetree

On Wed, May 29, 2024 at 5:11 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> "fdtoverlay -h" shows a.o.:
>
>     <type>      s=string, i=int, u=unsigned, x=hex
>             Optional modifier prefix:
>                     hh or b=byte, h=2 byte, l=4 byte (default)
>
> However, unlike fdtget and fdtput, fdtoverlay does not support the
> "-t"/"--type" option.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Upstream dtc has Uwe's commit 2cdf93a6d402a161 ("fdtoverlay: Fix usage
> string to not mention "<type>"").

So you want me to sync upstream? That's how upstream commits get into
the kernel. I don't take patches (unless there's some urgent
breakage).

Rob

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

* Re: [PATCH v2] fdtoverlay: Remove bogus type info from help text
  2024-05-30 12:31 ` Rob Herring
@ 2024-05-30 13:31   ` Geert Uytterhoeven
  2024-05-31 13:42     ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2024-05-30 13:31 UTC (permalink / raw)
  To: Rob Herring; +Cc: Saravana Kannan, Uwe Kleine-König, devicetree

Hi Rob,

On Thu, May 30, 2024 at 2:31 PM Rob Herring <robh@kernel.org> wrote:
> On Wed, May 29, 2024 at 5:11 AM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> >
> > "fdtoverlay -h" shows a.o.:
> >
> >     <type>      s=string, i=int, u=unsigned, x=hex
> >             Optional modifier prefix:
> >                     hh or b=byte, h=2 byte, l=4 byte (default)
> >
> > However, unlike fdtget and fdtput, fdtoverlay does not support the
> > "-t"/"--type" option.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > Upstream dtc has Uwe's commit 2cdf93a6d402a161 ("fdtoverlay: Fix usage
> > string to not mention "<type>"").
>
> So you want me to sync upstream? That's how upstream commits get into
> the kernel. I don't take patches (unless there's some urgent
> breakage).

If that's the policy, then yes please ;-)

Apparently it's been +2.5y since last sync...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2] fdtoverlay: Remove bogus type info from help text
  2024-05-30 13:31   ` Geert Uytterhoeven
@ 2024-05-31 13:42     ` Rob Herring
  2024-05-31 14:06       ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2024-05-31 13:42 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Saravana Kannan, Uwe Kleine-König, devicetree

On Thu, May 30, 2024 at 8:32 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Rob,
>
> On Thu, May 30, 2024 at 2:31 PM Rob Herring <robh@kernel.org> wrote:
> > On Wed, May 29, 2024 at 5:11 AM Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > >
> > > "fdtoverlay -h" shows a.o.:
> > >
> > >     <type>      s=string, i=int, u=unsigned, x=hex
> > >             Optional modifier prefix:
> > >                     hh or b=byte, h=2 byte, l=4 byte (default)
> > >
> > > However, unlike fdtget and fdtput, fdtoverlay does not support the
> > > "-t"/"--type" option.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > ---
> > > Upstream dtc has Uwe's commit 2cdf93a6d402a161 ("fdtoverlay: Fix usage
> > > string to not mention "<type>"").
> >
> > So you want me to sync upstream? That's how upstream commits get into
> > the kernel. I don't take patches (unless there's some urgent
> > breakage).
>
> If that's the policy, then yes please ;-)

With current dtc main branch, I get these errors:

Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/draak-ebisu-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/draak-ebisu-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND
Failed to apply
'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
FDT_ERR_NOTFOUND

Rob

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

* Re: [PATCH v2] fdtoverlay: Remove bogus type info from help text
  2024-05-31 13:42     ` Rob Herring
@ 2024-05-31 14:06       ` Geert Uytterhoeven
  2024-05-31 14:38         ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2024-05-31 14:06 UTC (permalink / raw)
  To: Rob Herring; +Cc: Saravana Kannan, Uwe Kleine-König, devicetree

Hi Rob,

On Fri, May 31, 2024 at 3:43 PM Rob Herring <robh@kernel.org> wrote:
> On Thu, May 30, 2024 at 8:32 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Thu, May 30, 2024 at 2:31 PM Rob Herring <robh@kernel.org> wrote:
> > > On Wed, May 29, 2024 at 5:11 AM Geert Uytterhoeven
> > > <geert+renesas@glider.be> wrote:
> > > >
> > > > "fdtoverlay -h" shows a.o.:
> > > >
> > > >     <type>      s=string, i=int, u=unsigned, x=hex
> > > >             Optional modifier prefix:
> > > >                     hh or b=byte, h=2 byte, l=4 byte (default)
> > > >
> > > > However, unlike fdtget and fdtput, fdtoverlay does not support the
> > > > "-t"/"--type" option.
> > > >
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > ---
> > > > Upstream dtc has Uwe's commit 2cdf93a6d402a161 ("fdtoverlay: Fix usage
> > > > string to not mention "<type>"").
> > >
> > > So you want me to sync upstream? That's how upstream commits get into
> > > the kernel. I don't take patches (unless there's some urgent
> > > breakage).
> >
> > If that's the policy, then yes please ;-)
>
> With current dtc main branch, I get these errors:
>
> Failed to apply
> 'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
> FDT_ERR_NOTFOUND

Interesting...

Do you know what's the problem?
Are these the only ones failing?

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2] fdtoverlay: Remove bogus type info from help text
  2024-05-31 14:06       ` Geert Uytterhoeven
@ 2024-05-31 14:38         ` Rob Herring
  2024-05-31 15:00           ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2024-05-31 14:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Saravana Kannan, Uwe Kleine-König, devicetree

On Fri, May 31, 2024 at 9:07 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Rob,
>
> On Fri, May 31, 2024 at 3:43 PM Rob Herring <robh@kernel.org> wrote:
> > On Thu, May 30, 2024 at 8:32 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Thu, May 30, 2024 at 2:31 PM Rob Herring <robh@kernel.org> wrote:
> > > > On Wed, May 29, 2024 at 5:11 AM Geert Uytterhoeven
> > > > <geert+renesas@glider.be> wrote:
> > > > >
> > > > > "fdtoverlay -h" shows a.o.:
> > > > >
> > > > >     <type>      s=string, i=int, u=unsigned, x=hex
> > > > >             Optional modifier prefix:
> > > > >                     hh or b=byte, h=2 byte, l=4 byte (default)
> > > > >
> > > > > However, unlike fdtget and fdtput, fdtoverlay does not support the
> > > > > "-t"/"--type" option.
> > > > >
> > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > ---
> > > > > Upstream dtc has Uwe's commit 2cdf93a6d402a161 ("fdtoverlay: Fix usage
> > > > > string to not mention "<type>"").
> > > >
> > > > So you want me to sync upstream? That's how upstream commits get into
> > > > the kernel. I don't take patches (unless there's some urgent
> > > > breakage).
> > >
> > > If that's the policy, then yes please ;-)
> >
> > With current dtc main branch, I get these errors:
> >
> > Failed to apply
> > 'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
> > FDT_ERR_NOTFOUND
>
> Interesting...
>
> Do you know what's the problem?

No. Since it is conveniently platforms you care about, I thought I'd
leave it to you. ;)

Well, it seems that if I use the upstream built dtc and fdtoverlay it
works fine. Using the one in scripts/dtc/ doesn't. Looks like that
issue is on me...

> Are these the only ones failing?

Yes. And all of arm32 was fine.

Rob

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

* Re: [PATCH v2] fdtoverlay: Remove bogus type info from help text
  2024-05-31 14:38         ` Rob Herring
@ 2024-05-31 15:00           ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2024-05-31 15:00 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Saravana Kannan, devicetree, Uwe Kleine-König,
	Devicetree Compiler

Uwe's Pengutronix email is bouncing, so switched to kernel.org acct.

+dtc list

On Fri, May 31, 2024 at 9:38 AM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, May 31, 2024 at 9:07 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > Hi Rob,
> >
> > On Fri, May 31, 2024 at 3:43 PM Rob Herring <robh@kernel.org> wrote:
> > > On Thu, May 30, 2024 at 8:32 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > On Thu, May 30, 2024 at 2:31 PM Rob Herring <robh@kernel.org> wrote:
> > > > > On Wed, May 29, 2024 at 5:11 AM Geert Uytterhoeven
> > > > > <geert+renesas@glider.be> wrote:
> > > > > >
> > > > > > "fdtoverlay -h" shows a.o.:
> > > > > >
> > > > > >     <type>      s=string, i=int, u=unsigned, x=hex
> > > > > >             Optional modifier prefix:
> > > > > >                     hh or b=byte, h=2 byte, l=4 byte (default)
> > > > > >
> > > > > > However, unlike fdtget and fdtput, fdtoverlay does not support the
> > > > > > "-t"/"--type" option.
> > > > > >
> > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > > > ---
> > > > > > Upstream dtc has Uwe's commit 2cdf93a6d402a161 ("fdtoverlay: Fix usage
> > > > > > string to not mention "<type>"").
> > > > >
> > > > > So you want me to sync upstream? That's how upstream commits get into
> > > > > the kernel. I don't take patches (unless there's some urgent
> > > > > breakage).
> > > >
> > > > If that's the policy, then yes please ;-)
> > >
> > > With current dtc main branch, I get these errors:
> > >
> > > Failed to apply
> > > 'arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dtbo':
> > > FDT_ERR_NOTFOUND
> >
> > Interesting...
> >
> > Do you know what's the problem?
>
> No. Since it is conveniently platforms you care about, I thought I'd
> leave it to you. ;)
>
> Well, it seems that if I use the upstream built dtc and fdtoverlay it
> works fine. Using the one in scripts/dtc/ doesn't. Looks like that
> issue is on me...

I figured out the difference. The dtc tree build of fdtoverlay is
picking up the libfdt installed on my system. The kernel tree build is
statically linked.

A bisect points to this commit:

commit 1fad065080e6cae0ec1a4ad6288733cd24c103f9
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date:   Sun Feb 25 18:54:23 2024 +0100

    libfdt: overlay: ensure that existing phandles are not overwritten

    A phandle in an overlay is not supposed to overwrite a phandle that
    already exists in the base dtb as this breaks references to the
    respective node in the base.

    So add another iteration over the fdto that checks for such overwrites
    and fixes the fdto phandle's value to match the fdt's.

    A test is added that checks that newly added phandles and existing
    phandles work as expected.

    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Message-ID: <20240225175422.156393-2-u.kleine-koenig@pengutronix.de>
    Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

 libfdt/fdt_overlay.c              | 251 ++++++++++++++++++++++++++++++++++++++
 tests/overlay_base_phandle.dts    |  21 ++++
 tests/overlay_overlay_phandle.dts |  34 ++++++
 tests/run_tests.sh                |  28 +++++
 4 files changed, 334 insertions(+)
 create mode 100644 tests/overlay_base_phandle.dts
 create mode 100644 tests/overlay_overlay_phandle.dts

Rob

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

end of thread, other threads:[~2024-05-31 15:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 10:11 [PATCH v2] fdtoverlay: Remove bogus type info from help text Geert Uytterhoeven
2024-05-30 12:31 ` Rob Herring
2024-05-30 13:31   ` Geert Uytterhoeven
2024-05-31 13:42     ` Rob Herring
2024-05-31 14:06       ` Geert Uytterhoeven
2024-05-31 14:38         ` Rob Herring
2024-05-31 15:00           ` Rob Herring

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).