From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 05 Jan 2024 12:52:20 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rLikN-004fNA-2h for lore@lore.pengutronix.de; Fri, 05 Jan 2024 12:52:20 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1rLikN-0007vT-Ka; Fri, 05 Jan 2024 12:52:19 +0100 Received: from h1.cmg1.smtp.forpsi.com ([81.2.195.162]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rLik3-0007uk-Bu for ptxdist@pengutronix.de; Fri, 05 Jan 2024 12:52:00 +0100 Received: from lenoch ([91.218.190.200]) by cmgsmtp with ESMTPSA id Lik1r0pzRsdmGLik2rKnxU; Fri, 05 Jan 2024 12:51:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=triops.cz; s=f2019; t=1704455518; bh=mNSeQrCp22pgpO0T88wlHFHO9qU4cv+cMYb7I+oyutM=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=33yJwsXjJ29C5lWfwKs6pwDJ3J95szVFlMDzxOInDVmFv7ZWP/lSt9hwkVayrOOb8 yh43vf238gjxK/hwwzd/STfwdLQD6Gu7WILdu75tkGSQ3YR5ZyzuacGGgLYfN7yNlQ zwSFFfqeeRm3/+baWV7Sbn/Jh467dFQPh7+Rvny4estI9vf+lBga2pNXowoLNZqL+r 4G4cEZ7AO5G8AkbID49o9O9CZXacskllR4Jakub5rpqWRohy7YSVb3tgp5pYhX85DP o7KWQb2e7LQp9UwCNe2+jvu520j7utMGJhdH2PMmQ+PqXgq3QU9s96zjQyq5c3te1g FJ19Rf+mrTRRw== Date: Fri, 5 Jan 2024 12:51:57 +0100 From: Ladislav Michl To: ptxdist@pengutronix.de Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CMAE-Envelope: MS4wfL/pM5JuyGeqIqNhQhppuwSjGKs0xm6qrOQsUuS7LTm6TTNlTTf35dAZBiOfWWMIu3zv6UmgwYE8JdgbtgLNssJNRU/XG5gpZfeJ5XSOIl0Bx64ZRfOt G+r6RqHVr2OS/WGELU38vL4W6j9Sm0h23jzOID8XtbQ+c9syXdQ9fMax X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH v3] dtc: new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false From: Ladislav Michl Please note this package is not as symmetrical as the typical host-* and normal variants. Here the latest version is usually needed. This work is prepping for qemu 8.2.0+, as it requires libfdt as a separate library. It has stopped providing one internally. Signed-off-by: Christian Melki Signed-off-by: Ladislav Michl --- CHANGES: -v2: select HOST_FLEX, drop 'v' from url version, update md5, use proper DTC_MAKE_ENV -v3: use ptx/nl, use osi-conform license rules/dtc.in | 37 +++++++++++++++++++++++ rules/dtc.make | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 rules/dtc.in create mode 100644 rules/dtc.make diff --git a/rules/dtc.in b/rules/dtc.in new file mode 100644 index 000000000..e6d0b84d5 --- /dev/null +++ b/rules/dtc.in @@ -0,0 +1,37 @@ +## SECTION=system_libraries +menuconfig DTC + tristate + prompt "dtc " + select HOST_FLEX + help + Device Tree Compiler (dtc) toolchain. While dtc itself is + occasionally needed for device tree manipulaton on the + target, libfdt may be required. + +if DTC + +config DTC_DTC + bool + prompt "dtc" + +config DTC_DTDIFF + bool + prompt "dtdiff" + +config DTC_FDTDUMP + bool + prompt "fdtdump" + +config DTC_FDTGET + bool + prompt "fdtget" + +config DTC_FDTOVERLAY + bool + prompt "fdtoverlay" + +config DTC_FDTPUT + bool + prompt "fdtput" + +endif diff --git a/rules/dtc.make b/rules/dtc.make new file mode 100644 index 000000000..9075e11a6 --- /dev/null +++ b/rules/dtc.make @@ -0,0 +1,82 @@ +# -*-makefile-*- +# +# Copyright (C) 2022 Ladislav Michl +# Copyright (C) 2023 Christian Melki +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_DTC) += dtc + +# +# Paths and names +# +DTC_VERSION := 1.7.0 +DTC_MD5 := f8b4469ad89f4b882091895ec60dde6b +DTC := dtc-$(DTC_VERSION) +DTC_SUFFIX := tar.gz +DTC_URL := https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/$(DTC).$(DTC_SUFFIX) +DTC_SOURCE := $(SRCDIR)/$(DTC).$(DTC_SUFFIX) +DTC_DIR := $(BUILDDIR)/$(DTC) +DTC_LICENSE := GPL-2.0-or-later OR BSD-2-Clause +DTC_LICENSE_FILES := \ + file://README.license;md5=a1eb22e37f09df5b5511b8a278992d0e \ + file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +DTC_CONF_TOOL := NO + +DTC_MAKE_ENV := $(CROSS_ENV) + +DTC_MAKE_OPT := \ + PREFIX=/usr \ + NO_PYTHON=1 \ + NO_VALGRIND=1 \ + NO_YAML=1 + +DTC_INSTALL_OPT := \ + $(DTC_MAKE_OPT) \ + install-bin \ + install-includes \ + install-lib + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +DTC_BIN-y := +DTC_BIN-$(PTXCONF_DTC_DTC) += dtc +DTC_BIN-$(PTXCONF_DTC_DTDIFF) += dtdiff +DTC_BIN-$(PTXCONF_DTC_FDTDUMP) += fdtdump +DTC_BIN-$(PTXCONF_DTC_FDTGET) += fdtget +DTC_BIN-$(PTXCONF_DTC_FDTOVERLAY) += fdtoverlay +DTC_BIN-$(PTXCONF_DTC_FDTPUT) += fdtput + +$(STATEDIR)/dtc.targetinstall: + @$(call targetinfo) + + @$(call install_init, dtc) + @$(call install_fixup, dtc,PRIORITY,optional) + @$(call install_fixup, dtc,SECTION,base) + @$(call install_fixup, dtc,AUTHOR,"Ladislav Michl ") + @$(call install_fixup, dtc,DESCRIPTION,missing) + + @$(call install_lib, dtc, 0, 0, 0644, libfdt-$(DTC_VERSION)) + + @$(foreach tool, $(DTC_BIN-y), \ + $(call install_copy, dtc, 0, 0, 0755, -, \ + /usr/bin/$(tool))$(ptx/nl)) + + @$(call install_finish, dtc) + + @$(call touch) + +# vim: syntax=make -- 2.39.2