diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2011-08-09 11:00:18 -0600 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2011-09-23 08:55:13 -0600 |
commit | 358e8265fa8ca1710d022b4ef697165525d87a0a (patch) | |
tree | d32b9390a153e2eaf4faaa735121dc8b8b3dde54 /debian | |
parent | 9feeab61258c1103b07517f628d3dc982a989c93 (diff) |
UBUNTU: [Config] Package x86_energy_perf_policy and turbostat
BugLink: http://bugs.launchpad.net/bugs/797556
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'debian')
-rw-r--r-- | debian/rules.d/2-binary-arch.mk | 10 | ||||
-rw-r--r-- | debian/rules.d/3-binary-indep.mk | 9 | ||||
-rw-r--r-- | debian/tools/turbostat | 16 | ||||
-rw-r--r-- | debian/tools/x86_energy_perf_policy | 16 |
4 files changed, 51 insertions, 0 deletions
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index c16459bab85..29788fcc7a5 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -366,6 +366,10 @@ endif $(stampdir)/stamp-build-perarch: prepare-perarch ifeq ($(do_tools),true) cd $(builddir)/tools/tools/perf && make $(CROSS_COMPILE) + if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \ + cd $(builddir)/tools/tools/power/x86/x86_energy_perf_policy && make $(CROSS_COMPILE); \ + cd $(builddir)/tools/tools/power/x86/turbostat && make $(CROSS_COMPILE); \ + fi endif @touch $@ @@ -376,6 +380,12 @@ ifeq ($(do_tools),true) install -d $(toolspkgdir)/usr/bin install -s -m755 $(builddir)/tools/tools/perf/perf \ $(toolspkgdir)/usr/bin/perf_$(abi_release) + if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \ + install -s -m755 $(builddir)/tools/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy \ + $(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); \ + fi endif binary-perarch: toolspkg = $(tools_pkg_name) diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index d929bd56b31..6f71fd72410 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -85,6 +85,10 @@ install-tools: install -d $(toolsman)/man1 install -m755 debian/tools/perf $(toolsbin)/perf + 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; \ + fi rm -rf $(builddir)/tools install -d $(builddir)/tools @@ -95,6 +99,11 @@ install-tools: cd $(builddir)/tools/tools/perf && make man install -m644 $(builddir)/tools/tools/perf/Documentation/*.1 \ $(toolsman)/man1 + if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \ + 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; \ + fi ifeq ($(do_common_headers_indep),true) install-indep-deps-$(do_flavour_header_package) += install-headers diff --git a/debian/tools/turbostat b/debian/tools/turbostat new file mode 100644 index 00000000000..ac4af7c9acc --- /dev/null +++ b/debian/tools/turbostat @@ -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} +turbostat="turbostat_$version" + +if ! which "$turbostat" > /dev/null; then + echo "$turbostat not found" >&2 + echo "You may need to install linux-tools-$version" >&2 + exit 2 +fi + +exec "$turbostat" "$@" diff --git a/debian/tools/x86_energy_perf_policy b/debian/tools/x86_energy_perf_policy new file mode 100644 index 00000000000..7b97a9e091b --- /dev/null +++ b/debian/tools/x86_energy_perf_policy @@ -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} +x86_energy_perf_policy="x86_energy_perf_policy_$version" + +if ! which "$x86_energy_perf_policy" > /dev/null; then + echo "$x86_energy_perf_policy not found" >&2 + echo "You may need to install linux-tools-$version" >&2 + exit 2 +fi + +exec "$x86_energy_perf_policy" "$@" |