diff options
author | h8red | 2015-09-14 22:59:01 +0300 |
---|---|---|
committer | h8red | 2015-09-14 22:59:01 +0300 |
commit | d3301e550c1efa08ccefbbc8a385404828ffd176 (patch) | |
tree | e73953753f5002cc17b821daec01bab01e80575f | |
download | aur-d3301e550c1efa08ccefbbc8a385404828ffd176.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | k10ctl.conf | 27 | ||||
-rw-r--r-- | k10ctl.install | 10 | ||||
-rw-r--r-- | k10ctl.rc | 23 | ||||
-rw-r--r-- | k10ctl.service | 10 | ||||
-rw-r--r-- | k10ctl.sh | 19 |
7 files changed, 142 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ea04584c2b8e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = k10ctl + pkgdesc = Change voltage and frequency settings of AMD K10 CPUs + pkgver = 090709 + pkgrel = 1 + url = http://sourceforge.net/projects/k10ctl/ + install = k10ctl.install + arch = i686 + arch = x86_64 + license = GPL3 + depends = bash + source = http://dl.sourceforge.net/k10ctl/latest + source = k10ctl.sh + source = k10ctl.rc + source = k10ctl.conf + source = k10ctl.service + sha256sums = 5c0dfb61dbc04a3ffdf1363f2f3a676d935e9eb2ddc86d37ca167a1f82cadb29 + sha256sums = 0cf512a269ed806307c5f90ad96ed3e711d409be0e2099c3dcbcc82626f6be87 + sha256sums = 82e11e53bedf258b424250119950306caf443d25ca9aaca214f9d667422b9d5e + sha256sums = e59ca72c305a3d41d0ee05461489f3a072955d084203cb2f2945d5e19285038d + sha256sums = db88ca37c4535a6f6d4e187dca019c4886b708a099bd52c27e7b2dfafb5db537 + +pkgname = k10ctl + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..54ca41e4bb87 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: h8red h8red at yandex dot ru +# Contributor: Thomas Haider <t.haider@deprecate.de> +pkgname=k10ctl +pkgver=090709 +pkgrel=1 +pkgdesc="Change voltage and frequency settings of AMD K10 CPUs" +arch=(i686 x86_64) +depends=('bash') +url="http://sourceforge.net/projects/k10ctl/" +license=('GPL3') +install=${pkgname}.install +source=(http://dl.sourceforge.net/k10ctl/latest \ + ${pkgname}.sh \ + ${pkgname}.rc \ + ${pkgname}.conf \ + ${pkgname}.service ) + +package() { + cd "$srcdir/$pkgname" + install -Dm755 ${srcdir}/${pkgname}/${pkgname} ${pkgdir}/usr/bin/${pkgname} + install -Dm755 ${srcdir}/${pkgname}.sh ${pkgdir}/usr/bin/${pkgname}.sh + install -Dm755 ${srcdir}/${pkgname}.rc ${pkgdir}/etc/rc.d/${pkgname} + install -Dm644 ${srcdir}/${pkgname}.conf ${pkgdir}/etc/conf.d/${pkgname} + install -Dm644 ${srcdir}/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service +} +sha256sums=('5c0dfb61dbc04a3ffdf1363f2f3a676d935e9eb2ddc86d37ca167a1f82cadb29' + '0cf512a269ed806307c5f90ad96ed3e711d409be0e2099c3dcbcc82626f6be87' + '82e11e53bedf258b424250119950306caf443d25ca9aaca214f9d667422b9d5e' + 'e59ca72c305a3d41d0ee05461489f3a072955d084203cb2f2945d5e19285038d' + 'db88ca37c4535a6f6d4e187dca019c4886b708a099bd52c27e7b2dfafb5db537') diff --git a/k10ctl.conf b/k10ctl.conf new file mode 100644 index 000000000000..bb1e27dc87ce --- /dev/null +++ b/k10ctl.conf @@ -0,0 +1,27 @@ +# For information how to calculate the following values see: +# http://www.ztex.de/misc/k10ctl.e.html#c1 + +# Change to "true" after you configurated the settings for your CPU +# WARNING: Be SURE that the following values are correct and safe for +# your system before doing this! +CONFIGURATED=false + +# Number of cores for your CPU +CORES=2 + +# List of P-states you want to change. +# NOTE: all following arrays must have the same size! +PSTATES=( 0 1 2 3 ) + +# List of Northbridge VIDs +NBVID=( 45 45 45 45 ) + +# List of CPU VIDs +CPUVID=( 36 45 55 68 ) + +# List of CPU FIDs +FID=( 12 5 0 0 ) + +# List of CPU DIDs +DID=( 0 0 0 1 ) + diff --git a/k10ctl.install b/k10ctl.install new file mode 100644 index 000000000000..2d03b9481501 --- /dev/null +++ b/k10ctl.install @@ -0,0 +1,10 @@ +post_install() { + cat << _EOF + + USE THIS PROGRAM AT YOU OWN RISK. IT MAY DAMAGE YOUR HARDWARE. + + It is VERY important that you adapt the values in /etc/conf.d/k10ctl + to your system. For usage see: http://www.ztex.de/misc/k10ctl.e.html + +_EOF +} diff --git a/k10ctl.rc b/k10ctl.rc new file mode 100644 index 000000000000..f5b9f6772c0c --- /dev/null +++ b/k10ctl.rc @@ -0,0 +1,23 @@ +#!/bin/bash + +daemon_name=k10ctl +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Setting CPU Voltages" + /usr/bin/k10ctl.sh + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + stat_done + fi + ;; + + *) + echo "usage: $0 {start}" +esac + +exit 0 diff --git a/k10ctl.service b/k10ctl.service new file mode 100644 index 000000000000..585897570573 --- /dev/null +++ b/k10ctl.service @@ -0,0 +1,10 @@ +[Unit] +Description=Change voltage and frequency settings of AMD K10 CPUs + +[Service] +Type=oneshot +ExecStart=/usr/bin/k10ctl.sh +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/k10ctl.sh b/k10ctl.sh new file mode 100644 index 000000000000..f8c46275bf1b --- /dev/null +++ b/k10ctl.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +daemon_name=k10ctl +. /etc/conf.d/$daemon_name + +let CORES=CORES-1 + + if ${CONFIGURATED}; then + for i in ${PSTATES[@]}; do + $daemon_name 0-${CORES} $i -nv ${NBVID[$i]} -cv ${CPUVID[$i]} -cd ${DID[$i]} -cf ${FID[$i]} + done + if [ $? -gt 0 ]; then + exit 1 + fi + else + exit 1 + fi + +exit 0 |