[PATCH] [sim,moxie] Fix DTB generation mechanism and build failure

Luis Machado luis.machado@linaro.org
Wed Apr 7 20:39:31 GMT 2021


On 4/7/21 5:26 PM, Mike Frysinger wrote:
> On 07 Apr 2021 16:39, Luis Machado via Gdb-patches wrote:
>> I ran into a build failure with --enable-targets=all due to the fact that
>> the moxie sim expects to be able to use the dtc tool.  If it isn't available,
>> the builds fails.
>>
>> Given the device tree compiler (dtc) is not available everywhere, it seems
>> fair to only generate the DTB file on the spot if we have such a tool.  For
>> those who don't have the tool available, we can use a prebuilt version of the
>> DTB available in the repository.
> 
> i think i asked about vendoring the tool in, but i think people were
> (understandably) not super keen on the idea since it's not GPL or GNU.
> 
>> The DTS file hasn't changed since ~2009, so it seems pretty safe to assume
>> a prebuilt version is suitable to be used.
> 
> and because it's quite small.  if it were much larger, i don't think we'd
> want to do it this way.
> 
>> I also checked that the DTB file generated on an x86_64-Linux machine is the
>> the same as the one generated on an AArch64-Linux machine.
> 
> right, by design, it should be stable no matter where it's created.
> 
>> Tested by running make/make install with/without the dtc tool.
> 
> i think we want to fold this under the existing maintainer logic.  check out
> commit 8c379db285f2ab8ad298288e86103548b90674a2 for a bit more detail.  we'd
> want to only update+install the version in the source tree rather than switch
> between the one in the srcdir & the builddir one.

I'll take a look. Are you proposing we only use the prebuilt file from 
the source tree instead of generating a new dtb file during the build? 
And we should only do those things if maintainer mode is enabled?

> 
> also look at how move-if-change is used in common/Make-common.in.
> 
> lmk if that's too vague :).
> -mike
> 


More information about the Gdb-patches mailing list