LGTM Acked-by: Denis Osterland-Heim -----Original Message----- From: ptxdist On Behalf Of Christian Melki Sent: Monday, January 22, 2024 7:34 PM To: ptxdist@pengutronix.de Subject: [EXT] [ptxdist] [PATCH] host-dtc: Move devicetree compiler from platform to hosttools_noprompt. [EXTERNAL EMAIL] The dtc has traditionally been a part of the platform side. It was selected with a specific version to compile various kernel dts:es. Nowdays, target programs has started to require the libfdt in runtime. Ie, programs like QEMU. Beside the runtime, QEMU also have a host-variant which need host tools. This work preps for the QEMU upgrade by using the previous work of target DTC to provide HOST_DTC as a normal ptxconf hosttool. The end result is that HOST_DTC is reachable for HOST_QEMU. This also removes the specific version for the platform side. Signed-off-by: Christian Melki --- platforms/Kconfig | 1 - platforms/host-dtc.in | 23 ----------------------- rules/host-dtc.in | 6 ++++++ rules/host-dtc.make | 25 +++++++------------------ 4 files changed, 13 insertions(+), 42 deletions(-) delete mode 100644 platforms/host-dtc.in create mode 100644 rules/host-dtc.in diff --git a/platforms/Kconfig b/platforms/Kconfig index d9adc4931..93a36bcfe 100644 --- a/platforms/Kconfig +++ b/platforms/Kconfig @@ -14,7 +14,6 @@ menu "architecture " source "generated/architecture_options.in" endmenu source "generated/base_kernel.in" -source "generated/devicetree.in" source "platforms/console.in" menu "extra kernel " diff --git a/platforms/host-dtc.in b/platforms/host-dtc.in deleted file mode 100644 index 00a2c7ffb..000000000 --- a/platforms/host-dtc.in +++ /dev/null @@ -1,23 +0,0 @@ -## SECTION=devicetree - -menuconfig HOST_DTC - tristate "dtc " - select HOST_FLEX - help - Select this if the HOST_DTC tool is required without - building a device tree. (It is also used for building - U-boot FIT images) - -if HOST_DTC - -config HOST_DTC_VERSION - string "Device tree compiler version" - default "1.6.1" - help - Specify the DTC version number to be used - -config HOST_DTC_MD5 - string "dtc source md5sum" - default "380e536cdad51ec0e90c9a8c28df5aac" - -endif diff --git a/rules/host-dtc.in b/rules/host-dtc.in new file mode 100644 index 000000000..10c70643b --- /dev/null +++ b/rules/host-dtc.in @@ -0,0 +1,6 @@ +## SECTION=hosttools_noprompt + +config HOST_DTC + tristate + select HOST_FLEX + default y if ALLYES diff --git a/rules/host-dtc.make b/rules/host-dtc.make index e1625ef91..130dc79a9 100644 --- a/rules/host-dtc.make +++ b/rules/host-dtc.make @@ -2,6 +2,7 @@ # # Copyright (C) 2007 by Sascha Hauer # (C) 2010 by Michael Olbrich +# (C) 2024 by Christian Melki # # For further information about the PTXdist project and license conditions # see the README file. @@ -12,35 +13,23 @@ # HOST_PACKAGES-$(PTXCONF_HOST_DTC) += host-dtc -# -# Paths and names -# -HOST_DTC_VERSION := $(call ptx/config-version, PTXCONF_HOST_DTC) -HOST_DTC_MD5 := $(call ptx/config-md5, PTXCONF_HOST_DTC) -HOST_DTC := dtc-v$(HOST_DTC_VERSION) -HOST_DTC_SUFFIX := tar.gz -HOST_DTC_URL := https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/$(HOST_DTC).$(HOST _DTC_SUFFIX) -HOST_DTC_SOURCE := $(SRCDIR)/$(HOST_DTC).$(HOST_DTC_SUFFIX) -HOST_DTC_DIR := $(HOST_BUILDDIR)/$(HOST_DTC) -HOST_DTC_LICENSE := GPL-2.0-only - # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -HOST_DTC_CONF_TOOL := NO +HOST_DTC_CONF_TOOL := NO -HOST_DTC_MAKE_ENV := $(HOST_ENV) +HOST_DTC_MAKE_ENV := \ + $(HOST_ENV) -HOST_DTC_MAKE_OPT := \ +HOST_DTC_MAKE_OPT := \ PREFIX=/usr \ NO_PYTHON=1 \ NO_VALGRIND=1 \ NO_YAML=1 -HOST_DTC_INSTALL_OPT := \ +HOST_DTC_INSTALL_OPT := \ $(HOST_DTC_MAKE_OPT) \ - install-bin \ - install-lib + install # vim: syntax=make -- 2.34.1