Commit c5ca5586 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Tim Gardner

UBUNTU: [Debian] linux-tools: switch to common generic version helper

Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
parent b308a7d3
......@@ -92,15 +92,15 @@ ifeq ($(do_tools),true)
install -d $(toolsbin)
install -d $(toolsman)/man1
install -m755 debian/tools/cpupower $(toolsbin)/cpupower
install -m755 debian/tools/generic $(toolsbin)/cpupower
install -m644 $(CURDIR)/tools/power/cpupower/man/*.1 $(toolsman)/man1/
ifeq ($(do_tools_perf),true)
install -m755 debian/tools/perf $(toolsbin)/perf
install -m755 debian/tools/generic $(toolsbin)/perf
endif
ifeq ($(do_tools_x86),true)
install -m755 debian/tools/x86_energy_perf_policy $(toolsbin)/x86_energy_perf_policy
install -m755 debian/tools/turbostat $(toolsbin)/turbostat
install -m755 debian/tools/generic $(toolsbin)/x86_energy_perf_policy
install -m755 debian/tools/generic $(toolsbin)/turbostat
endif
ifeq ($(do_tools_hyperv),true)
install -d $(toolssbin)
......
#!/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}
cpupower="cpupower_$version"
if ! which "$cpupower" > /dev/null; then
echo "$cpupower not found" >&2
echo "You may need to install linux-tools-$version" >&2
exit 2
fi
exec "$cpupower" "$@"
#!/bin/bash
full_version=`uname -r`
# First check for a fully qualified version.
this="/usr/lib/linux-tools/$full_version/`basename $0`"
if [ -f "$this" ]; then
exec "$this" "$@"
fi
# 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
if [ -f "$this" ]; then
exec "$this" "$@"
fi
exec "$this" "$@"
# Give them a hint as to what to install.
echo "`basename $0` not found for kernel $version" >&2
echo "You may need to install linux-tools-$version-$flavour" >&2
exit 2
#!/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}
perf="perf_$version"
if ! which "$perf" > /dev/null; then
echo "$perf not found" >&2
echo "You may need to install linux-tools-$version" >&2
exit 2
fi
exec "$perf" "$@"
#!/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" "$@"
#!/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" "$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment