From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/7] dtc: add host build
Date: Sat, 3 Oct 2015 23:13:46 +0200 [thread overview]
Message-ID: <20151003231346.36ccac9e@gmx.net> (raw)
In-Reply-To: <1443901457-7914-3-git-send-email-thomas.petazzoni@free-electrons.com>
Hello Thomas,
On Sat, 3 Oct 2015 20:44:12 +0100, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> From: Peter Seiderer <ps.report@gmx.net>
>
> Having a host variant of dtc is needed for example for U-Boot, which
> uses the Device Tree for a number of platforms.
>
> In addition, now that we have a proper host-dtc package, it is no
> longer needed for the linux package to install the host dtc compiler:
> users interested in having the host dtc compiler can simply enable
> this package.
No, please do not drop the linux dtc host...things have changed since
my initial patch set. My intend was do enable a host dtc version with
overlay support as used with the raspberry pi (therefore the host
dtc package with overlay support patches which where not included
with the rpi kernel sources dtc package). Now things have changed
and the actual rpi kernel sources dtc already contain the overlay
patches. Please keep both options, linux sources host dtc and
extra host dtc package...
Regards,
Peter
>
> A Config.in.host option is added to build host-dtc, because the
> initial reason why the host DTC built by the kernel was installed in
> $(HOST_DIR)/usr/bin (commit 707d44d0a28906ebda49584dd5f55985406f0bde
> from Thomas DS) was:
>
> Having dtc as a host tool can be useful for users that have a
> custom boot scenario where the device tree is not embedded in the
> kernel.
>
> [Thomas:
> - remove the linux installation of host dtc.
> - rework the commit log.]
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> linux/linux.mk | 10 ----------
> package/Config.in.host | 1 +
> package/dtc/Config.in.host | 9 +++++++++
> package/dtc/dtc.mk | 10 ++++++++++
> 4 files changed, 20 insertions(+), 10 deletions(-)
> create mode 100644 package/dtc/Config.in.host
>
> diff --git a/linux/linux.mk b/linux/linux.mk
> index bbcc54b..8c0db9b 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -290,15 +290,6 @@ define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
> endef
> endif
>
> -
> -define LINUX_INSTALL_HOST_TOOLS
> - # Installing dtc (device tree compiler) as host tool, if selected
> - if grep -q "CONFIG_DTC=y" $(@D)/.config; then \
> - $(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc ; \
> - fi
> -endef
> -
> -
> define LINUX_INSTALL_IMAGES_CMDS
> cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
> $(LINUX_INSTALL_DTB)
> @@ -313,7 +304,6 @@ define LINUX_INSTALL_TARGET_CMDS
> rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \
> rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \
> fi
> - $(LINUX_INSTALL_HOST_TOOLS)
> endef
>
> # Include all our extensions and tools definitions.
> diff --git a/package/Config.in.host b/package/Config.in.host
> index 1e047aa..1f69687 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -5,6 +5,7 @@ menu "Host utilities"
> source "package/dfu-util/Config.in.host"
> source "package/dos2unix/Config.in.host"
> source "package/dosfstools/Config.in.host"
> + source "package/dtc/Config.in.host"
> source "package/e2fsprogs/Config.in.host"
> source "package/e2tools/Config.in.host"
> source "package/faketime/Config.in.host"
> diff --git a/package/dtc/Config.in.host b/package/dtc/Config.in.host
> new file mode 100644
> index 0000000..cbabf0a
> --- /dev/null
> +++ b/package/dtc/Config.in.host
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_HOST_DTC
> + bool "host dtc"
> + help
> + The Device Tree Compiler, dtc, takes as input a device-tree in
> + a given format and outputs a device-tree in another format.
> +
> + Install host tools: dtc, convert-dtsv0, fdtdump, fdtget and fdtput.
> +
> + https://git.kernel.org/cgit/utils/dtc/dtc.git
> diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk
> index e094f7b..f3b6f3b 100644
> --- a/package/dtc/dtc.mk
> +++ b/package/dtc/dtc.mk
> @@ -44,4 +44,14 @@ define DTC_INSTALL_TARGET_CMDS
> $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL)
> endef
>
> +# host build
> +define HOST_DTC_BUILD_CMDS
> + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr
> +endef
> +
> +define HOST_DTC_INSTALL_CMDS
> + $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install-bin
> +endef
> +
> $(eval $(generic-package))
> +$(eval $(host-generic-package))
next prev parent reply other threads:[~2015-10-03 21:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-03 19:44 [Buildroot] [PATCH 0/7] configs: fix build of many defconfigs Thomas Petazzoni
2015-10-03 19:44 ` [Buildroot] [PATCH 1/7] configs: remove gnublin_defconfig Thomas Petazzoni
2015-10-03 21:06 ` Peter Seiderer
2015-10-04 8:15 ` Thomas Petazzoni
2015-10-04 17:01 ` Peter Korsgaard
2015-10-03 19:44 ` [Buildroot] [PATCH 2/7] dtc: add host build Thomas Petazzoni
2015-10-03 21:13 ` Peter Seiderer [this message]
2015-10-04 18:12 ` Peter Korsgaard
2015-10-04 18:14 ` Peter Korsgaard
2015-10-03 19:44 ` [Buildroot] [PATCH 3/7] u-boot: add an option to indicate that DTC is needed Thomas Petazzoni
2015-10-03 21:19 ` Arnout Vandecappelle
2015-10-04 18:15 ` Peter Korsgaard
2015-10-03 19:44 ` [Buildroot] [PATCH 4/7] configs: fix configurations that need host-dtc Thomas Petazzoni
2015-10-04 18:16 ` Peter Korsgaard
2015-10-03 19:44 ` [Buildroot] [PATCH 5/7] configs: fix build of calao_usb_a9g20_lpw_defconfig Thomas Petazzoni
2015-10-04 17:06 ` Peter Korsgaard
2015-10-03 19:44 ` [Buildroot] [PATCH 6/7] configs: fix build of calao_qil_a9260_defconfig Thomas Petazzoni
2015-10-04 17:06 ` Peter Korsgaard
2015-10-03 19:44 ` [Buildroot] [PATCH 7/7] configs: remove old/broken Atmel configurations Thomas Petazzoni
2015-10-03 20:41 ` Alexandre Belloni
2015-10-03 20:54 ` Arnout Vandecappelle
2015-10-13 21:30 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151003231346.36ccac9e@gmx.net \
--to=ps.report@gmx.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox