f1863ede94
This patch is based on the patch send by James Knight: http://lists.busybox.net/pipermail/buildroot/2015-May/128754.html Signed-off-by: Romain Naour <romain.naour@openwide.fr> Cc: James Knight <james.knight@rockwellcollins.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
40 lines
963 B
Makefile
40 lines
963 B
Makefile
################################################################################
|
|
#
|
|
# cpupower
|
|
#
|
|
################################################################################
|
|
|
|
LINUX_TOOLS += cpupower
|
|
|
|
CPUPOWER_DEPENDENCIES = pciutils
|
|
|
|
CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \
|
|
CPUFREQ_BENCH=false \
|
|
DEBUG=false
|
|
|
|
define CPUPOWER_BUILD_CMDS
|
|
$(Q)if test ! -f $(@D)/tools/power/cpupower/Makefile ; then \
|
|
echo "Your kernel version is too old and does not have the cpupower tool." ; \
|
|
echo "At least kernel 3.4 must be used." ; \
|
|
exit 1 ; \
|
|
fi
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tools \
|
|
$(CPUPOWER_MAKE_OPTS) \
|
|
cpupower
|
|
endef
|
|
|
|
define CPUPOWER_INSTALL_STAGING_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tools \
|
|
$(CPUPOWER_MAKE_OPTS) \
|
|
DESTDIR=$(STAGING_DIR) \
|
|
cpupower_install
|
|
endef
|
|
|
|
define CPUPOWER_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tools \
|
|
$(CPUPOWER_MAKE_OPTS) \
|
|
DESTDIR=$(TARGET_DIR) \
|
|
cpupower_install
|
|
endef
|