mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
linux: build and install 'cpupower' tool, set cpu to 'fullpower' on boot and to 'ondemand' after boot finished
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
e81ddd492d
commit
b3a59b0e69
@ -51,3 +51,14 @@ rm -f modules/lib/modules/*/build
|
|||||||
rm -f modules/lib/modules/*/source
|
rm -f modules/lib/modules/*/source
|
||||||
|
|
||||||
make $KERNEL_IMAGE
|
make $KERNEL_IMAGE
|
||||||
|
|
||||||
|
( cd tools/power/cpupower
|
||||||
|
|
||||||
|
export CFLAGS="$TARGET_CFLAGS -I$SYSROOT_PREFIX/usr/include"
|
||||||
|
export LDFLAGS="$TARGET_LDFLAGS -L$SYSROOT_PREFIX/lib -L$SYSROOT_PREFIX/usr/lib"
|
||||||
|
|
||||||
|
make CROSS="$TARGET_PREFIX" \
|
||||||
|
V=1 \
|
||||||
|
DEBUG=false \
|
||||||
|
NLS=false \
|
||||||
|
)
|
28
packages/linux/init.d/01_cpupower
Normal file
28
packages/linux/init.d/01_cpupower
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
################################################################################
|
||||||
|
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||||
|
# http://www.openelec.tv
|
||||||
|
#
|
||||||
|
# This Program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This Program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||||
|
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# set cpupower to 'performance'
|
||||||
|
#
|
||||||
|
# runlevels: openelec, textmode
|
||||||
|
|
||||||
|
progress "set cpu's to full power"
|
||||||
|
|
||||||
|
cpupower frequency-set -g performance
|
@ -46,3 +46,8 @@ mkdir -p $INSTALL/etc
|
|||||||
mkdir -p $INSTALL/etc/modprobe.d
|
mkdir -p $INSTALL/etc/modprobe.d
|
||||||
cp $PKG_DIR/modprobe.d/*.conf $INSTALL/etc/modprobe.d
|
cp $PKG_DIR/modprobe.d/*.conf $INSTALL/etc/modprobe.d
|
||||||
|
|
||||||
|
mkdir -p $INSTALL/usr/lib
|
||||||
|
cp -P $PKG_BUILD/tools/power/cpupower/libcpupower.so* $INSTALL/usr/lib
|
||||||
|
|
||||||
|
mkdir -p $INSTALL/usr/bin
|
||||||
|
cp -P $PKG_BUILD/tools/power/cpupower/cpupower $INSTALL/usr/bin
|
||||||
|
@ -25,8 +25,8 @@ PKG_ARCH="any"
|
|||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="http://www.kernel.org"
|
PKG_SITE="http://www.kernel.org"
|
||||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.0/testing/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.0/testing/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||||
PKG_DEPENDS="busybox linux-drivers linux-firmware"
|
PKG_DEPENDS="busybox linux-drivers linux-firmware pciutils"
|
||||||
PKG_BUILD_DEPENDS="toolchain busybox-hosttools xz cpio"
|
PKG_BUILD_DEPENDS="toolchain busybox-hosttools xz cpio pciutils"
|
||||||
PKG_PRIORITY="optional"
|
PKG_PRIORITY="optional"
|
||||||
PKG_SECTION="linux"
|
PKG_SECTION="linux"
|
||||||
PKG_SHORTDESC="linux26: The Linux kernel 2.6 precompiled kernel binary image and modules"
|
PKG_SHORTDESC="linux26: The Linux kernel 2.6 precompiled kernel binary image and modules"
|
||||||
|
@ -52,6 +52,12 @@ fi
|
|||||||
# waiting for Xorg to start
|
# waiting for Xorg to start
|
||||||
wait_for_xorg
|
wait_for_xorg
|
||||||
|
|
||||||
|
# set cpu's to 'on demand'
|
||||||
|
( usleep 15000000
|
||||||
|
progress "set cpu's to 'on demand'"
|
||||||
|
cpupower frequency-set -g ondemand
|
||||||
|
)&
|
||||||
|
|
||||||
# starting XBMC
|
# starting XBMC
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user