* [ptxdist] [PATCH] host-dtc: Move devicetree compiler from platform to hosttools_noprompt.
@ 2024-01-22 18:33 Christian Melki
2024-02-08 16:02 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Christian Melki @ 2024-01-22 18:33 UTC (permalink / raw)
To: ptxdist
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 <christian.melki@t2data.com>
---
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 <m.olbrich@pengutronix.de>
+# (C) 2024 by Christian Melki <christian.melki@t2data.com>
#
# 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] host-dtc: Move devicetree compiler from platform to hosttools_noprompt.
2024-01-22 18:33 [ptxdist] [PATCH] host-dtc: Move devicetree compiler from platform to hosttools_noprompt Christian Melki
@ 2024-02-08 16:02 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-02-08 16:02 UTC (permalink / raw)
To: ptxdist; +Cc: Christian Melki
Thanks, applied as 26c748066384b0641f6964d53704f3ccc24811a9.
Michael
[sent from post-receive hook]
On Thu, 08 Feb 2024 17:02:57 +0100, Christian Melki <christian.melki@t2data.com> wrote:
> 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 <christian.melki@t2data.com>
> Message-Id: <20240122183341.4113189-1-christian.melki@t2data.com>
> Acked-by: Denis Osterland-Heim <denis.osterland@diehl.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/platforms/Kconfig b/platforms/Kconfig
> index d9adc4931cdd..93a36bcfe41f 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 00a2c7ffb71f..000000000000
> --- 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 000000000000..10c70643bdd4
> --- /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 e1625ef9121c..130dc79a9f9f 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 <m.olbrich@pengutronix.de>
> +# (C) 2024 by Christian Melki <christian.melki@t2data.com>
> #
> # 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-08 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-22 18:33 [ptxdist] [PATCH] host-dtc: Move devicetree compiler from platform to hosttools_noprompt Christian Melki
2024-02-08 16:02 ` [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