public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@linaro.org>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] [sim,moxie] Fix DTB generation mechanism and build failure
Date: Thu, 8 Apr 2021 11:40:59 -0300	[thread overview]
Message-ID: <36a7b4a7-f330-1aca-95a2-22dcaab76c87@linaro.org> (raw)
In-Reply-To: <YG4ytWkhit6y1olt@vapier>

On 4/7/21 7:31 PM, Mike Frysinger wrote:
> On 07 Apr 2021 17:39, Luis Machado via Gdb-patches wrote:
>> 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?
> 
> if we're going to commit the prebuilt file to the tree, then yes, we should
> only be using that.  we have a lot of similar styles:
> * configure from configure.ac
> * Makefile.in/aclocal.m4 from Makefile.am
> * nltvals.def from common/gennltvals.py
> 
> so if maintainer mode is enabled, and dtc is available, and the dts is newer
> than the dtb, we'd update the dtb in the source repo.  anyone changing the
> dts would be responsible for this.  as you noted, this is pretty rare atm,
> so shouldn't be a big deal.
> -mike
> 

Thanks for clarifying it. I've sent v2 now. Hopefully that has the right 
logic.

  reply	other threads:[~2021-04-08 14:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 19:39 Luis Machado
2021-04-07 20:26 ` Mike Frysinger
2021-04-07 20:39   ` Luis Machado
2021-04-07 22:31     ` Mike Frysinger
2021-04-08 14:40       ` Luis Machado [this message]
2021-04-08 14:40 ` [PATCH,v2][sim,moxie] " Luis Machado
2021-04-08 16:37   ` Mike Frysinger
2021-04-08 17:21 ` [PATCH,v3][sim,moxie] " Luis Machado
2021-04-08 17:44   ` Mike Frysinger
2021-04-08 18:03     ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36a7b4a7-f330-1aca-95a2-22dcaab76c87@linaro.org \
    --to=luis.machado@linaro.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).