From patchwork Fri Dec 6 13:31:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Rowe X-Patchwork-Id: 1205041 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=citrix.com header.i=@citrix.com header.b="FgiGnaMm"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Ttlj3N2yz9sP6 for ; Sat, 7 Dec 2019 00:31:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AB5D5261BE; Fri, 6 Dec 2019 13:31:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XogG1eHapLez; Fri, 6 Dec 2019 13:31:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id F3F12261D0; Fri, 6 Dec 2019 13:31:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0C6541BF232 for ; Fri, 6 Dec 2019 13:31:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 09113876D2 for ; Fri, 6 Dec 2019 13:31:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4g24vFQe9KQX for ; Fri, 6 Dec 2019 13:31:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 501F4876D0 for ; Fri, 6 Dec 2019 13:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1575639081; h=from:to:cc:subject:date:message-id:mime-version; bh=FpAByhhvJrlADIi7WmYIM5rfyU0MzlgGakp76UC//yM=; b=FgiGnaMmGVFt/k6FnuCMFbQown7q3CnAZeGtE//75X+n2Kq5Dl2v2Jl6 pngAcgC8NMHvNruh3YC+fdRXdvyoy1d55rvkOAaHR4VnKu7OVepUeT18q 0bemT5LIwk2q3AuvCOZzQdonqi2KF74EU/juezWRVnDp5hQ7g749D6pSY 0=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=simon.rowe@citrix.com; spf=Pass smtp.mailfrom=Simon.Rowe@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of simon.rowe@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Simon.Rowe@citrix.com"; x-sender="simon.rowe@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of Simon.Rowe@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Simon.Rowe@citrix.com"; x-sender="Simon.Rowe@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Simon.Rowe@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: b3JnCRV3qDk3H0CMPVWZSD+5RSx1J8U+Z3xOceFXfxBf0cdRlnG38gwJ5lkDxja+BNiB24rxu+ p5FLASAWnPYcqlq3Zvm4vqoIsgbcFO/QhCYmctwz80NdImqZhcUHoexqWExLz3jFNhOIvmF9oC FuRXM2MqauVkQxTytUwUE2lC1TphmwdFBD+VBYuUjnn4n8km9VHnDZS/1veBXIZsAL5sfwrCc9 4hPp8DrYff0rN86SjTgVKxvgSJDCZVc31GdvDhcFVFhdl27M3tQ3O8tccC3dOyJg/GJ43OaXKy szw= X-SBRS: 2.7 X-MesageID: 9306177 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,284,1571716800"; d="scan'208";a="9306177" From: Simon Rowe To: Date: Fri, 6 Dec 2019 13:31:11 +0000 Message-ID: <1575639071-32764-1-git-send-email-simon.rowe@citrix.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/linux-tools: add support for Hyper-V tools X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Rowe , "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "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 --- 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