diff options
author | edwin <edwin@FreeBSD.org> | 2004-08-27 08:13:12 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-08-27 08:13:12 +0800 |
commit | d461ebe438e526f50d238ae33437aa7ed22c365e (patch) | |
tree | dcb6e36776a02031932def731acf512e96a6aa97 /sysutils | |
parent | 2029ee39c7af013192629b78b46cc37895e169e9 (diff) | |
download | freebsd-ports-gnome-d461ebe438e526f50d238ae33437aa7ed22c365e.tar.gz freebsd-ports-gnome-d461ebe438e526f50d238ae33437aa7ed22c365e.tar.zst freebsd-ports-gnome-d461ebe438e526f50d238ae33437aa7ed22c365e.zip |
[NEW PORT] sysutils/es
This port builds a kernel module providing two sysctls
(hw.est_freqs, hw.est_curfreq) for controlling Enhanced
SpeedStep on Intel Pentium M processors.
PR: 71007
Submitted by: Colin Percival <cperciva@daemonology.net>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/est/Makefile | 39 | ||||
-rw-r--r-- | sysutils/est/distinfo | 2 | ||||
-rw-r--r-- | sysutils/est/files/est.c.diff.fbsd4 | 27 | ||||
-rw-r--r-- | sysutils/est/files/est.sh | 20 | ||||
-rw-r--r-- | sysutils/est/pkg-descr | 7 |
6 files changed, 96 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 9e9f11314caf..c251a42fa577 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -110,6 +110,7 @@ SUBDIR += eject SUBDIR += enteruser SUBDIR += eroaster + SUBDIR += est SUBDIR += etcmerge SUBDIR += eventwatcher SUBDIR += extipl diff --git a/sysutils/est/Makefile b/sysutils/est/Makefile new file mode 100644 index 000000000000..bd9aa4c60ef9 --- /dev/null +++ b/sysutils/est/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: Enhanced SpeedStep driver +# Date created: 21 August 2004 +# Whom: cperciva@daemonology.net +# +# $FreeBSD$ +# + +PORTNAME= est +PORTVERSION= 0.5 +CATEGORIES= sysutils +MASTER_SITES= http://www.daemonology.net/freebsd-est/ + +MAINTAINER= cperciva@daemonology.net +COMMENT= Enhanced SpeedStep driver for Pentium M processors + +ONLY_FOR_ARCHS= i386 +KMODDIR= ${PREFIX}/modules +MAKE_ARGS= KMODDIR="${KMODDIR}" + +PLIST_FILES= modules/est.ko \ + etc/rc.d/est.sh + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500023 +EXTRA_PATCHES= ${FILESDIR}/est.c.diff.fbsd4 +.endif + +post-extract: + @${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${FILESDIR}/est.sh \ + > ${WRKDIR}/est.sh + +pre-install: + ${MKDIR} ${KMODDIR} + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/est.sh ${PREFIX}/etc/rc.d/ + +.include <bsd.port.post.mk> diff --git a/sysutils/est/distinfo b/sysutils/est/distinfo new file mode 100644 index 000000000000..7dffc6375e1b --- /dev/null +++ b/sysutils/est/distinfo @@ -0,0 +1,2 @@ +MD5 (est-0.5.tar.gz) = 9ae866be0144aa0c904279fc8683f650 +SIZE (est-0.5.tar.gz) = 3847 diff --git a/sysutils/est/files/est.c.diff.fbsd4 b/sysutils/est/files/est.c.diff.fbsd4 new file mode 100644 index 000000000000..d9eb77eab9ff --- /dev/null +++ b/sysutils/est/files/est.c.diff.fbsd4 @@ -0,0 +1,27 @@ +--- est.c.orig Thu Aug 26 22:51:42 2004 ++++ est.c Thu Aug 26 22:53:59 2004 +@@ -33,7 +33,7 @@ + #include <sys/sysctl.h> + #include <sys/module.h> + #include <sys/kernel.h> +-#include <sys/pcpu.h> ++#include <sys/proc.h> + + typedef struct { + int mhz; +@@ -566,13 +566,13 @@ + + switch (what) { + case MOD_LOAD: +- err = kernel_sysctlbyname(curthread, "hw.model", hwmodel, ++ err = kernel_sysctlbyname(curproc, "hw.model", hwmodel, + &modellen, NULL, 0, NULL); + if (err) + return err; + + ncpulen = sizeof(ncpu); +- err = kernel_sysctlbyname(curthread, "hw.ncpu", &ncpu, ++ err = kernel_sysctlbyname(curproc, "hw.ncpu", &ncpu, + &ncpulen, NULL, 0, NULL); + if (err) + return err; diff --git a/sysutils/est/files/est.sh b/sysutils/est/files/est.sh new file mode 100644 index 000000000000..f6d2bb0a9d53 --- /dev/null +++ b/sysutils/est/files/est.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +kmoddir=@@PREFIX@@/modules +kmod=est.ko + +case "$1" in +start) + if [ -x $kmoddir/$kmod ]; then + echo -n ' est' + /sbin/kldload $kmoddir/$kmod + fi + ;; +stop) + /sbin/kldunload $kmod && echo -n ' est' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac diff --git a/sysutils/est/pkg-descr b/sysutils/est/pkg-descr new file mode 100644 index 000000000000..b8de588de07f --- /dev/null +++ b/sysutils/est/pkg-descr @@ -0,0 +1,7 @@ +This is a driver for the Enhanced SpeedStep feature in Intel Pentium M +processors. + +WWW: http://www.daemonology.net/freebsd-est/ + +- Colin Percival +cperciva@daemonology.net |