2015-07-14 19:35:13 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# cpupower
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
LINUX_TOOLS += cpupower
|
|
|
|
|
2016-08-19 11:09:53 +02:00
|
|
|
CPUPOWER_DEPENDENCIES = pciutils $(if $(BR2_NEEDS_GETTEXT),gettext)
|
2015-07-14 19:35:13 +02:00
|
|
|
|
|
|
|
CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \
|
|
|
|
CPUFREQ_BENCH=false \
|
2016-08-19 11:09:53 +02:00
|
|
|
NLS=false \
|
|
|
|
$(if $(BR2_NEEDS_GETTEXT),LDFLAGS=-lintl) \
|
2015-07-14 19:35:13 +02:00
|
|
|
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
|