diff mbox series

[U-Boot] Makefile: Update minimum dtc version to 1.4.3

Message ID 1505495725-26350-1-git-send-email-trini@konsulko.com
State Accepted
Commit 2fa73e784da105419b7d9d07d8f9d4a79afe531a
Delegated to: Tom Rini
Headers show
Series [U-Boot] Makefile: Update minimum dtc version to 1.4.3 | expand

Commit Message

Tom Rini Sept. 15, 2017, 5:15 p.m. UTC
With support for overlays and calling the -@ flag to dtc we need to have
at least 1.4.3 available now.

Cc: Simon Glass <sjg@chromium.org>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Simon, please make sure to grab this one too with Pantelis' series,
thanks!
---
 Makefile               | 4 ++--
 scripts/dtc-version.sh | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

Comments

Stephen Warren Sept. 15, 2017, 5:33 p.m. UTC | #1
On 09/15/2017 11:15 AM, Tom Rini wrote:
> With support for overlays and calling the -@ flag to dtc we need to have
> at least 1.4.3 available now.

> diff --git a/Makefile b/Makefile

>   checkdtc:
> -	@if test $(call dtc-version) -lt 0104; then \
> -		echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \
> +	@if test $(call dtc-version) -lt 010403; then \
> +		echo '*** Your dtc is too old, please upgrade to dtc 1.4.3 or newer'; \
>   		false; \
>   	fi

Can we add a comment here indicating that .travis.yml must be updated 
too if the version requirement changes, and similarly a comment in 
.travis.yml that mentions it must be kept in sync with the checkdtc rule 
in Makefile?

For users, it's a bit annoying that we need a newer dtc that is present 
in distros, without any deprecation warning from the Makefile for a 
couple releases before:-(
Tom Rini Sept. 15, 2017, 5:41 p.m. UTC | #2
On Fri, Sep 15, 2017 at 11:33:23AM -0600, Stephen Warren wrote:
> On 09/15/2017 11:15 AM, Tom Rini wrote:
> >With support for overlays and calling the -@ flag to dtc we need to have
> >at least 1.4.3 available now.
> 
> >diff --git a/Makefile b/Makefile
> 
> >  checkdtc:
> >-	@if test $(call dtc-version) -lt 0104; then \
> >-		echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \
> >+	@if test $(call dtc-version) -lt 010403; then \
> >+		echo '*** Your dtc is too old, please upgrade to dtc 1.4.3 or newer'; \
> >  		false; \
> >  	fi
> 
> Can we add a comment here indicating that .travis.yml must be
> updated too if the version requirement changes, and similarly a
> comment in .travis.yml that mentions it must be kept in sync with
> the checkdtc rule in Makefile?

I'm planning to follow up https://patchwork.ozlabs.org/patch/813888/
with one to do -b v1.4.3 so we'll be testing the minimum requirement in
the future.

> For users, it's a bit annoying that we need a newer dtc that is
> present in distros, without any deprecation warning from the
> Makefile for a couple releases before:-(

Well, the other ways to do this are "mirror" the kernel and include a
copy of dtc, or have different version checks for if UT_OVERLAY is
enabled or not.
Tom Rini Sept. 22, 2017, 2:20 p.m. UTC | #3
On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:

> With support for overlays and calling the -@ flag to dtc we need to have
> at least 1.4.3 available now.
> 
> Cc: Simon Glass <sjg@chromium.org>
> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
Marek Vasut Sept. 23, 2017, 10:39 a.m. UTC | #4
On 09/22/2017 04:20 PM, Tom Rini wrote:
> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> 
>> With support for overlays and calling the -@ flag to dtc we need to have
>> at least 1.4.3 available now.
>>
>> Cc: Simon Glass <sjg@chromium.org>
>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>> Signed-off-by: Tom Rini <trini@konsulko.com>
> 
> Applied to u-boot/master, thanks!

Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
builds on any debian system.
Tom Rini Sept. 23, 2017, 12:56 p.m. UTC | #5
On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> On 09/22/2017 04:20 PM, Tom Rini wrote:
> > On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> > 
> >> With support for overlays and calling the -@ flag to dtc we need to have
> >> at least 1.4.3 available now.
> >>
> >> Cc: Simon Glass <sjg@chromium.org>
> >> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >> Signed-off-by: Tom Rini <trini@konsulko.com>
> > 
> > Applied to u-boot/master, thanks!
> 
> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> builds on any debian system.

Then perhaps we need to mirror the kernel and provide / build dtc, but
allow for people to override it.
Marek Vasut Sept. 23, 2017, 1:04 p.m. UTC | #6
On 09/23/2017 02:56 PM, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>
>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>> at least 1.4.3 available now.
>>>>
>>>> Cc: Simon Glass <sjg@chromium.org>
>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>
>>> Applied to u-boot/master, thanks!
>>
>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>> builds on any debian system.
> 
> Then perhaps we need to mirror the kernel and provide / build dtc, but
> allow for people to override it.

What about allowing old DTC version if DTOs are not in use ?
Tom Rini Sept. 23, 2017, 4:10 p.m. UTC | #7
On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
> On 09/23/2017 02:56 PM, Tom Rini wrote:
> > On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> >> On 09/22/2017 04:20 PM, Tom Rini wrote:
> >>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> >>>
> >>>> With support for overlays and calling the -@ flag to dtc we need to have
> >>>> at least 1.4.3 available now.
> >>>>
> >>>> Cc: Simon Glass <sjg@chromium.org>
> >>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >>>> Signed-off-by: Tom Rini <trini@konsulko.com>
> >>>
> >>> Applied to u-boot/master, thanks!
> >>
> >> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> >> builds on any debian system.
> > 
> > Then perhaps we need to mirror the kernel and provide / build dtc, but
> > allow for people to override it.
> 
> What about allowing old DTC version if DTOs are not in use ?

If you can re-work the logic for that, sure, thanks!
Tom Rini Sept. 23, 2017, 5:05 p.m. UTC | #8
On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> > On 09/22/2017 04:20 PM, Tom Rini wrote:
> > > On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> > > 
> > >> With support for overlays and calling the -@ flag to dtc we need to have
> > >> at least 1.4.3 available now.
> > >>
> > >> Cc: Simon Glass <sjg@chromium.org>
> > >> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> > >> Signed-off-by: Tom Rini <trini@konsulko.com>
> > > 
> > > Applied to u-boot/master, thanks!
> > 
> > Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> > builds on any debian system.
> 
> Then perhaps we need to mirror the kernel and provide / build dtc, but
> allow for people to override it.

This isn't too hard and I'm pushing that through Jenkins now to confirm
I've got all the logic correct.  I think this will be the least error
prone method long term.
Marek Vasut Sept. 23, 2017, 5:33 p.m. UTC | #9
On 09/23/2017 07:05 PM, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>
>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>> at least 1.4.3 available now.
>>>>>
>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>
>>>> Applied to u-boot/master, thanks!
>>>
>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>> builds on any debian system.
>>
>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>> allow for people to override it.
> 
> This isn't too hard and I'm pushing that through Jenkins now to confirm
> I've got all the logic correct.  I think this will be the least error
> prone method long term.
> 
NAK, this is the same thing which chromium does and what Debian is
trying to stop -- vendoring. We will end up with patched custom DTC out
of sync with upstream.
Marek Vasut Sept. 23, 2017, 5:36 p.m. UTC | #10
On 09/23/2017 06:10 PM, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>
>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>> at least 1.4.3 available now.
>>>>>>
>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>
>>>>> Applied to u-boot/master, thanks!
>>>>
>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>> builds on any debian system.
>>>
>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>> allow for people to override it.
>>
>> What about allowing old DTC version if DTOs are not in use ?
> 
> If you can re-work the logic for that, sure, thanks!
> 

I would expect the author to fix such massive breakage or a revert.
Tom Rini Sept. 23, 2017, 5:37 p.m. UTC | #11
On Sat, Sep 23, 2017 at 07:33:44PM +0200, Marek Vasut wrote:
> On 09/23/2017 07:05 PM, Tom Rini wrote:
> > On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
> >> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> >>> On 09/22/2017 04:20 PM, Tom Rini wrote:
> >>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> >>>>
> >>>>> With support for overlays and calling the -@ flag to dtc we need to have
> >>>>> at least 1.4.3 available now.
> >>>>>
> >>>>> Cc: Simon Glass <sjg@chromium.org>
> >>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
> >>>>
> >>>> Applied to u-boot/master, thanks!
> >>>
> >>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> >>> builds on any debian system.
> >>
> >> Then perhaps we need to mirror the kernel and provide / build dtc, but
> >> allow for people to override it.
> > 
> > This isn't too hard and I'm pushing that through Jenkins now to confirm
> > I've got all the logic correct.  I think this will be the least error
> > prone method long term.
> 
> NAK, this is the same thing which chromium does and what Debian is
> trying to stop -- vendoring. We will end up with patched custom DTC out
> of sync with upstream.

Shrug, it's what Linux does, and what QEMU does, and probably what other
projects do as well since apparently even Debian/Unstable is 2 releases
and nearly a year behind (or, 9 months if you don't want to exaggerate).
Marek Vasut Sept. 23, 2017, 5:43 p.m. UTC | #12
On 09/23/2017 07:37 PM, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 07:33:44PM +0200, Marek Vasut wrote:
>> On 09/23/2017 07:05 PM, Tom Rini wrote:
>>> On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>
>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>> at least 1.4.3 available now.
>>>>>>>
>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>
>>>>>> Applied to u-boot/master, thanks!
>>>>>
>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>> builds on any debian system.
>>>>
>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>> allow for people to override it.
>>>
>>> This isn't too hard and I'm pushing that through Jenkins now to confirm
>>> I've got all the logic correct.  I think this will be the least error
>>> prone method long term.
>>
>> NAK, this is the same thing which chromium does and what Debian is
>> trying to stop -- vendoring. We will end up with patched custom DTC out
>> of sync with upstream.
> 
> Shrug, it's what Linux does, and what QEMU does, and probably what other
> projects do as well since apparently even Debian/Unstable is 2 releases
> and nearly a year behind (or, 9 months if you don't want to exaggerate).

And it will likely stay that way for debian stable. I am really
disappointed in the "Shrug" reaction to such massive breakage.
Tom Rini Sept. 23, 2017, 5:53 p.m. UTC | #13
On Sat, Sep 23, 2017 at 07:43:09PM +0200, Marek Vasut wrote:
> On 09/23/2017 07:37 PM, Tom Rini wrote:
> > On Sat, Sep 23, 2017 at 07:33:44PM +0200, Marek Vasut wrote:
> >> On 09/23/2017 07:05 PM, Tom Rini wrote:
> >>> On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
> >>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> >>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
> >>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> >>>>>>
> >>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
> >>>>>>> at least 1.4.3 available now.
> >>>>>>>
> >>>>>>> Cc: Simon Glass <sjg@chromium.org>
> >>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
> >>>>>>
> >>>>>> Applied to u-boot/master, thanks!
> >>>>>
> >>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> >>>>> builds on any debian system.
> >>>>
> >>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
> >>>> allow for people to override it.
> >>>
> >>> This isn't too hard and I'm pushing that through Jenkins now to confirm
> >>> I've got all the logic correct.  I think this will be the least error
> >>> prone method long term.
> >>
> >> NAK, this is the same thing which chromium does and what Debian is
> >> trying to stop -- vendoring. We will end up with patched custom DTC out
> >> of sync with upstream.
> > 
> > Shrug, it's what Linux does, and what QEMU does, and probably what other
> > projects do as well since apparently even Debian/Unstable is 2 releases
> > and nearly a year behind (or, 9 months if you don't want to exaggerate).
> 
> And it will likely stay that way for debian stable. I am really
> disappointed in the "Shrug" reaction to such massive breakage.

Nope and nor will it catch old-stable breaking in January when gcc-6.x
or newer is required.
Bin Meng Sept. 24, 2017, 1:49 a.m. UTC | #14
Hi Tom,

On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>> > On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>> >> On 09/22/2017 04:20 PM, Tom Rini wrote:
>> >>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>> >>>
>> >>>> With support for overlays and calling the -@ flag to dtc we need to have
>> >>>> at least 1.4.3 available now.
>> >>>>
>> >>>> Cc: Simon Glass <sjg@chromium.org>
>> >>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>> >>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>> >>>
>> >>> Applied to u-boot/master, thanks!
>> >>
>> >> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>> >> builds on any debian system.
>> >
>> > Then perhaps we need to mirror the kernel and provide / build dtc, but
>> > allow for people to override it.
>>
>> What about allowing old DTC version if DTOs are not in use ?
>
> If you can re-work the logic for that, sure, thanks!
>

Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.

Regards,
Bin
Robert Nelson Sept. 24, 2017, 2:07 a.m. UTC | #15
On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Tom,
>
> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>> > On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>> >> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>> >>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>> >>>
>>> >>>> With support for overlays and calling the -@ flag to dtc we need to have
>>> >>>> at least 1.4.3 available now.
>>> >>>>
>>> >>>> Cc: Simon Glass <sjg@chromium.org>
>>> >>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>> >>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>> >>>
>>> >>> Applied to u-boot/master, thanks!
>>> >>
>>> >> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>> >> builds on any debian system.
>>> >
>>> > Then perhaps we need to mirror the kernel and provide / build dtc, but
>>> > allow for people to override it.
>>>
>>> What about allowing old DTC version if DTOs are not in use ?
>>
>> If you can re-work the logic for that, sure, thanks!
>>
>
> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.

Maybe it's just time to embed a copy of dtc into u-boot (like the
kernel, especially since we use so many features...)?

the device-tree-compiler package in debian (and thus ubuntu) doesn't
get too much love:

http://metadata.ftp-master.debian.org/changelogs/main/d/device-tree-compiler/unstable_changelog

Regards,
Tom Rini Sept. 24, 2017, 3:22 a.m. UTC | #16
On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> > Hi Tom,
> >
> > On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
> >> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
> >>> On 09/23/2017 02:56 PM, Tom Rini wrote:
> >>> > On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> >>> >> On 09/22/2017 04:20 PM, Tom Rini wrote:
> >>> >>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> >>> >>>
> >>> >>>> With support for overlays and calling the -@ flag to dtc we need to have
> >>> >>>> at least 1.4.3 available now.
> >>> >>>>
> >>> >>>> Cc: Simon Glass <sjg@chromium.org>
> >>> >>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >>> >>>> Signed-off-by: Tom Rini <trini@konsulko.com>
> >>> >>>
> >>> >>> Applied to u-boot/master, thanks!
> >>> >>
> >>> >> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> >>> >> builds on any debian system.
> >>> >
> >>> > Then perhaps we need to mirror the kernel and provide / build dtc, but
> >>> > allow for people to override it.
> >>>
> >>> What about allowing old DTC version if DTOs are not in use ?
> >>
> >> If you can re-work the logic for that, sure, thanks!
> >>
> >
> > Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
> 
> Maybe it's just time to embed a copy of dtc into u-boot (like the
> kernel, especially since we use so many features...)?

That is my intention at this point, and I'm testing a small series to do
that now (the last pain point looks to have been the patch that allows
'DTC' to be over-ridden for FreeBSD).
Heinrich Schuchardt Sept. 24, 2017, 6:41 a.m. UTC | #17
On 09/23/2017 07:53 PM, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 07:43:09PM +0200, Marek Vasut wrote:
>> On 09/23/2017 07:37 PM, Tom Rini wrote:
>>> On Sat, Sep 23, 2017 at 07:33:44PM +0200, Marek Vasut wrote:
>>>> On 09/23/2017 07:05 PM, Tom Rini wrote:
>>>>> On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>
>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>
>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>
>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>
>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>> builds on any debian system.
>>>>>>
>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>> allow for people to override it.
>>>>>
>>>>> This isn't too hard and I'm pushing that through Jenkins now to confirm
>>>>> I've got all the logic correct.  I think this will be the least error
>>>>> prone method long term.
>>>>
>>>> NAK, this is the same thing which chromium does and what Debian is
>>>> trying to stop -- vendoring. We will end up with patched custom DTC out
>>>> of sync with upstream.
>>>
>>> Shrug, it's what Linux does, and what QEMU does, and probably what other
>>> projects do as well since apparently even Debian/Unstable is 2 releases
>>> and nearly a year behind (or, 9 months if you don't want to exaggerate).
>>
>> And it will likely stay that way for debian stable. I am really
>> disappointed in the "Shrug" reaction to such massive breakage.
> 
> Nope and nor will it catch old-stable breaking in January when gcc-6.x
> or newer is required.
> 

Above you have been discussing code duplication. This is not the right
way to work with git.

The git way is to add
https://git.kernel.org/pub/scm/utils/dtc/dtc.git
as git submodule (https://git-scm.com/docs/git-submodule).

In our make file we can then use git submodule init, git submodule
update, git verify-tag before we build a dtc with the appropriate version.

This way we can build dtc from sources but stay in sync with the upstream.

Regards

Heinrich
Marek Vasut Sept. 24, 2017, 8:28 a.m. UTC | #18
On 09/24/2017 05:22 AM, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
>> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Tom,
>>>
>>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
>>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>
>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>
>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>
>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>
>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>> builds on any debian system.
>>>>>>
>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>> allow for people to override it.
>>>>>
>>>>> What about allowing old DTC version if DTOs are not in use ?
>>>>
>>>> If you can re-work the logic for that, sure, thanks!
>>>>
>>>
>>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
>>
>> Maybe it's just time to embed a copy of dtc into u-boot (like the
>> kernel, especially since we use so many features...)?
> 
> That is my intention at this point, and I'm testing a small series to do
> that now (the last pain point looks to have been the patch that allows
> 'DTC' to be over-ridden for FreeBSD).

cfr my comment about vendoring , I'd really hate to go down that path.
Chrome does that and look what came out of it -- outdated patched
packages in the chrome codebase, with debian trying hard to unbundle
that stuff again.
Lukasz Majewski Sept. 24, 2017, 11:20 a.m. UTC | #19
On 09/24/2017 08:41 AM, Heinrich Schuchardt wrote:
> On 09/23/2017 07:53 PM, Tom Rini wrote:
>> On Sat, Sep 23, 2017 at 07:43:09PM +0200, Marek Vasut wrote:
>>> On 09/23/2017 07:37 PM, Tom Rini wrote:
>>>> On Sat, Sep 23, 2017 at 07:33:44PM +0200, Marek Vasut wrote:
>>>>> On 09/23/2017 07:05 PM, Tom Rini wrote:
>>>>>> On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
>>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>>
>>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>>
>>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>>
>>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>>
>>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>>> builds on any debian system.
>>>>>>>
>>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>>> allow for people to override it.
>>>>>>
>>>>>> This isn't too hard and I'm pushing that through Jenkins now to confirm
>>>>>> I've got all the logic correct.  I think this will be the least error
>>>>>> prone method long term.
>>>>>
>>>>> NAK, this is the same thing which chromium does and what Debian is
>>>>> trying to stop -- vendoring. We will end up with patched custom DTC out
>>>>> of sync with upstream.
>>>>
>>>> Shrug, it's what Linux does, and what QEMU does, and probably what other
>>>> projects do as well since apparently even Debian/Unstable is 2 releases
>>>> and nearly a year behind (or, 9 months if you don't want to exaggerate).
>>>
>>> And it will likely stay that way for debian stable. I am really
>>> disappointed in the "Shrug" reaction to such massive breakage.
>>
>> Nope and nor will it catch old-stable breaking in January when gcc-6.x
>> or newer is required.
>>
> 
> Above you have been discussing code duplication. This is not the right
> way to work with git.
> 
> The git way is to add
> https://git.kernel.org/pub/scm/utils/dtc/dtc.git
> as git submodule (https://git-scm.com/docs/git-submodule).
> 
> In our make file we can then use git submodule init, git submodule
> update, git verify-tag before we build a dtc with the appropriate version.
> 
> This way we can build dtc from sources but stay in sync with the upstream.

+1

> 
> Regards
> 
> Heinrich
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
Tom Rini Sept. 24, 2017, 11:36 a.m. UTC | #20
On Sun, Sep 24, 2017 at 10:28:18AM +0200, Marek Vasut wrote:
> On 09/24/2017 05:22 AM, Tom Rini wrote:
> > On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
> >> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> >>> Hi Tom,
> >>>
> >>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
> >>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
> >>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
> >>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> >>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
> >>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> >>>>>>>>
> >>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
> >>>>>>>>> at least 1.4.3 available now.
> >>>>>>>>>
> >>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
> >>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
> >>>>>>>>
> >>>>>>>> Applied to u-boot/master, thanks!
> >>>>>>>
> >>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> >>>>>>> builds on any debian system.
> >>>>>>
> >>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
> >>>>>> allow for people to override it.
> >>>>>
> >>>>> What about allowing old DTC version if DTOs are not in use ?
> >>>>
> >>>> If you can re-work the logic for that, sure, thanks!
> >>>>
> >>>
> >>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
> >>
> >> Maybe it's just time to embed a copy of dtc into u-boot (like the
> >> kernel, especially since we use so many features...)?
> > 
> > That is my intention at this point, and I'm testing a small series to do
> > that now (the last pain point looks to have been the patch that allows
> > 'DTC' to be over-ridden for FreeBSD).
> 
> cfr my comment about vendoring , I'd really hate to go down that path.
> Chrome does that and look what came out of it -- outdated patched
> packages in the chrome codebase, with debian trying hard to unbundle
> that stuff again.

Yes, but we're going to do it all the same.  We're tied to some of the
tools we need and vendors aren't keeping pace with them either.  dtc
1.4.0 (Ubuntu 16.04) is from 2013.  dtc 1.4.3 is from last December.

And I plan on following the Linux Kernel model of just syncing only
directly with the upstream project.
Marek Vasut Sept. 24, 2017, 12:07 p.m. UTC | #21
On 09/24/2017 01:36 PM, Tom Rini wrote:
> On Sun, Sep 24, 2017 at 10:28:18AM +0200, Marek Vasut wrote:
>> On 09/24/2017 05:22 AM, Tom Rini wrote:
>>> On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
>>>> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>> Hi Tom,
>>>>>
>>>>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
>>>>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>>>>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>>>
>>>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>>>
>>>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>>>
>>>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>>>
>>>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>>>> builds on any debian system.
>>>>>>>>
>>>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>>>> allow for people to override it.
>>>>>>>
>>>>>>> What about allowing old DTC version if DTOs are not in use ?
>>>>>>
>>>>>> If you can re-work the logic for that, sure, thanks!
>>>>>>
>>>>>
>>>>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
>>>>
>>>> Maybe it's just time to embed a copy of dtc into u-boot (like the
>>>> kernel, especially since we use so many features...)?
>>>
>>> That is my intention at this point, and I'm testing a small series to do
>>> that now (the last pain point looks to have been the patch that allows
>>> 'DTC' to be over-ridden for FreeBSD).
>>
>> cfr my comment about vendoring , I'd really hate to go down that path.
>> Chrome does that and look what came out of it -- outdated patched
>> packages in the chrome codebase, with debian trying hard to unbundle
>> that stuff again.
> 
> Yes, but we're going to do it all the same.  We're tied to some of the
> tools we need and vendors aren't keeping pace with them either.  dtc
> 1.4.0 (Ubuntu 16.04) is from 2013.  dtc 1.4.3 is from last December.

The new DTC version is only mandated by DTO support, which is not used
by anyone to my knowledge at this point. Whoever wants to use DTO,
should have new enough DTC and I'm fine with the build failing if they
don't.

This heavy-handed approach of imposing custom DTC build on everyone
because of a feature noone uses is awful and I disagree with it. If
there is a version check for DTC for builds with and without DTO, fine,
I can live with that.

But bundling DTC only because of unused functionality, NAK.

> And I plan on following the Linux Kernel model of just syncing only
> directly with the upstream project.

See above, this is heavy-handed and IMO unnecessary. In fact, I hope the
kernel removes the DTC fork completely.
Lukasz Majewski Sept. 24, 2017, 12:26 p.m. UTC | #22
Hi Marek, Tom,

> On 09/24/2017 01:36 PM, Tom Rini wrote:
>> On Sun, Sep 24, 2017 at 10:28:18AM +0200, Marek Vasut wrote:
>>> On 09/24/2017 05:22 AM, Tom Rini wrote:
>>>> On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
>>>>> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>> Hi Tom,
>>>>>>
>>>>>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
>>>>>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>>>>>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>>>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>>>>
>>>>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>>>>
>>>>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>>>>
>>>>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>>>>
>>>>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>>>>> builds on any debian system.
>>>>>>>>>
>>>>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>>>>> allow for people to override it.
>>>>>>>>
>>>>>>>> What about allowing old DTC version if DTOs are not in use ?
>>>>>>>
>>>>>>> If you can re-work the logic for that, sure, thanks!
>>>>>>>
>>>>>>
>>>>>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
>>>>>
>>>>> Maybe it's just time to embed a copy of dtc into u-boot (like the
>>>>> kernel, especially since we use so many features...)?
>>>>
>>>> That is my intention at this point, and I'm testing a small series to do
>>>> that now (the last pain point looks to have been the patch that allows
>>>> 'DTC' to be over-ridden for FreeBSD).
>>>
>>> cfr my comment about vendoring , I'd really hate to go down that path.
>>> Chrome does that and look what came out of it -- outdated patched
>>> packages in the chrome codebase, with debian trying hard to unbundle
>>> that stuff again.
>>
>> Yes, but we're going to do it all the same.  We're tied to some of the
>> tools we need and vendors aren't keeping pace with them either.  dtc
>> 1.4.0 (Ubuntu 16.04) is from 2013.  dtc 1.4.3 is from last December.
> 
> The new DTC version is only mandated by DTO support, which is not used
> by anyone to my knowledge at this point. Whoever wants to use DTO,
> should have new enough DTC and I'm fine with the build failing if they
> don't.
> 
> This heavy-handed approach of imposing custom DTC build on everyone
> because of a feature noone uses is awful and I disagree with it. If
> there is a version check for DTC for builds with and without DTO, fine,
> I can live with that.
> 
> But bundling DTC only because of unused functionality, NAK.
> 
>> And I plan on following the Linux Kernel model of just syncing only
>> directly with the upstream project.
> 
> See above, this is heavy-handed and IMO unnecessary. In fact, I hope the
> kernel removes the DTC fork completely.
> 

As a debian stable user (at almost all my machines).... I would like to 
have the dtc 1.4.3 being used only for DTBO enabled.

Maybe, it would be possible to have such check added (and remove it when 
distros keep up with dtc version)?
Tom Rini Sept. 24, 2017, 12:50 p.m. UTC | #23
On Sun, Sep 24, 2017 at 08:41:32AM +0200, Heinrich Schuchardt wrote:
> On 09/23/2017 07:53 PM, Tom Rini wrote:
> > On Sat, Sep 23, 2017 at 07:43:09PM +0200, Marek Vasut wrote:
> >> On 09/23/2017 07:37 PM, Tom Rini wrote:
> >>> On Sat, Sep 23, 2017 at 07:33:44PM +0200, Marek Vasut wrote:
> >>>> On 09/23/2017 07:05 PM, Tom Rini wrote:
> >>>>> On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
> >>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> >>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
> >>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> >>>>>>>>
> >>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
> >>>>>>>>> at least 1.4.3 available now.
> >>>>>>>>>
> >>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
> >>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
> >>>>>>>>
> >>>>>>>> Applied to u-boot/master, thanks!
> >>>>>>>
> >>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> >>>>>>> builds on any debian system.
> >>>>>>
> >>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
> >>>>>> allow for people to override it.
> >>>>>
> >>>>> This isn't too hard and I'm pushing that through Jenkins now to confirm
> >>>>> I've got all the logic correct.  I think this will be the least error
> >>>>> prone method long term.
> >>>>
> >>>> NAK, this is the same thing which chromium does and what Debian is
> >>>> trying to stop -- vendoring. We will end up with patched custom DTC out
> >>>> of sync with upstream.
> >>>
> >>> Shrug, it's what Linux does, and what QEMU does, and probably what other
> >>> projects do as well since apparently even Debian/Unstable is 2 releases
> >>> and nearly a year behind (or, 9 months if you don't want to exaggerate).
> >>
> >> And it will likely stay that way for debian stable. I am really
> >> disappointed in the "Shrug" reaction to such massive breakage.
> > 
> > Nope and nor will it catch old-stable breaking in January when gcc-6.x
> > or newer is required.
> > 
> 
> Above you have been discussing code duplication. This is not the right
> way to work with git.
> 
> The git way is to add
> https://git.kernel.org/pub/scm/utils/dtc/dtc.git
> as git submodule (https://git-scm.com/docs/git-submodule).
> 
> In our make file we can then use git submodule init, git submodule
> update, git verify-tag before we build a dtc with the appropriate version.
> 
> This way we can build dtc from sources but stay in sync with the upstream.

I'm not wading into the submodules vs repo debate.  Happily the Linux
Kernel already came up with a small script to just sync in what we need
of the tool sources and to keep said sources in sync.  The only
divergence there between strict upstream is cherry-picking (essentially)
of a few changes, rather than just doing a re-sync of the tool).
Tom Rini Sept. 24, 2017, 12:52 p.m. UTC | #24
On Sun, Sep 24, 2017 at 02:07:27PM +0200, Marek Vasut wrote:
> On 09/24/2017 01:36 PM, Tom Rini wrote:
> > On Sun, Sep 24, 2017 at 10:28:18AM +0200, Marek Vasut wrote:
> >> On 09/24/2017 05:22 AM, Tom Rini wrote:
> >>> On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
> >>>> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> >>>>> Hi Tom,
> >>>>>
> >>>>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
> >>>>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
> >>>>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
> >>>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
> >>>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
> >>>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
> >>>>>>>>>>
> >>>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
> >>>>>>>>>>> at least 1.4.3 available now.
> >>>>>>>>>>>
> >>>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
> >>>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
> >>>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
> >>>>>>>>>>
> >>>>>>>>>> Applied to u-boot/master, thanks!
> >>>>>>>>>
> >>>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
> >>>>>>>>> builds on any debian system.
> >>>>>>>>
> >>>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
> >>>>>>>> allow for people to override it.
> >>>>>>>
> >>>>>>> What about allowing old DTC version if DTOs are not in use ?
> >>>>>>
> >>>>>> If you can re-work the logic for that, sure, thanks!
> >>>>>>
> >>>>>
> >>>>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
> >>>>
> >>>> Maybe it's just time to embed a copy of dtc into u-boot (like the
> >>>> kernel, especially since we use so many features...)?
> >>>
> >>> That is my intention at this point, and I'm testing a small series to do
> >>> that now (the last pain point looks to have been the patch that allows
> >>> 'DTC' to be over-ridden for FreeBSD).
> >>
> >> cfr my comment about vendoring , I'd really hate to go down that path.
> >> Chrome does that and look what came out of it -- outdated patched
> >> packages in the chrome codebase, with debian trying hard to unbundle
> >> that stuff again.
> > 
> > Yes, but we're going to do it all the same.  We're tied to some of the
> > tools we need and vendors aren't keeping pace with them either.  dtc
> > 1.4.0 (Ubuntu 16.04) is from 2013.  dtc 1.4.3 is from last December.
> 
> The new DTC version is only mandated by DTO support, which is not used
> by anyone to my knowledge at this point. Whoever wants to use DTO,
> should have new enough DTC and I'm fine with the build failing if they
> don't.

Why yes, there is a chicken-and-egg problem with DTO support and
adoption.  Happily, Google has picked it up as part of how things are to
be done with Android 8 so it should finally see wider adoption.
Marek Vasut Sept. 24, 2017, 1:05 p.m. UTC | #25
On 09/24/2017 02:52 PM, Tom Rini wrote:
> On Sun, Sep 24, 2017 at 02:07:27PM +0200, Marek Vasut wrote:
>> On 09/24/2017 01:36 PM, Tom Rini wrote:
>>> On Sun, Sep 24, 2017 at 10:28:18AM +0200, Marek Vasut wrote:
>>>> On 09/24/2017 05:22 AM, Tom Rini wrote:
>>>>> On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
>>>>>> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>> Hi Tom,
>>>>>>>
>>>>>>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
>>>>>>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>>>>>>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>>>>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>>>>>
>>>>>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>>>>>
>>>>>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>>>>>> builds on any debian system.
>>>>>>>>>>
>>>>>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>>>>>> allow for people to override it.
>>>>>>>>>
>>>>>>>>> What about allowing old DTC version if DTOs are not in use ?
>>>>>>>>
>>>>>>>> If you can re-work the logic for that, sure, thanks!
>>>>>>>>
>>>>>>>
>>>>>>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
>>>>>>
>>>>>> Maybe it's just time to embed a copy of dtc into u-boot (like the
>>>>>> kernel, especially since we use so many features...)?
>>>>>
>>>>> That is my intention at this point, and I'm testing a small series to do
>>>>> that now (the last pain point looks to have been the patch that allows
>>>>> 'DTC' to be over-ridden for FreeBSD).
>>>>
>>>> cfr my comment about vendoring , I'd really hate to go down that path.
>>>> Chrome does that and look what came out of it -- outdated patched
>>>> packages in the chrome codebase, with debian trying hard to unbundle
>>>> that stuff again.
>>>
>>> Yes, but we're going to do it all the same.  We're tied to some of the
>>> tools we need and vendors aren't keeping pace with them either.  dtc
>>> 1.4.0 (Ubuntu 16.04) is from 2013.  dtc 1.4.3 is from last December.
>>
>> The new DTC version is only mandated by DTO support, which is not used
>> by anyone to my knowledge at this point. Whoever wants to use DTO,
>> should have new enough DTC and I'm fine with the build failing if they
>> don't.
> 
> Why yes, there is a chicken-and-egg problem with DTO support and
> adoption.  Happily, Google has picked it up as part of how things are to
> be done with Android 8 so it should finally see wider adoption.
> 
The most important part of my reply was deleted, so let me repost it here:

This heavy-handed approach of imposing custom DTC build on everyone
because of a feature noone uses is awful and I disagree with it. If
there is a version check for DTC for builds with and without DTO, fine,
I can live with that.

But bundling DTC only because of unused functionality, NAK.
Vagrant Cascadian Sept. 24, 2017, 7:08 p.m. UTC | #26
On 2017-09-23, Tom Rini wrote:
> On Sat, Sep 23, 2017 at 07:43:09PM +0200, Marek Vasut wrote:
>> On 09/23/2017 07:37 PM, Tom Rini wrote:
>> > On Sat, Sep 23, 2017 at 07:33:44PM +0200, Marek Vasut wrote:
>> >> On 09/23/2017 07:05 PM, Tom Rini wrote:
>> >>> On Sat, Sep 23, 2017 at 08:56:08AM -0400, Tom Rini wrote:
>> >>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>> >>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>> >>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>> >>>>>>
>> >>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>> >>>>>>> at least 1.4.3 available now.
>> >>>>>>>
>> >>>>>>> Cc: Simon Glass <sjg@chromium.org>
>> >>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>> >>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>> >>>>>>
>> >>>>>> Applied to u-boot/master, thanks!

It is unclear to me is why this was so urgent to push through while
there was ongoing discussion raising some reasonable concerns...


>> >>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>> >>>>> builds on any debian system.
>> >>>>
>> >>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>> >>>> allow for people to override it.
>> >>>
>> >>> This isn't too hard and I'm pushing that through Jenkins now to confirm
>> >>> I've got all the logic correct.  I think this will be the least error
>> >>> prone method long term.
>> >>
>> >> NAK, this is the same thing which chromium does and what Debian is
>> >> trying to stop -- vendoring. We will end up with patched custom DTC out
>> >> of sync with upstream.

>> > Shrug, it's what Linux does, and what QEMU does, and probably what other
>> > projects do as well since apparently even Debian/Unstable is 2 releases
>> > and nearly a year behind (or, 9 months if you don't want to exaggerate).

Given that dtc releases were:
1.4.0 on Sat Jun 22 13:06:27 2013 -0500,
1.4.1 on Wed Nov 12 14:31:44 2014 +1100,
1.4.2 on Sat Sep  3 21:02:46 2016 +1000,
1.4.3 on Tue Feb 28 16:10:59 2017 +1100,
1.4.4 on Fri Mar 10 11:22:18 2017 +1100

At least two releases are over a year apart; It's not like dtc is a
high-velocity train here...

Being "2 releases and nearly a year" behind doesn't seem all that
unreasonable... you could just as easily, and more accurately, describe
it as "only two releases and almost 7 months behind."


>> And it will likely stay that way for debian stable. I am really
>> disappointed in the "Shrug" reaction to such massive breakage.
>
> Nope and nor will it catch old-stable breaking in January when gcc-6.x
> or newer is required.

Debian's oldstable would be unreasonable, sure.

There's a big difference between requiring gcc-6, which is present in
the *current* Debian stable release, which will be supported for another
2-5+ years...

and in constrast, dtc 1.4.3, which was released not quite 7 months ago,
while Debian had already frozen new upstream versions in preparation for
a release 3 months later. The timing for dtc 1.4.3 just wasn't good for
Debian stable; not through any fault of the maintainers.


For what it's worth, I've submitted some updated packaging to the
device-tree-compiler (a.k.a. dtc) maintainers in Debian, including
updating the version. Hopefully that will get uploaded one way or
another soon.

Given that Debian in general prefers not to embed code copies, with
u-boot, I'm hoping it will be fairly straightforward to use an external
dtc, once the newer dtc version is available in Debian?


live well,
  vagrant
Simon Glass Sept. 25, 2017, 2:14 a.m. UTC | #27
Hi Marek,

On 24 September 2017 at 07:05, Marek Vasut <marek.vasut@gmail.com> wrote:
> On 09/24/2017 02:52 PM, Tom Rini wrote:
>> On Sun, Sep 24, 2017 at 02:07:27PM +0200, Marek Vasut wrote:
>>> On 09/24/2017 01:36 PM, Tom Rini wrote:
>>>> On Sun, Sep 24, 2017 at 10:28:18AM +0200, Marek Vasut wrote:
>>>>> On 09/24/2017 05:22 AM, Tom Rini wrote:
>>>>>> On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
>>>>>>> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>> Hi Tom,
>>>>>>>>
>>>>>>>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
>>>>>>>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>>>>>>>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>>>>>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>>>>>>
>>>>>>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>>>>>>> builds on any debian system.
>>>>>>>>>>>
>>>>>>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>>>>>>> allow for people to override it.
>>>>>>>>>>
>>>>>>>>>> What about allowing old DTC version if DTOs are not in use ?
>>>>>>>>>
>>>>>>>>> If you can re-work the logic for that, sure, thanks!
>>>>>>>>>
>>>>>>>>
>>>>>>>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
>>>>>>>
>>>>>>> Maybe it's just time to embed a copy of dtc into u-boot (like the
>>>>>>> kernel, especially since we use so many features...)?
>>>>>>
>>>>>> That is my intention at this point, and I'm testing a small series to do
>>>>>> that now (the last pain point looks to have been the patch that allows
>>>>>> 'DTC' to be over-ridden for FreeBSD).
>>>>>
>>>>> cfr my comment about vendoring , I'd really hate to go down that path.
>>>>> Chrome does that and look what came out of it -- outdated patched
>>>>> packages in the chrome codebase, with debian trying hard to unbundle
>>>>> that stuff again.
>>>>
>>>> Yes, but we're going to do it all the same.  We're tied to some of the
>>>> tools we need and vendors aren't keeping pace with them either.  dtc
>>>> 1.4.0 (Ubuntu 16.04) is from 2013.  dtc 1.4.3 is from last December.
>>>
>>> The new DTC version is only mandated by DTO support, which is not used
>>> by anyone to my knowledge at this point. Whoever wants to use DTO,
>>> should have new enough DTC and I'm fine with the build failing if they
>>> don't.
>>
>> Why yes, there is a chicken-and-egg problem with DTO support and
>> adoption.  Happily, Google has picked it up as part of how things are to
>> be done with Android 8 so it should finally see wider adoption.
>>
> The most important part of my reply was deleted, so let me repost it here:
>
> This heavy-handed approach of imposing custom DTC build on everyone
> because of a feature noone uses is awful and I disagree with it. If
> there is a version check for DTC for builds with and without DTO, fine,
> I can live with that.
>
> But bundling DTC only because of unused functionality, NAK.

Yes I suppose that is a bit painful.

Perhaps we should add a Makefile option (like we do with BUILD_ROM) to
enable DTO (and require a certain dtc). That flag can be set with
travis, but off by default.

Regards,
Simon
Marek Vasut Sept. 25, 2017, 8:34 a.m. UTC | #28
On 09/25/2017 04:14 AM, Simon Glass wrote:
> Hi Marek,
> 
> On 24 September 2017 at 07:05, Marek Vasut <marek.vasut@gmail.com> wrote:
>> On 09/24/2017 02:52 PM, Tom Rini wrote:
>>> On Sun, Sep 24, 2017 at 02:07:27PM +0200, Marek Vasut wrote:
>>>> On 09/24/2017 01:36 PM, Tom Rini wrote:
>>>>> On Sun, Sep 24, 2017 at 10:28:18AM +0200, Marek Vasut wrote:
>>>>>> On 09/24/2017 05:22 AM, Tom Rini wrote:
>>>>>>> On Sat, Sep 23, 2017 at 09:07:02PM -0500, Robert Nelson wrote:
>>>>>>>> On Sat, Sep 23, 2017 at 8:49 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>> Hi Tom,
>>>>>>>>>
>>>>>>>>> On Sun, Sep 24, 2017 at 12:10 AM, Tom Rini <trini@konsulko.com> wrote:
>>>>>>>>>> On Sat, Sep 23, 2017 at 03:04:39PM +0200, Marek Vasut wrote:
>>>>>>>>>>> On 09/23/2017 02:56 PM, Tom Rini wrote:
>>>>>>>>>>>> On Sat, Sep 23, 2017 at 12:39:44PM +0200, Marek Vasut wrote:
>>>>>>>>>>>>> On 09/22/2017 04:20 PM, Tom Rini wrote:
>>>>>>>>>>>>>> On Fri, Sep 15, 2017 at 01:15:25PM -0400, Tom Rini wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> With support for overlays and calling the -@ flag to dtc we need to have
>>>>>>>>>>>>>>> at least 1.4.3 available now.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Cc: Simon Glass <sjg@chromium.org>
>>>>>>>>>>>>>>> Reported-by: Stephen Warren <swarren@wwwdotorg.org>
>>>>>>>>>>>>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Applied to u-boot/master, thanks!
>>>>>>>>>>>>>
>>>>>>>>>>>>> Debian still only has 1.4.2 even in unstable, so u-boot/master no longer
>>>>>>>>>>>>> builds on any debian system.
>>>>>>>>>>>>
>>>>>>>>>>>> Then perhaps we need to mirror the kernel and provide / build dtc, but
>>>>>>>>>>>> allow for people to override it.
>>>>>>>>>>>
>>>>>>>>>>> What about allowing old DTC version if DTOs are not in use ?
>>>>>>>>>>
>>>>>>>>>> If you can re-work the logic for that, sure, thanks!
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Ubuntu 16.04 LTS is still at dtc v1.4.0, so it's broken there too.
>>>>>>>>
>>>>>>>> Maybe it's just time to embed a copy of dtc into u-boot (like the
>>>>>>>> kernel, especially since we use so many features...)?
>>>>>>>
>>>>>>> That is my intention at this point, and I'm testing a small series to do
>>>>>>> that now (the last pain point looks to have been the patch that allows
>>>>>>> 'DTC' to be over-ridden for FreeBSD).
>>>>>>
>>>>>> cfr my comment about vendoring , I'd really hate to go down that path.
>>>>>> Chrome does that and look what came out of it -- outdated patched
>>>>>> packages in the chrome codebase, with debian trying hard to unbundle
>>>>>> that stuff again.
>>>>>
>>>>> Yes, but we're going to do it all the same.  We're tied to some of the
>>>>> tools we need and vendors aren't keeping pace with them either.  dtc
>>>>> 1.4.0 (Ubuntu 16.04) is from 2013.  dtc 1.4.3 is from last December.
>>>>
>>>> The new DTC version is only mandated by DTO support, which is not used
>>>> by anyone to my knowledge at this point. Whoever wants to use DTO,
>>>> should have new enough DTC and I'm fine with the build failing if they
>>>> don't.
>>>
>>> Why yes, there is a chicken-and-egg problem with DTO support and
>>> adoption.  Happily, Google has picked it up as part of how things are to
>>> be done with Android 8 so it should finally see wider adoption.
>>>
>> The most important part of my reply was deleted, so let me repost it here:
>>
>> This heavy-handed approach of imposing custom DTC build on everyone
>> because of a feature noone uses is awful and I disagree with it. If
>> there is a version check for DTC for builds with and without DTO, fine,
>> I can live with that.
>>
>> But bundling DTC only because of unused functionality, NAK.
> 
> Yes I suppose that is a bit painful.
> 
> Perhaps we should add a Makefile option (like we do with BUILD_ROM) to
> enable DTO (and require a certain dtc). That flag can be set with
> travis, but off by default.

Yes, agreed, that was my suggestion all along.

> Regards,
> Simon
>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 8250b3409a68..e058e9854b7b 100644
--- a/Makefile
+++ b/Makefile
@@ -1448,8 +1448,8 @@  System.map:	u-boot
 		@$(call SYSTEM_MAP,$<) > $@
 
 checkdtc:
-	@if test $(call dtc-version) -lt 0104; then \
-		echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \
+	@if test $(call dtc-version) -lt 010403; then \
+		echo '*** Your dtc is too old, please upgrade to dtc 1.4.3 or newer'; \
 		false; \
 	fi
 
diff --git a/scripts/dtc-version.sh b/scripts/dtc-version.sh
index e8c94d390baa..0744c39eb04c 100755
--- a/scripts/dtc-version.sh
+++ b/scripts/dtc-version.sh
@@ -2,8 +2,8 @@ 
 #
 # dtc-version dtc-command
 #
-# Prints the dtc version of `dtc-command' in a canonical 4-digit form
-# such as `0222' for binutils 2.22
+# Prints the dtc version of `dtc-command' in a canonical 6-digit form
+# such as `010404'  for dtc 1.4.4
 #
 
 dtc="$*"
@@ -16,5 +16,6 @@  fi
 
 MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1)
 MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2)
+PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1)
 
-printf "%02d%02d\\n" $MAJOR $MINOR
+printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCH