From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by sourceware.org (Postfix) with ESMTPS id E45C5385781F for ; Wed, 7 Apr 2021 20:39:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E45C5385781F Received: by mail-qk1-x732.google.com with SMTP id g20so8286qkk.1 for ; Wed, 07 Apr 2021 13:39:33 -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=uz9ABj7frT1QKvSwRrkeAJTGBPkiSgEbWxta3Z4737w=; b=E31rAq4QWegOJDv+E9gXzEqanbRLx5KAaFyvQly10Wz+2cDK+ihbiTXD1gcHDoz5H8 kLIzQpe8Z8C58yELEb8AT4rmptG37y+PBsFZ6vt98o219qB2K0Awb2d7+qxLfr2RwZ5G 5M/OXZfhjPZs2yYX67+OOQ0OiqB3AU2NcxakMHzol89gFW29NpIUJZQfULG+o781BrDJ MMKuVs6pYyU3hLWyWv+4z8Cn0ywQiVenzZVdtkaXT4+v3g62bfVyotBPmZZqgGxoEyCb JB8O6vzJeehadMPCehLNowPVt+/VHLamnF0qKHWaOHoTSv8lewj6rtoaF/1Qli3/EyH2 dmvw== X-Gm-Message-State: AOAM5314DI+yttVtIUk5P4G8fE34QS2W0as5exi5PyxQ+xWjYogVWifY wxM0jxu3/d0eSJMoklgw44SJXtcS1NcOlw== X-Google-Smtp-Source: ABdhPJy1KaYcaQg9x9+nu7kcFSTdffMjbzFKC9ADyxuyUWaBVPvhCp2KX6pMjKe2K/p60Dr/Oskr8Q== X-Received: by 2002:a37:5687:: with SMTP id k129mr5172558qkb.488.1617827973441; Wed, 07 Apr 2021 13:39:33 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:516e:f0db:af1:ccb4? ([2804:7f0:4841:2841:516e:f0db:af1:ccb4]) by smtp.gmail.com with ESMTPSA id w5sm19138148qkc.85.2021.04.07.13.39.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Apr 2021 13:39:33 -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> From: Luis Machado Message-ID: <8c9459b3-ffbe-af35-eeb6-513a66d87e5b@linaro.org> Date: Wed, 7 Apr 2021 17:39:31 -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=-6.1 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: Wed, 07 Apr 2021 20:39:35 -0000 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 >