$(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 $@
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)
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
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
--- /dev/null
+#!/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" "$@"
--- /dev/null
+#!/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" "$@"