All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Revert "Ensure device tree DTS is compiled"
@ 2019-03-07 14:13 Masahiro Yamada
  2019-03-08 23:03 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2019-03-07 14:13 UTC (permalink / raw)
  To: u-boot

This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.

I am not sure if I correctly understood the log of commit 27cb7300ffda
("Ensure device tree DTS is compiled"), but the code-diff looks like
it was trying to solve the missed re-compilation when .dts was modified.

Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
fixed the issue in a more correct and more complete way.

Anyway, since the former commit, we see a clumsy log like this:

  make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date

So, let's revert it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 dts/Makefile | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/dts/Makefile b/dts/Makefile
index 4970223..1f83e61 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -10,14 +10,10 @@ ifeq ($(DEVICE_TREE),)
 DEVICE_TREE := unset
 endif
 
-ARCH_PATH := arch/$(ARCH)/dts
-dtb_depends := arch-dtbs
-
 ifneq ($(EXT_DTB),)
 DTB := $(EXT_DTB)
 else
-DTB := $(ARCH_PATH)/$(DEVICE_TREE).dtb
-dtb_depends += $(DTB:.dtb=.dts)
+DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
 endif
 
 $(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
@@ -28,10 +24,7 @@ $(obj)/dt.dtb: $(DTB) FORCE
 
 targets += dt.dtb dt-spl.dtb
 
-$(DTB): $(dtb_depends)
-ifeq ($(EXT_DTB),)
-	$(Q)$(MAKE) $(build)=$(ARCH_PATH) $@
-endif
+$(DTB): arch-dtbs
 	$(Q)test -e $@ || (						\
 	echo >&2;							\
 	echo >&2 "Device Tree Source is not correctly specified.";	\
@@ -42,7 +35,7 @@ endif
 
 PHONY += arch-dtbs
 arch-dtbs:
-	$(Q)$(MAKE) $(build)=$(ARCH_PATH) dtbs
+	$(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs
 
 ifeq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
-- 
2.7.4

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

* [U-Boot] Revert "Ensure device tree DTS is compiled"
  2019-03-07 14:13 [U-Boot] [PATCH] Revert "Ensure device tree DTS is compiled" Masahiro Yamada
@ 2019-03-08 23:03 ` Tom Rini
  2019-03-09 16:07   ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2019-03-08 23:03 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 07, 2019 at 11:13:52PM +0900, Masahiro Yamada wrote:

> This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.
> 
> I am not sure if I correctly understood the log of commit 27cb7300ffda
> ("Ensure device tree DTS is compiled"), but the code-diff looks like
> it was trying to solve the missed re-compilation when .dts was modified.
> 
> Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
> fixed the issue in a more correct and more complete way.
> 
> Anyway, since the former commit, we see a clumsy log like this:
> 
>   make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
> 
> So, let's revert it.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

This causes tons of breakage like:
       arm:  +   rpi_0_w
+(rpi_0_w)
+(rpi_0_w) Device Tree Source is not correctly specified.
+(rpi_0_w) Please define 'CONFIG_DEFAULT_DEVICE_TREE'
+(rpi_0_w) or build with 'DEVICE_TREE=<device_tree>' argument
+(rpi_0_w) make[2]: *** [arch/arm/dts/bcm2835-rpi-zero-w.dtb] Error 1
+(rpi_0_w) make[1]: *** [dts] Error 2
+(rpi_0_w) make: *** [sub-make] Error 2

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190308/6673d09f/attachment.sig>

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

* [U-Boot] Revert "Ensure device tree DTS is compiled"
  2019-03-08 23:03 ` [U-Boot] " Tom Rini
@ 2019-03-09 16:07   ` Masahiro Yamada
  2019-03-09 17:42     ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2019-03-09 16:07 UTC (permalink / raw)
  To: u-boot

Hi Tom,


On Sat, Mar 9, 2019 at 8:04 AM Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Mar 07, 2019 at 11:13:52PM +0900, Masahiro Yamada wrote:
>
> > This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.
> >
> > I am not sure if I correctly understood the log of commit 27cb7300ffda
> > ("Ensure device tree DTS is compiled"), but the code-diff looks like
> > it was trying to solve the missed re-compilation when .dts was modified.
> >
> > Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
> > fixed the issue in a more correct and more complete way.
> >
> > Anyway, since the former commit, we see a clumsy log like this:
> >
> >   make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
> >
> > So, let's revert it.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> This causes tons of breakage like:
>        arm:  +   rpi_0_w
> +(rpi_0_w)
> +(rpi_0_w) Device Tree Source is not correctly specified.
> +(rpi_0_w) Please define 'CONFIG_DEFAULT_DEVICE_TREE'
> +(rpi_0_w) or build with 'DEVICE_TREE=<device_tree>' argument
> +(rpi_0_w) make[2]: *** [arch/arm/dts/bcm2835-rpi-zero-w.dtb] Error 1
> +(rpi_0_w) make[1]: *** [dts] Error 2
> +(rpi_0_w) make: *** [sub-make] Error 2
>


This is because arch/arm/dts/Makefile
has no entry for bcm2835-rpi-zero-w.dtb.




The following patch should fix the error


diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 2a040b2..5540f1b 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -582,6 +582,7 @@ dtb-$(CONFIG_ARCH_BCM283X) += \
        bcm2835-rpi-b-plus.dtb \
        bcm2835-rpi-b-rev2.dtb \
        bcm2835-rpi-b.dtb \
+       bcm2835-rpi-zero-w.dtb \
        bcm2836-rpi-2-b.dtb \
        bcm2837-rpi-3-b.dtb





The reverted commit was hiding the issue.

I believe DTB files should be explicitly associated
with CONFIG option in Makefile.
U-Boot used to work that way, and so does Linux.


I do not know how may boards are broken now, but
the right thing to do is to add dtb entries to Makefile,
the revert the bad commit.




-- 
Best Regards
Masahiro Yamada

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

* [U-Boot] Revert "Ensure device tree DTS is compiled"
  2019-03-09 16:07   ` Masahiro Yamada
@ 2019-03-09 17:42     ` Tom Rini
  2019-03-10 21:51       ` Simon Glass
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2019-03-09 17:42 UTC (permalink / raw)
  To: u-boot

On Sun, Mar 10, 2019 at 01:07:48AM +0900, Masahiro Yamada wrote:
> Hi Tom,
> 
> 
> On Sat, Mar 9, 2019 at 8:04 AM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Thu, Mar 07, 2019 at 11:13:52PM +0900, Masahiro Yamada wrote:
> >
> > > This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.
> > >
> > > I am not sure if I correctly understood the log of commit 27cb7300ffda
> > > ("Ensure device tree DTS is compiled"), but the code-diff looks like
> > > it was trying to solve the missed re-compilation when .dts was modified.
> > >
> > > Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
> > > fixed the issue in a more correct and more complete way.
> > >
> > > Anyway, since the former commit, we see a clumsy log like this:
> > >
> > >   make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
> > >
> > > So, let's revert it.
> > >
> > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >
> > This causes tons of breakage like:
> >        arm:  +   rpi_0_w
> > +(rpi_0_w)
> > +(rpi_0_w) Device Tree Source is not correctly specified.
> > +(rpi_0_w) Please define 'CONFIG_DEFAULT_DEVICE_TREE'
> > +(rpi_0_w) or build with 'DEVICE_TREE=<device_tree>' argument
> > +(rpi_0_w) make[2]: *** [arch/arm/dts/bcm2835-rpi-zero-w.dtb] Error 1
> > +(rpi_0_w) make[1]: *** [dts] Error 2
> > +(rpi_0_w) make: *** [sub-make] Error 2
> >
> 
> 
> This is because arch/arm/dts/Makefile
> has no entry for bcm2835-rpi-zero-w.dtb.
> 
> 
> 
> 
> The following patch should fix the error
> 
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 2a040b2..5540f1b 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -582,6 +582,7 @@ dtb-$(CONFIG_ARCH_BCM283X) += \
>         bcm2835-rpi-b-plus.dtb \
>         bcm2835-rpi-b-rev2.dtb \
>         bcm2835-rpi-b.dtb \
> +       bcm2835-rpi-zero-w.dtb \
>         bcm2836-rpi-2-b.dtb \
>         bcm2837-rpi-3-b.dtb
> 
> 
> 
> 
> 
> The reverted commit was hiding the issue.
> 
> I believe DTB files should be explicitly associated
> with CONFIG option in Makefile.
> U-Boot used to work that way, and so does Linux.
> 
> 
> I do not know how may boards are broken now, but
> the right thing to do is to add dtb entries to Makefile,
> the revert the bad commit.

OK, that sounds good.  But it's a non-trivial number of boards to fix,
so it's a real series to be put on the TODO list then.  Thanks for
explaining!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190309/6d61ea23/attachment.sig>

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

* [U-Boot] Revert "Ensure device tree DTS is compiled"
  2019-03-09 17:42     ` Tom Rini
@ 2019-03-10 21:51       ` Simon Glass
  2019-03-11 17:49         ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2019-03-10 21:51 UTC (permalink / raw)
  To: u-boot

Hi Tom, Masahiro,

On Sat, 9 Mar 2019 at 10:42, Tom Rini <trini@konsulko.com> wrote:
>
> On Sun, Mar 10, 2019 at 01:07:48AM +0900, Masahiro Yamada wrote:
> > Hi Tom,
> >
> >
> > On Sat, Mar 9, 2019 at 8:04 AM Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Thu, Mar 07, 2019 at 11:13:52PM +0900, Masahiro Yamada wrote:
> > >
> > > > This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.
> > > >
> > > > I am not sure if I correctly understood the log of commit 27cb7300ffda
> > > > ("Ensure device tree DTS is compiled"), but the code-diff looks like
> > > > it was trying to solve the missed re-compilation when .dts was modified.
> > > >
> > > > Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
> > > > fixed the issue in a more correct and more complete way.
> > > >
> > > > Anyway, since the former commit, we see a clumsy log like this:
> > > >
> > > >   make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
> > > >
> > > > So, let's revert it.
> > > >
> > > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > >
> > > This causes tons of breakage like:
> > >        arm:  +   rpi_0_w
> > > +(rpi_0_w)
> > > +(rpi_0_w) Device Tree Source is not correctly specified.
> > > +(rpi_0_w) Please define 'CONFIG_DEFAULT_DEVICE_TREE'
> > > +(rpi_0_w) or build with 'DEVICE_TREE=<device_tree>' argument
> > > +(rpi_0_w) make[2]: *** [arch/arm/dts/bcm2835-rpi-zero-w.dtb] Error 1
> > > +(rpi_0_w) make[1]: *** [dts] Error 2
> > > +(rpi_0_w) make: *** [sub-make] Error 2
> > >
> >
> >
> > This is because arch/arm/dts/Makefile
> > has no entry for bcm2835-rpi-zero-w.dtb.
> >
> >
> >
> >
> > The following patch should fix the error
> >
> >
> > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > index 2a040b2..5540f1b 100644
> > --- a/arch/arm/dts/Makefile
> > +++ b/arch/arm/dts/Makefile
> > @@ -582,6 +582,7 @@ dtb-$(CONFIG_ARCH_BCM283X) += \
> >         bcm2835-rpi-b-plus.dtb \
> >         bcm2835-rpi-b-rev2.dtb \
> >         bcm2835-rpi-b.dtb \
> > +       bcm2835-rpi-zero-w.dtb \
> >         bcm2836-rpi-2-b.dtb \
> >         bcm2837-rpi-3-b.dtb
> >
> >
> >
> >
> >
> > The reverted commit was hiding the issue.
> >
> > I believe DTB files should be explicitly associated
> > with CONFIG option in Makefile.
> > U-Boot used to work that way, and so does Linux.
> >
> >
> > I do not know how may boards are broken now, but
> > the right thing to do is to add dtb entries to Makefile,
> > the revert the bad commit.
>
> OK, that sounds good.  But it's a non-trivial number of boards to fix,
> so it's a real series to be put on the TODO list then.  Thanks for
> explaining!

If you are suggesting that we should have a separate CONFIG option for
every DT, I don't agree:

1. It adds more CONFIGs for no other purpose, or makes use of TARGET
configs which we try to avoid using
2. It reduces the testing of DT files for related builds. E.g. you can
change something in a common .dtsi file which works fine for one board
but breaks another, and you only find out when you build all the
boards.

Sorry if I have the wrong end of the stick.

Regards,
Simon

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

* [U-Boot] Revert "Ensure device tree DTS is compiled"
  2019-03-10 21:51       ` Simon Glass
@ 2019-03-11 17:49         ` Masahiro Yamada
  2019-03-14  2:48           ` Simon Glass
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2019-03-11 17:49 UTC (permalink / raw)
  To: u-boot

Hi Simon,


On Mon, Mar 11, 2019 at 6:59 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Tom, Masahiro,
>
> On Sat, 9 Mar 2019 at 10:42, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sun, Mar 10, 2019 at 01:07:48AM +0900, Masahiro Yamada wrote:
> > > Hi Tom,
> > >
> > >
> > > On Sat, Mar 9, 2019 at 8:04 AM Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > On Thu, Mar 07, 2019 at 11:13:52PM +0900, Masahiro Yamada wrote:
> > > >
> > > > > This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.
> > > > >
> > > > > I am not sure if I correctly understood the log of commit 27cb7300ffda
> > > > > ("Ensure device tree DTS is compiled"), but the code-diff looks like
> > > > > it was trying to solve the missed re-compilation when .dts was modified.
> > > > >
> > > > > Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
> > > > > fixed the issue in a more correct and more complete way.
> > > > >
> > > > > Anyway, since the former commit, we see a clumsy log like this:
> > > > >
> > > > >   make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
> > > > >
> > > > > So, let's revert it.
> > > > >
> > > > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > >
> > > > This causes tons of breakage like:
> > > >        arm:  +   rpi_0_w
> > > > +(rpi_0_w)
> > > > +(rpi_0_w) Device Tree Source is not correctly specified.
> > > > +(rpi_0_w) Please define 'CONFIG_DEFAULT_DEVICE_TREE'
> > > > +(rpi_0_w) or build with 'DEVICE_TREE=<device_tree>' argument
> > > > +(rpi_0_w) make[2]: *** [arch/arm/dts/bcm2835-rpi-zero-w.dtb] Error 1
> > > > +(rpi_0_w) make[1]: *** [dts] Error 2
> > > > +(rpi_0_w) make: *** [sub-make] Error 2
> > > >
> > >
> > >
> > > This is because arch/arm/dts/Makefile
> > > has no entry for bcm2835-rpi-zero-w.dtb.
> > >
> > >
> > >
> > >
> > > The following patch should fix the error
> > >
> > >
> > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > > index 2a040b2..5540f1b 100644
> > > --- a/arch/arm/dts/Makefile
> > > +++ b/arch/arm/dts/Makefile
> > > @@ -582,6 +582,7 @@ dtb-$(CONFIG_ARCH_BCM283X) += \
> > >         bcm2835-rpi-b-plus.dtb \
> > >         bcm2835-rpi-b-rev2.dtb \
> > >         bcm2835-rpi-b.dtb \
> > > +       bcm2835-rpi-zero-w.dtb \
> > >         bcm2836-rpi-2-b.dtb \
> > >         bcm2837-rpi-3-b.dtb
> > >
> > >
> > >
> > >
> > >
> > > The reverted commit was hiding the issue.
> > >
> > > I believe DTB files should be explicitly associated
> > > with CONFIG option in Makefile.
> > > U-Boot used to work that way, and so does Linux.
> > >
> > >
> > > I do not know how may boards are broken now, but
> > > the right thing to do is to add dtb entries to Makefile,
> > > the revert the bad commit.
> >
> > OK, that sounds good.  But it's a non-trivial number of boards to fix,
> > so it's a real series to be put on the TODO list then.  Thanks for
> > explaining!
>
> If you are suggesting that we should have a separate CONFIG option for
> every DT, I don't agree:

I do not mean that.

See my patch.


> > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > > index 2a040b2..5540f1b 100644
> > > --- a/arch/arm/dts/Makefile
> > > +++ b/arch/arm/dts/Makefile
> > > @@ -582,6 +582,7 @@ dtb-$(CONFIG_ARCH_BCM283X) += \
> > >         bcm2835-rpi-b-plus.dtb \
> > >         bcm2835-rpi-b-rev2.dtb \
> > >         bcm2835-rpi-b.dtb \
> > > +       bcm2835-rpi-zero-w.dtb \
> > >         bcm2836-rpi-2-b.dtb \
> > >         bcm2837-rpi-3-b.dtb


I am suggesting to add a missing DTB to the existing CONFIG.

CONFIG_ARCH_BCM283X is a platform CONFIG, not per-board CONFIG.


Each platform should have a platform or SoC CONFIG option.




> 1. It adds more CONFIGs for no other purpose, or makes use of TARGET
> configs which we try to avoid using
> 2. It reduces the testing of DT files for related builds. E.g. you can
> change something in a common .dtsi file which works fine for one board
> but breaks another, and you only find out when you build all the
> boards.
>
> Sorry if I have the wrong end of the stick.
>
> Regards,
> Simon
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


--
Best Regards
Masahiro Yamada

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

* [U-Boot] Revert "Ensure device tree DTS is compiled"
  2019-03-11 17:49         ` Masahiro Yamada
@ 2019-03-14  2:48           ` Simon Glass
  0 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2019-03-14  2:48 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On Mon, 11 Mar 2019 at 10:50, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Hi Simon,
>
>
> On Mon, Mar 11, 2019 at 6:59 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Tom, Masahiro,
> >
> > On Sat, 9 Mar 2019 at 10:42, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Sun, Mar 10, 2019 at 01:07:48AM +0900, Masahiro Yamada wrote:
> > > > Hi Tom,
> > > >
> > > >
> > > > On Sat, Mar 9, 2019 at 8:04 AM Tom Rini <trini@konsulko.com> wrote:
> > > > >
> > > > > On Thu, Mar 07, 2019 at 11:13:52PM +0900, Masahiro Yamada wrote:
> > > > >
> > > > > > This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.
> > > > > >
> > > > > > I am not sure if I correctly understood the log of commit 27cb7300ffda
> > > > > > ("Ensure device tree DTS is compiled"), but the code-diff looks like
> > > > > > it was trying to solve the missed re-compilation when .dts was modified.
> > > > > >
> > > > > > Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
> > > > > > fixed the issue in a more correct and more complete way.
> > > > > >
> > > > > > Anyway, since the former commit, we see a clumsy log like this:
> > > > > >
> > > > > >   make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
> > > > > >
> > > > > > So, let's revert it.
> > > > > >
> > > > > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > > >
> > > > > This causes tons of breakage like:
> > > > >        arm:  +   rpi_0_w
> > > > > +(rpi_0_w)
> > > > > +(rpi_0_w) Device Tree Source is not correctly specified.
> > > > > +(rpi_0_w) Please define 'CONFIG_DEFAULT_DEVICE_TREE'
> > > > > +(rpi_0_w) or build with 'DEVICE_TREE=<device_tree>' argument
> > > > > +(rpi_0_w) make[2]: *** [arch/arm/dts/bcm2835-rpi-zero-w.dtb] Error 1
> > > > > +(rpi_0_w) make[1]: *** [dts] Error 2
> > > > > +(rpi_0_w) make: *** [sub-make] Error 2
> > > > >
> > > >
> > > >
> > > > This is because arch/arm/dts/Makefile
> > > > has no entry for bcm2835-rpi-zero-w.dtb.
> > > >
> > > >
> > > >
> > > >
> > > > The following patch should fix the error
> > > >
> > > >
> > > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > > > index 2a040b2..5540f1b 100644
> > > > --- a/arch/arm/dts/Makefile
> > > > +++ b/arch/arm/dts/Makefile
> > > > @@ -582,6 +582,7 @@ dtb-$(CONFIG_ARCH_BCM283X) += \
> > > >         bcm2835-rpi-b-plus.dtb \
> > > >         bcm2835-rpi-b-rev2.dtb \
> > > >         bcm2835-rpi-b.dtb \
> > > > +       bcm2835-rpi-zero-w.dtb \
> > > >         bcm2836-rpi-2-b.dtb \
> > > >         bcm2837-rpi-3-b.dtb
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The reverted commit was hiding the issue.
> > > >
> > > > I believe DTB files should be explicitly associated
> > > > with CONFIG option in Makefile.
> > > > U-Boot used to work that way, and so does Linux.
> > > >
> > > >
> > > > I do not know how may boards are broken now, but
> > > > the right thing to do is to add dtb entries to Makefile,
> > > > the revert the bad commit.
> > >
> > > OK, that sounds good.  But it's a non-trivial number of boards to fix,
> > > so it's a real series to be put on the TODO list then.  Thanks for
> > > explaining!
> >
> > If you are suggesting that we should have a separate CONFIG option for
> > every DT, I don't agree:
>
> I do not mean that.
>
> See my patch.
>
>
> > > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > > > index 2a040b2..5540f1b 100644
> > > > --- a/arch/arm/dts/Makefile
> > > > +++ b/arch/arm/dts/Makefile
> > > > @@ -582,6 +582,7 @@ dtb-$(CONFIG_ARCH_BCM283X) += \
> > > >         bcm2835-rpi-b-plus.dtb \
> > > >         bcm2835-rpi-b-rev2.dtb \
> > > >         bcm2835-rpi-b.dtb \
> > > > +       bcm2835-rpi-zero-w.dtb \
> > > >         bcm2836-rpi-2-b.dtb \
> > > >         bcm2837-rpi-3-b.dtb
>
>
> I am suggesting to add a missing DTB to the existing CONFIG.
>
> CONFIG_ARCH_BCM283X is a platform CONFIG, not per-board CONFIG.
>
>
> Each platform should have a platform or SoC CONFIG option.

OK I see. Yes, agreed.

>
>
>
>
> > 1. It adds more CONFIGs for no other purpose, or makes use of TARGET
> > configs which we try to avoid using
> > 2. It reduces the testing of DT files for related builds. E.g. you can
> > change something in a common .dtsi file which works fine for one board
> > but breaks another, and you only find out when you build all the
> > boards.
> >
> > Sorry if I have the wrong end of the stick.
> >
> > Regards,
> > Simon

Regards,
Simon

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

end of thread, other threads:[~2019-03-14  2:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 14:13 [U-Boot] [PATCH] Revert "Ensure device tree DTS is compiled" Masahiro Yamada
2019-03-08 23:03 ` [U-Boot] " Tom Rini
2019-03-09 16:07   ` Masahiro Yamada
2019-03-09 17:42     ` Tom Rini
2019-03-10 21:51       ` Simon Glass
2019-03-11 17:49         ` Masahiro Yamada
2019-03-14  2:48           ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.