From patchwork Fri Apr 6 17:52:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 151231 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id AC66AB7083 for ; Sat, 7 Apr 2012 03:53:06 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SGDL7-0003EZ-0F; Fri, 06 Apr 2012 17:52:49 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SGDL5-0003EB-22 for kernel-team@lists.ubuntu.com; Fri, 06 Apr 2012 17:52:47 +0000 Received: from host86-166-226-191.range86-166.btcentralplus.com ([86.166.226.191] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SGDL4-00026r-QZ; Fri, 06 Apr 2012 17:52:47 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/3] UBUNTU: Hyper-V KVP daemon -- add to the tools package Date: Fri, 6 Apr 2012 18:52:43 +0100 Message-Id: <1333734763-6664-4-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1333734763-6664-1-git-send-email-apw@canonical.com> References: <1333734763-6664-1-git-send-email-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Add the Hyper-V KVP userspace daemon to the kernel tools package. Signed-off-by: Andy Whitcroft --- debian/rules.d/2-binary-arch.mk | 4 ++++ debian/rules.d/3-binary-indep.mk | 4 ++++ debian/tools/generic | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 debian/tools/generic diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 60b83d2..8308925 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -401,6 +401,7 @@ ifeq ($(do_tools),true) if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \ cd $(builddir)/tools/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE); \ cd $(builddir)/tools/tools/power/x86/turbostat && make CROSS_COMPILE=$(CROSS_COMPILE); \ + cd $(builddir)/tools/tools/hv && make CROSS_COMPILE=$(CROSS_COMPILE) CFLAGS=-I../../include; \ fi endif @touch $@ @@ -417,6 +418,9 @@ ifeq ($(do_tools),true) $(toolspkgdir)/usr/bin/x86_energy_perf_policy_$(abi_release); \ install -s -m755 $(builddir)/tools/tools/power/x86/turbostat/turbostat \ $(toolspkgdir)/usr/bin/turbostat_$(abi_release); \ + install -d $(toolspkgdir)/usr/sbin; \ + install -s -m755 $(builddir)/tools/tools/hv/hv_kvp_daemon \ + $(toolspkgdir)/usr/sbin/hv_kvp_daemon_$(abi_release); \ fi endif diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index 462d721..de3583a 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -81,6 +81,7 @@ endif install-tools: toolspkg = $(tools_common_pkg_name) install-tools: toolsbin = $(CURDIR)/debian/$(toolspkg)/usr/bin +install-tools: toolssbin = $(CURDIR)/debian/$(toolspkg)/usr/sbin install-tools: toolsman = $(CURDIR)/debian/$(toolspkg)/usr/share/man install-tools: install-source ifeq ($(do_tools),true) @@ -95,6 +96,8 @@ ifeq ($(do_tools),true) if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \ install -m755 debian/tools/x86_energy_perf_policy $(toolsbin)/x86_energy_perf_policy; \ install -m755 debian/tools/turbostat $(toolsbin)/turbostat; \ + install -d $(toolssbin) ; \ + install -m755 debian/tools/generic $(toolssbin)/hv_kvp_daemon; \ fi rm -rf $(builddir)/tools @@ -110,6 +113,7 @@ ifeq ($(do_tools),true) install -d $(toolsman)/man8; \ install -m644 $(CURDIR)/tools/power/x86/x86_energy_perf_policy/*.8 $(toolsman)/man8; \ install -m644 $(CURDIR)/tools/power/x86/turbostat/*.8 $(toolsman)/man8; \ + install -m644 $(CURDIR)/tools/hv/*.8 $(toolsman)/man8; \ fi endif diff --git a/debian/tools/generic b/debian/tools/generic new file mode 100644 index 0000000..61b427d --- /dev/null +++ b/debian/tools/generic @@ -0,0 +1,16 @@ +#!/bin/bash +full_version=`uname -r` + +# Removing flavour from version i.e. generic or server. +flavour_abi=${full_version#*-} +flavour=${flavour_abi#*-} +version=${full_version%-$flavour} +this="$0_$version" + +if [ ! -f "$this" ]; then + echo "$this not found" >&2 + echo "You may need to install linux-tools-$version" >&2 + exit 2 +fi + +exec "$this" "$@"