Skip to content
Snippets Groups Projects
Commit 630d059a authored by Sukru Senli's avatar Sukru Senli
Browse files

power-control: move from iopsys to broadcom feed as it is broadcom specific

parent 9e5356a6
Branches
Tags
No related merge requests found
include $(TOPDIR)/rules.mk
PKG_NAME:=power-control
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
define Package/power-control
CATEGORY:=Utilities
TITLE:=Broadcom Power Control
endef
define Package/power-control/description
Broadcom Power Control
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/power-control/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,power-control))
config pwrctl 'config'
option avs '0'
option cpuspeed '0'
option cpuwait '0'
option eee '0'
#!/bin/sh /etc/rc.common
START=13
USE_PROCD=1
. /lib/functions.sh
parsebool() {
[ "$1" = "1" ] && echo "on" || echo "off"
}
start_service() {
config_load power_mgmt
local cpuspeed
config_get speed config cpuspeed
pwrctl config --cpuspeed $(parsebool $cpuspeed)
local cpuwait
config_get cpuwait config cpuwait
pwrctl config --cpuwait $(parsebool $cpuwait)
local sr
config_get sr config sr
pwrctl config --sr $(parsebool $sr)
local eee
config_get eee config eee
pwrctl config --eee $(parsebool $eee)
local avs
config_get avs config avs
pwrctl config --avs $(parsebool $avs)
}
service_triggers() {
procd_add_reload_trigger pwrctl
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment