-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux kernel userspace tool to examine and to tune power saving related features of the processor Signed-off-by: John Audia <[email protected]>
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
include $(TOPDIR)/rules.mk | ||
include $(INCLUDE_DIR)/kernel.mk | ||
|
||
PKG_NAME:=cpupower | ||
PKG_VERSION:=$(LINUX_VERSION) | ||
PKG_RELEASE:=1 | ||
|
||
PKG_MAINTAINER:=John Audia <[email protected]> | ||
PKG_LICENSE:=GPL-2.0-only | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/cpupower | ||
SECTION:=utils | ||
CATEGORY:=Utilities | ||
TITLE:=Shows and sets processor power related values | ||
VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) | ||
URL:=https://www.kernel.org | ||
DEPENDS:=+libpci | ||
endef | ||
|
||
define Package/cpupower/description | ||
Linux kernel tool to examine and to tune power saving related features of the processor | ||
endef | ||
|
||
MAKE_FLAGS = \ | ||
ARCH="$(LINUX_KARCH)" \ | ||
CROSS_COMPILE="$(TARGET_CROSS)" \ | ||
CC="$(TARGET_CC)" \ | ||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ | ||
LDFLAGS="$(TARGET_LDFLAGS)" | ||
|
||
define Build/Compile | ||
-$(MAKE) clean \ | ||
-C $(LINUX_DIR)/tools/power/cpupower | ||
+$(MAKE_FLAGS) $(MAKE) \ | ||
-C $(LINUX_DIR)/tools/power/cpupower | ||
endef | ||
|
||
define Package/cpupower/install | ||
$(INSTALL_DIR) $(1)/usr/bin | ||
$(INSTALL_DIR) $(1)/usr/lib | ||
$(INSTALL_BIN) $(LINUX_DIR)/tools/power/cpupower/cpupower $(1)/usr/bin/ | ||
$(CP) $(LINUX_DIR)/tools/power/cpupower/libcpu* $(1)/usr/lib | ||
endef | ||
|
||
$(eval $(call BuildPackage,cpupower)) |