diff options
author | Andrzej Telszewski <atelszewski@gmail.com> | 2016-08-10 05:50:16 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-08-10 05:50:16 +0700 |
commit | a7d3442f2290285dd4537d125d8c4156a09b05b1 (patch) | |
tree | d2001390c1d3655b882b79f5a3b3e8f5951f624b /system | |
parent | 5f37ff47b64ad6dc8e18a61fd8f462b99d475d91 (diff) |
system/x86_energy_perf_policy: Added (Energy Savings Policy).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/x86_energy_perf_policy/README | 4 | ||||
-rw-r--r-- | system/x86_energy_perf_policy/slack-desc | 19 | ||||
-rw-r--r-- | system/x86_energy_perf_policy/x86_energy_perf_policy.SlackBuild | 95 | ||||
-rw-r--r-- | system/x86_energy_perf_policy/x86_energy_perf_policy.info | 10 |
4 files changed, 128 insertions, 0 deletions
diff --git a/system/x86_energy_perf_policy/README b/system/x86_energy_perf_policy/README new file mode 100644 index 0000000000000..6dd1134082dd1 --- /dev/null +++ b/system/x86_energy_perf_policy/README @@ -0,0 +1,4 @@ +x86_energy_perf_policy allows software to convey its policy for the relative +importance of performance versus energy savings to the processor. The processor +uses this information in model-specific ways when it must select trade-offs +between performance and energy efficiency. diff --git a/system/x86_energy_perf_policy/slack-desc b/system/x86_energy_perf_policy/slack-desc new file mode 100644 index 0000000000000..76e383f66962a --- /dev/null +++ b/system/x86_energy_perf_policy/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +x86_energy_perf_policy: x86_energy_perf_policy (set performance vs energy savings policy) +x86_energy_perf_policy: +x86_energy_perf_policy: x86_energy_perf_policy allows software to convey its policy for +x86_energy_perf_policy: the relative importance of performance versus energy savings to +x86_energy_perf_policy: the processor. The processor uses this information in model-specific +x86_energy_perf_policy: ways when it must select trade-offs between performance and energy +x86_energy_perf_policy: efficiency. +x86_energy_perf_policy: +x86_energy_perf_policy: Homepage: https://www.kernel.org/ +x86_energy_perf_policy: +x86_energy_perf_policy: diff --git a/system/x86_energy_perf_policy/x86_energy_perf_policy.SlackBuild b/system/x86_energy_perf_policy/x86_energy_perf_policy.SlackBuild new file mode 100644 index 0000000000000..54a4d7d4db392 --- /dev/null +++ b/system/x86_energy_perf_policy/x86_energy_perf_policy.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/sh + +# Slackware build script for x86_energy_perf_policy + +# Copyright 2016 Andrzej Telszewski, Banie +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=x86_energy_perf_policy +SRCNAM=linux +VERSION=${VERSION:-4.4.14} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.xz \ + $SRCNAM-$VERSION/tools/power/x86/x86_energy_perf_policy +cd $SRCNAM-$VERSION/tools/power/x86/x86_energy_perf_policy +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Build: +CC=${CC:-gcc} +echo "$CC $SLKCFLAGS -Wall $PRGNAM.c -o $PRGNAM" +$CC $SLKCFLAGS -Wall $PRGNAM.c -o $PRGNAM +strip --strip-unneeded $PRGNAM + +# Install: +mkdir -p $PKG/usr/sbin +cp -a $PRGNAM $PKG/usr/sbin + +gzip -k -9 $PRGNAM.8 +mkdir -p $PKG/usr/man/man8 +cp -a $PRGNAM.8.gz $PKG/usr/man/man8 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/x86_energy_perf_policy/x86_energy_perf_policy.info b/system/x86_energy_perf_policy/x86_energy_perf_policy.info new file mode 100644 index 0000000000000..953b3412474d2 --- /dev/null +++ b/system/x86_energy_perf_policy/x86_energy_perf_policy.info @@ -0,0 +1,10 @@ +PRGNAM="x86_energy_perf_policy" +VERSION="4.4.14" +HOMEPAGE="https://www.kernel.org/" +DOWNLOAD="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.14.tar.xz" +MD5SUM="59e99c3bf5d495f1f95d26257962ca3e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Andrzej Telszewski" +EMAIL="atelszewski@gmail.com" |