Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpupower: add new package #25536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions utils/cpupower/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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:=Utils
TITLE:=Shows and sets processor power related values
URL:=https://www.kernel.org
VERSION:=$(LINUX_VERSION).$(PKG_RELEASE)
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/ -fhonour-copts/) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)"

define Build/Compile
sed -i '/^CROSS/d' $(LINUX_DIR)/tools/power/cpupower/Makefile
-$(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))
Loading