* [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools
@ 2019-12-06 13:31 Simon Rowe
2019-12-06 13:33 ` Simon Rowe
0 siblings, 1 reply; 4+ messages in thread
From: Simon Rowe @ 2019-12-06 13:31 UTC (permalink / raw)
To: buildroot
Add support for selection and compiling the Hyper-V tools on buildroot.
These tools are available to be compiled since kernel 3.15 but only had
an install target since 4.16.
Signed-off-by: Simon Rowe <simon.rowe@citrix.com>
---
package/linux-tools/Config.in | 8 ++++++++
package/linux-tools/linux-tool-hv.mk.in | 29 +++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 package/linux-tools/linux-tool-hv.mk.in
diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index ab8cc38..947ef05 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -25,6 +25,14 @@ config BR2_PACKAGE_LINUX_TOOLS_GPIO
These tools are available only from kernel version 4.8.
+config BR2_PACKAGE_LINUX_TOOLS_HV
+ bool "hv"
+ select BR2_PACKAGE_LINUX_TOOLS
+ help
+ hv is a collection of tools to interact with Hyper-V.
+
+ These tools are available only from kernel version 4.16.
+
config BR2_PACKAGE_LINUX_TOOLS_IIO
bool "iio"
select BR2_PACKAGE_LINUX_TOOLS
diff --git a/package/linux-tools/linux-tool-hv.mk.in b/package/linux-tools/linux-tool-hv.mk.in
new file mode 100644
index 0000000..803eb7e
--- /dev/null
+++ b/package/linux-tools/linux-tool-hv.mk.in
@@ -0,0 +1,29 @@
+################################################################################
+#
+# hv
+#
+################################################################################
+
+LINUX_TOOLS += hv
+
+HV_MAKE_OPTS = $(LINUX_MAKE_FLAGS)
+
+define HV_BUILD_CMDS
+ $(Q)if ! grep install $(LINUX_DIR)/tools/hv/Makefile >/dev/null 2>&1 ; then \
+ echo "Your kernel version is too old and does not have install section in the hv tools." ; \
+ echo "At least kernel 4.16 must be used." ; \
+ exit 1 ; \
+ fi
+
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/hv \
+ $(HV_MAKE_OPTS)
+endef
+
+# DESTDIR used since kernel version 4.14
+define HV_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/hv \
+ $(HV_MAKE_OPTS) \
+ INSTALL_ROOT=$(TARGET_DIR) \
+ DESTDIR=$(TARGET_DIR) \
+ install
+endef
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools
2019-12-06 13:31 [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools Simon Rowe
@ 2019-12-06 13:33 ` Simon Rowe
2019-12-06 14:17 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Simon Rowe @ 2019-12-06 13:33 UTC (permalink / raw)
To: buildroot
What's the probability of that, someone else just sent a patch 15
minutes ago while I was testing this one,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools
2019-12-06 13:33 ` Simon Rowe
@ 2019-12-06 14:17 ` Thomas Petazzoni
2019-12-06 14:20 ` Pascal de Bruijn
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2019-12-06 14:17 UTC (permalink / raw)
To: buildroot
Hello,
+Pascal in Cc.
On Fri, 6 Dec 2019 13:33:50 +0000
Simon Rowe <simon.rowe@eu.citrix.com> wrote:
> What's the probability of that, someone else just sent a patch 15
> minutes ago while I was testing this one,
Pascal: the approach of Simon is to have a single option to
build/install all tools. Do we really need one option per tool like you
implemented? In which use cases would only a subset of the tools be
needed? What is the installed size of each tool?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools
2019-12-06 14:17 ` Thomas Petazzoni
@ 2019-12-06 14:20 ` Pascal de Bruijn
0 siblings, 0 replies; 4+ messages in thread
From: Pascal de Bruijn @ 2019-12-06 14:20 UTC (permalink / raw)
To: buildroot
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Simon Rowe <simon.rowe@eu.citrix.com>
Cc: Simon Rowe <simon.rowe@citrix.com>, <buildroot@buildroot.org>, Yann E. MORIN <yann.morin.1998@free.fr>, Pascal de Bruijn <p.debruijn@unilogic.nl>
Sent: 12/6/2019 3:17 PM
Subject: Re: [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools
Hello,
+Pascal in Cc.
On Fri, 6 Dec 2019 13:33:50 +0000
Simon Rowe <simon.rowe@eu.citrix.com> wrote:
> What's the probability of that, someone else just sent a patch 15
> minutes ago while I was testing this one,
Pascal: the approach of Simon is to have a single option to
build/install all tools. Do we really need one option per tool like you
implemented? In which use cases would only a subset of the tools be
needed? What is the installed size of each tool?
The size of each tool is very limited, so that's at best a secondary concern.
But for example the fcopy service basically gives the virtualization host provider direct access to the guest filesystem., which is not something everybody may want to actively facilitate.
Having these different services nicely separated out, is specifically one of the nice things opposed to VMware's openvmtools/vmtoolsd.
Regards,
Pascal de Bruijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20191206/6d69a562/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-06 14:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-06 13:31 [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools Simon Rowe
2019-12-06 13:33 ` Simon Rowe
2019-12-06 14:17 ` Thomas Petazzoni
2019-12-06 14:20 ` Pascal de Bruijn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox