From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by sourceware.org (Postfix) with ESMTPS id 69B38394443F for ; Thu, 8 Apr 2021 14:41:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 69B38394443F Received: by mail-qt1-x82a.google.com with SMTP id 1so1589399qtb.0 for ; Thu, 08 Apr 2021 07:41:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vApWFLPuXOkLxa6oLkEgXtm0PurU4MEnza8p8gmATas=; b=fQGnaiCrGp4GSXuHgrsYSDpCja6PAK8xgO+KXDDroWCgYqPhAXDee1P7JfP/M48GRT 6brLM9JHLTY8FXBAxG/KGebMQQxwbbf5bIXLDEb/YvEDHH27MISXGvROEMIgdSbYWvS4 Pxb7bxGXW5E3TGN26XX0g07xBf9aW9aZ2jG/ODcbmYlZSS4prHzzjXF5iM+W7hg6SDch 6zQhq8tKWoO9645YgDeRtgcERHWEbmzphcKck0O1kD6o3zs/z0p22gfhCvqIU3MyxyI6 om7yCRukMM6qgvPJmBzCbOegoBhyVG2dagxR1seeTHCJthM5Vwj4NsV1zyEVULl38DW0 tkFQ== X-Gm-Message-State: AOAM530XXGpwBCtO1W6A5kFlyljGuWMJWpzFr1qaSnvIe1oRbc2HfSjl IR4Cf/K+SQP3zf/907vOoVbUEgOnGpIdRg== X-Google-Smtp-Source: ABdhPJwZV4JpolQIAtyL7FqLouww9VhdSxKlFhNkrrcHoP6Qrvf14RTKrO92iWIRdyP7OmeSSubjcA== X-Received: by 2002:ac8:4f10:: with SMTP id b16mr7582404qte.235.1617892861932; Thu, 08 Apr 2021 07:41:01 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:5812:8068:979a:a62c? ([2804:7f0:4841:2841:5812:8068:979a:a62c]) by smtp.gmail.com with ESMTPSA id c5sm20656633qkl.21.2021.04.08.07.41.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Apr 2021 07:41:01 -0700 (PDT) Subject: Re: [PATCH] [sim,moxie] Fix DTB generation mechanism and build failure To: gdb-patches@sourceware.org References: <20210407193929.1251903-1-luis.machado@linaro.org> <8c9459b3-ffbe-af35-eeb6-513a66d87e5b@linaro.org> From: Luis Machado Message-ID: <36a7b4a7-f330-1aca-95a2-22dcaab76c87@linaro.org> Date: Thu, 8 Apr 2021 11:40:59 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 14:41:08 -0000 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.