From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by sourceware.org (Postfix) with ESMTPS id 6579A3945C38 for ; Thu, 8 Apr 2021 17:21:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6579A3945C38 Received: by mail-qv1-xf2a.google.com with SMTP id fn8so1287664qvb.5 for ; Thu, 08 Apr 2021 10:21:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=gnNQNjf3NPyUbLiGm7BhU/o7yefJTvHQiazxW4P5NrU=; b=kYP4PBcrskMX+lTP2JipaFkOgZStaK8riffbmZDsZ9MoWLhx2xF8JRu2j/L0ZLqJ60 jbA0hNb+HhziE8vuiQ1Izc+KR4lPuaHVEhwdasvf9B7P8YsJblmB4+A0uMZv8tLZWlXc RjWNW57yI2gZ0GeXXskYJNJamYl9HsxSPd4OMUritXnu7KwzSl7pJ+vCRTxAmrMZ8iMt 1EshUcvGndSNxiIH+I+lCWetE86fuiD9anGY1CSmgn8sqhFrupB/fWDys5THpYh5zgBT JRyQhasqnY8vbDjllpUZKrLkIavA2mwQZ4HkjWxJ9W+eNwzBY/Y/IqMK3qOB8LjD4/5W mrRQ== X-Gm-Message-State: AOAM531phCSVviiN+hkajJf4zmPHh25/PoQNAba4DW6Rmplskg9oXNmc bt39BxAhbAL8ZPI820gqjaP0SLnkb7sifg== X-Google-Smtp-Source: ABdhPJx0FwfsCNXniSfk5N/1E2O96QkQXjeXYncEZcU10eWOsIwtZ8fVAsfbF8orrv9Az2Ro9ULyuA== X-Received: by 2002:a0c:f74d:: with SMTP id e13mr10434838qvo.8.1617902507852; Thu, 08 Apr 2021 10:21:47 -0700 (PDT) Received: from localhost.localdomain ([2804:7f0:4841:2841:5812:8068:979a:a62c]) by smtp.gmail.com with ESMTPSA id i12sm887892qkl.49.2021.04.08.10.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 10:21:47 -0700 (PDT) From: Luis Machado To: gdb-patches@sourceware.org, vapier@gentoo.org Subject: [PATCH,v3][sim,moxie] Fix DTB generation mechanism and build failure Date: Thu, 8 Apr 2021 14:21:40 -0300 Message-Id: <20210408172140.1341243-1-luis.machado@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 17:21:50 -0000 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. The following patch adds a prebuilt dtb file to the tree. That file is the one that is used for installations. The patch also enables (re-)generation of the dtb file through maintainer mode, if it needs to be updated due to a change in the dts file. Tested on aarch64-linux/x86_64-linux. sim/moxie/ChangeLog: YYYY-MM-DD Luis Machado * Makefile.in (moxie-gdb.dtb): Add maintainer mode dependency. (install-dtb): Install prebuilt dtb file. * moxie-gdb.dtb: New prebuilt file. --- sim/moxie/Makefile.in | 16 +++++++++++++--- sim/moxie/moxie-gdb.dtb | Bin 0 -> 519 bytes 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 sim/moxie/moxie-gdb.dtb diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in index ee513867290..bd58074491f 100644 --- a/sim/moxie/Makefile.in +++ b/sim/moxie/Makefile.in @@ -17,6 +17,8 @@ ## COMMON_PRE_CONFIG_FRAG +DTC = @DTC@ + dtbdir = @datadir@/gdb/dtb SIM_OBJS = \ @@ -32,9 +34,17 @@ SIM_EXTRA_CFLAGS = -DDTB="\"$(dtbdir)/moxie-gdb.dtb\"" all: moxie-gdb.dtb -moxie-gdb.dtb: moxie-gdb.dts - dtc -O dtb -o moxie-gdb.dtb ${srcdir}/moxie-gdb.dts +moxie-gdb.dtb: @MAINTAINER_MODE_TRUE@ moxie-gdb.dts + @echo Regenerating moxie-gdb.dtb + if test "x$(DTC)" != x; then \ + $(DTC) -O dtb -o moxie-gdb.dtb ${srcdir}/moxie-gdb.dts || exit 1; \ + $(SHELL) $(srcroot)/move-if-change moxie-gdb.dtb ${srcdir}/moxie-gdb.dtb || exit 1; \ + else \ + echo "Could not update the moxie-gdb.dtb file because the device "; \ + echo "tree compiler tool (dtc) is missing. Install the tool to "; \ + echo "update the device tree blob."; \ + fi install-dtb: moxie-gdb.dtb $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(dtbdir) - $(INSTALL_DATA) moxie-gdb.dtb $(DESTDIR)$(dtbdir)/moxie-gdb.dtb + $(INSTALL_DATA) $(srcdir)/moxie-gdb.dtb $(DESTDIR)$(dtbdir)/moxie-gdb.dtb diff --git a/sim/moxie/moxie-gdb.dtb b/sim/moxie/moxie-gdb.dtb new file mode 100644 index 0000000000000000000000000000000000000000..4c7e4570438a62b81df2021bb4c955d9888d2a8b GIT binary patch literal 519 zcmZ8d%}T^D5T34riikhgUWA3kLo4;>f(v``fCjx~}tA<2sM>|^;5zKE|N&LrtB z8ko*}U%r{nm#>qbZ-ChW0Nes(pOmjC&MD3)_&gB*5z9Z{ETKKh`>AGb!lzVE_=4)Z zYn!6iZxTyXPbHz)#QH;ug-7S*&@r3!*lRnkt8|!S9q(DhJEj81y|nvwi5Zodc-9UF zW`icDe5cII>V^hh3OzWjaD}y1qeEK-UF|KvB! zgWu%3x?V1WayPr69;VpaF~uV4x60`)gFm|G9j7>&*KKRjxl*7~4(3k2W2%MjP3>i) d5PIFBf)-z;z(+qC1dAOsTKn2|)I}RO_yq~^OHTj* literal 0 HcmV?d00001 -- 2.25.1