mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3] dtc: new package
@ 2024-01-05 11:51 Ladislav Michl
  2024-01-10 16:57 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Ladislav Michl @ 2024-01-05 11:51 UTC (permalink / raw)
  To: ptxdist

From: Ladislav Michl <ladis@linux-mips.org>

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 <christian.melki@t2data.com>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 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 <ladis@linux-mips.org>
+# Copyright (C) 2023 Christian Melki <christian.melki@t2data.com>
+#
+# 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 <ladis@linux-mips.org>")
+	@$(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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [APPLIED] dtc: new package
  2024-01-05 11:51 [ptxdist] [PATCH v3] dtc: new package Ladislav Michl
@ 2024-01-10 16:57 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-01-10 16:57 UTC (permalink / raw)
  To: ptxdist; +Cc: Ladislav Michl

Thanks, applied as 16a4e453c9e0b8621e4e61df141a32f23cbe262d.

Michael

[sent from post-receive hook]

On Wed, 10 Jan 2024 17:57:46 +0100, Ladislav Michl <oss-lists@triops.cz> wrote:
> 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 <christian.melki@t2data.com>
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> Message-Id: <ZZftXYnr_AtjAC7I@lenoch>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/dtc.in b/rules/dtc.in
> new file mode 100644
> index 000000000000..e6d0b84d5e22
> --- /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 000000000000..9075e11a6b64
> --- /dev/null
> +++ b/rules/dtc.make
> @@ -0,0 +1,82 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2022 Ladislav Michl <ladis@linux-mips.org>
> +# Copyright (C) 2023 Christian Melki <christian.melki@t2data.com>
> +#
> +# 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 <ladis@linux-mips.org>")
> +	@$(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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-10 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05 11:51 [ptxdist] [PATCH v3] dtc: new package Ladislav Michl
2024-01-10 16:57 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox