Message ID | 1504555943-12893-12-git-send-email-pantelis.antoniou@konsulko.com |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
Series | uboot overlays, FIT image & unittest | expand |
On 4 September 2017 at 14:12, Pantelis Antoniou <pantelis.antoniou@konsulko.com> wrote: > Special rule for dtbo generation > > Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> > --- > scripts/Makefile.lib | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > Acked-by: Simon Glass <sjg@chromium.org>
On 09/04/2017 02:12 PM, Pantelis Antoniou wrote: > Special rule for dtbo generation > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > +quiet_cmd_dtco = DTCO $@ > +# Rule for objects only; does not put specific u-boot include at the end > +# No generation of assembly file either > +# Modified for U-Boot > +cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ > + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ > + $(DTC) -@ -O dtb -o $@ -b 0 \ > + -i $(dir $<) $(DTC_FLAGS) \ > + -d $(depfile).dtc.tmp $(dtc-tmp) ; \ As of u-boot-fdt/master commit 503afc3ca1e5 "test: overlay: Add unit test for stacked overlay", the U-Boot build fails for sandbox with the error below. I guess it's due to this commit. Does U-Boot now intentionally rely on a newer dtc or is this an accident? DTC test/overlay/test-fdt-base.dtb LD lib/libfdt/built-in.o CC lib/charset.o CC lib/rsa/rsa-verify.o dtc: invalid option -- '@' Usage: dtc [options] <input file> Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv] -q, --quiet Quiet: -q suppress warnings, -qq errors, -qqq all ...
On 09/15/2017 09:50 AM, Stephen Warren wrote: > On 09/04/2017 02:12 PM, Pantelis Antoniou wrote: >> Special rule for dtbo generation > >> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > >> +quiet_cmd_dtco = DTCO $@ >> +# Rule for objects only; does not put specific u-boot include at the end >> +# No generation of assembly file either >> +# Modified for U-Boot >> +cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ >> + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ >> + $(DTC) -@ -O dtb -o $@ -b 0 \ >> + -i $(dir $<) $(DTC_FLAGS) \ >> + -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > > As of u-boot-fdt/master commit 503afc3ca1e5 "test: overlay: Add unit > test for stacked overlay", the U-Boot build fails for sandbox with the > error below. I guess it's due to this commit. Does U-Boot now > intentionally rely on a newer dtc or is this an accident? > > DTC test/overlay/test-fdt-base.dtb > LD lib/libfdt/built-in.o > CC lib/charset.o > CC lib/rsa/rsa-verify.o > dtc: invalid option -- '@' > Usage: dtc [options] <input file> > > Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv] > -q, --quiet > Quiet: -q suppress warnings, -qq errors, -qqq all > ... Related, the following check in Makefile doesn't trigger: checkdtc: @if test $(call dtc-version) -lt 0104; then \ echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ false; \ fi ... because I have dtc 1.4.0. If U-Boot requires a new version now, that Makefile chunk should be updated.
On Fri, Sep 15, 2017 at 09:52:41AM -0600, Stephen Warren wrote: > On 09/15/2017 09:50 AM, Stephen Warren wrote: > >On 09/04/2017 02:12 PM, Pantelis Antoniou wrote: > >>Special rule for dtbo generation > > > >>diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > > > >>+quiet_cmd_dtco = DTCO $@ > >>+# Rule for objects only; does not put specific u-boot include at the end > >>+# No generation of assembly file either > >>+# Modified for U-Boot > >>+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ > >>+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ > >>+ $(DTC) -@ -O dtb -o $@ -b 0 \ > >>+ -i $(dir $<) $(DTC_FLAGS) \ > >>+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > > > >As of u-boot-fdt/master commit 503afc3ca1e5 "test: overlay: Add > >unit test for stacked overlay", the U-Boot build fails for sandbox > >with the error below. I guess it's due to this commit. Does U-Boot > >now intentionally rely on a newer dtc or is this an accident? > > > > DTC test/overlay/test-fdt-base.dtb > > LD lib/libfdt/built-in.o > > CC lib/charset.o > > CC lib/rsa/rsa-verify.o > >dtc: invalid option -- '@' > >Usage: dtc [options] <input file> > > > >Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv] > > -q, --quiet > > Quiet: -q suppress warnings, -qq errors, -qqq all > >... > > Related, the following check in Makefile doesn't trigger: > > checkdtc: > @if test $(call dtc-version) -lt 0104; then \ > echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ > false; \ > fi > > ... because I have dtc 1.4.0. If U-Boot requires a new version now, > that Makefile chunk should be updated. Ah, this is what needs updating, yes, it needs to cehck for 1.4.3 or newer.
On 09/15/2017 10:13 AM, Tom Rini wrote: > On Fri, Sep 15, 2017 at 09:52:41AM -0600, Stephen Warren wrote: >> On 09/15/2017 09:50 AM, Stephen Warren wrote: >>> On 09/04/2017 02:12 PM, Pantelis Antoniou wrote: >>>> Special rule for dtbo generation >>> >>>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib >>> >>>> +quiet_cmd_dtco = DTCO $@ >>>> +# Rule for objects only; does not put specific u-boot include at the end >>>> +# No generation of assembly file either >>>> +# Modified for U-Boot >>>> +cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ >>>> + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ >>>> + $(DTC) -@ -O dtb -o $@ -b 0 \ >>>> + -i $(dir $<) $(DTC_FLAGS) \ >>>> + -d $(depfile).dtc.tmp $(dtc-tmp) ; \ >>> >>> As of u-boot-fdt/master commit 503afc3ca1e5 "test: overlay: Add >>> unit test for stacked overlay", the U-Boot build fails for sandbox >>> with the error below. I guess it's due to this commit. Does U-Boot >>> now intentionally rely on a newer dtc or is this an accident? >>> >>> DTC test/overlay/test-fdt-base.dtb >>> LD lib/libfdt/built-in.o >>> CC lib/charset.o >>> CC lib/rsa/rsa-verify.o >>> dtc: invalid option -- '@' >>> Usage: dtc [options] <input file> >>> >>> Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv] >>> -q, --quiet >>> Quiet: -q suppress warnings, -qq errors, -qqq all >>> ... >> >> Related, the following check in Makefile doesn't trigger: >> >> checkdtc: >> @if test $(call dtc-version) -lt 0104; then \ >> echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ >> false; \ >> fi >> >> ... because I have dtc 1.4.0. If U-Boot requires a new version now, >> that Makefile chunk should be updated. > > Ah, this is what needs updating, yes, it needs to cehck for 1.4.3 or > newer. Related: The Travis systems run Ubuntu 14.04 (same as my systems) and hence have dtc 1.4.0. If u-boot-fdt/master is merged into u-boot/master, the build will break in Travis. The logic in .travis.yml to use a newer dtc (built from upstream dtc source) is disabled since apparently more recent dtc spew lots of warnings and make the logs too long for Travis. Ideally, .travis.yml would check out and build the exact same dtc version/tag that Makefile dictates as the minimum, but I'm not sure that's possible given the log spew issue.
On Fri, Sep 15, 2017 at 10:21:28AM -0600, Stephen Warren wrote: > On 09/15/2017 10:13 AM, Tom Rini wrote: > >On Fri, Sep 15, 2017 at 09:52:41AM -0600, Stephen Warren wrote: > >>On 09/15/2017 09:50 AM, Stephen Warren wrote: > >>>On 09/04/2017 02:12 PM, Pantelis Antoniou wrote: > >>>>Special rule for dtbo generation > >>> > >>>>diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > >>> > >>>>+quiet_cmd_dtco = DTCO $@ > >>>>+# Rule for objects only; does not put specific u-boot include at the end > >>>>+# No generation of assembly file either > >>>>+# Modified for U-Boot > >>>>+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ > >>>>+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ > >>>>+ $(DTC) -@ -O dtb -o $@ -b 0 \ > >>>>+ -i $(dir $<) $(DTC_FLAGS) \ > >>>>+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > >>> > >>>As of u-boot-fdt/master commit 503afc3ca1e5 "test: overlay: Add > >>>unit test for stacked overlay", the U-Boot build fails for sandbox > >>>with the error below. I guess it's due to this commit. Does U-Boot > >>>now intentionally rely on a newer dtc or is this an accident? > >>> > >>> DTC test/overlay/test-fdt-base.dtb > >>> LD lib/libfdt/built-in.o > >>> CC lib/charset.o > >>> CC lib/rsa/rsa-verify.o > >>>dtc: invalid option -- '@' > >>>Usage: dtc [options] <input file> > >>> > >>>Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv] > >>> -q, --quiet > >>> Quiet: -q suppress warnings, -qq errors, -qqq all > >>>... > >> > >>Related, the following check in Makefile doesn't trigger: > >> > >>checkdtc: > >> @if test $(call dtc-version) -lt 0104; then \ > >> echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ > >> false; \ > >> fi > >> > >>... because I have dtc 1.4.0. If U-Boot requires a new version now, > >>that Makefile chunk should be updated. > > > >Ah, this is what needs updating, yes, it needs to cehck for 1.4.3 or > >newer. > > Related: The Travis systems run Ubuntu 14.04 (same as my systems) > and hence have dtc 1.4.0. If u-boot-fdt/master is merged into > u-boot/master, the build will break in Travis. > > The logic in .travis.yml to use a newer dtc (built from upstream dtc > source) is disabled since apparently more recent dtc spew lots of > warnings and make the logs too long for Travis. Ideally, .travis.yml > would check out and build the exact same dtc version/tag that > Makefile dictates as the minimum, but I'm not sure that's possible > given the log spew issue. Right, it was a problem, but it's not now and Simon is I believe grabbing the patch that brings us back to using dtc git. I'm working on patching dtc-version.sh now to give the patchlevel.
On Fri, Sep 15, 2017 at 10:21:28AM -0600, Stephen Warren wrote: > On 09/15/2017 10:13 AM, Tom Rini wrote: > >On Fri, Sep 15, 2017 at 09:52:41AM -0600, Stephen Warren wrote: > >>On 09/15/2017 09:50 AM, Stephen Warren wrote: > >>>On 09/04/2017 02:12 PM, Pantelis Antoniou wrote: > >>>>Special rule for dtbo generation > >>> Applied to u-boot-fdt thanks!
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 9ce47b4..2a7ed70 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -321,6 +321,23 @@ $(obj)/%.dtb: $(src)/%.dts FORCE dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) +# DTCO +# --------------------------------------------------------------------------- + +quiet_cmd_dtco = DTCO $@ +# Rule for objects only; does not put specific u-boot include at the end +# No generation of assembly file either +# Modified for U-Boot +cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ + $(DTC) -@ -O dtb -o $@ -b 0 \ + -i $(dir $<) $(DTC_FLAGS) \ + -d $(depfile).dtc.tmp $(dtc-tmp) ; \ + cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) + +$(obj)/%.dtbo: $(src)/%.dts FORCE + $(call if_changed_dep,dtco) + # Fonts # ---------------------------------------------------------------------------
Special rule for dtbo generation Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> --- scripts/Makefile.lib | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)