From b1a51046dea92c1bbc161580f5ec0f6e437abe35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Hern=C3=A1ndez=20Blas?= Date: Thu, 13 May 2010 00:42:02 +0200 Subject: system/tp_smapi: Updated for version 0.40 --- system/tp_smapi/README | 20 +++++++++++++++++ system/tp_smapi/README.SLACKWARE | 21 ------------------ system/tp_smapi/doinst.sh | 6 ++++-- system/tp_smapi/modprobe.thinkpad_ec | 3 --- system/tp_smapi/modprobe.thinkpad_ec.conf | 3 +++ system/tp_smapi/modprobe.tp_smapi | 2 -- system/tp_smapi/modprobe.tp_smapi.conf | 2 ++ system/tp_smapi/tp_smapi.SlackBuild | 36 ++++++++++++++++++++----------- system/tp_smapi/tp_smapi.info | 4 +++- 9 files changed, 56 insertions(+), 41 deletions(-) delete mode 100644 system/tp_smapi/README.SLACKWARE delete mode 100644 system/tp_smapi/modprobe.thinkpad_ec create mode 100644 system/tp_smapi/modprobe.thinkpad_ec.conf delete mode 100644 system/tp_smapi/modprobe.tp_smapi create mode 100644 system/tp_smapi/modprobe.tp_smapi.conf (limited to 'system/tp_smapi') diff --git a/system/tp_smapi/README b/system/tp_smapi/README index f9b6b722bcbf..df6db4a52e53 100644 --- a/system/tp_smapi/README +++ b/system/tp_smapi/README @@ -3,3 +3,23 @@ tp_smapi (SMAPI BIOS access for ThinkPad Laptops) ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some hardware control functionality that is not accessible by other means. + +############################################################################## +############################################################################## + +WARNING: +This driver uses undocumented features and direct hardware access. +It thus cannot be guaranteed to work, and may cause arbitrary damage +(especially on models it wasn't tested on). + +############################################################################## +############################################################################## + +To get a package for other kernel release, execute this SlackBuild as: + # KERNEL_VERS='2.6.31' ./tp_smapi.SlackBuild + +By default its going to be built for the output from $(uname -r) + +Finally, its highly recommended to read these sections in www.thinkwiki.org +http://www.thinkwiki.org/wiki/Tp_smapi +http://www.thinkwiki.org/wiki/Talk:Tp_smapi diff --git a/system/tp_smapi/README.SLACKWARE b/system/tp_smapi/README.SLACKWARE deleted file mode 100644 index 5763f2ea835d..000000000000 --- a/system/tp_smapi/README.SLACKWARE +++ /dev/null @@ -1,21 +0,0 @@ -tp_smapi README.SLACKWARE - -=============================================================================== - -WARNING: -This driver uses undocumented features and direct hardware access. -It thus cannot be guaranteed to work, and may cause arbitrary damage -(especially on models it wasn't tested on). - -=============================================================================== - -This package will overwrite the stock hdaps module in Slackware's default -kernel-modules package, so if you remove this package and still need to use -the hdaps module, you'll need to reinstall the kernel-modules package. - -Its highly recommended to read this sections in www.thinkwiki.org -http://www.thinkwiki.org/wiki/Tp_smapi -http://www.thinkwiki.org/wiki/Talk:Tp_smapi - -=============================================================================== - diff --git a/system/tp_smapi/doinst.sh b/system/tp_smapi/doinst.sh index f61efdf68523..6510094161e0 100644 --- a/system/tp_smapi/doinst.sh +++ b/system/tp_smapi/doinst.sh @@ -1,2 +1,4 @@ -chroot . /sbin/depmod -a - +# Re-generate modules.dep and map files. +if [ -x sbin/depmod ]; then + chroot . /sbin/depmod -a @KERNEL@ 1> /dev/null 2> /dev/null +fi diff --git a/system/tp_smapi/modprobe.thinkpad_ec b/system/tp_smapi/modprobe.thinkpad_ec deleted file mode 100644 index 6e9b47637e97..000000000000 --- a/system/tp_smapi/modprobe.thinkpad_ec +++ /dev/null @@ -1,3 +0,0 @@ -# Force loading of the thinkpad_ec module in case it refuses to do so because -# of reserved ports - this might happen on some newer Thinkpad laptops -options thinkpad_ec force_io=1 diff --git a/system/tp_smapi/modprobe.thinkpad_ec.conf b/system/tp_smapi/modprobe.thinkpad_ec.conf new file mode 100644 index 000000000000..6e9b47637e97 --- /dev/null +++ b/system/tp_smapi/modprobe.thinkpad_ec.conf @@ -0,0 +1,3 @@ +# Force loading of the thinkpad_ec module in case it refuses to do so because +# of reserved ports - this might happen on some newer Thinkpad laptops +options thinkpad_ec force_io=1 diff --git a/system/tp_smapi/modprobe.tp_smapi b/system/tp_smapi/modprobe.tp_smapi deleted file mode 100644 index 98080e9df600..000000000000 --- a/system/tp_smapi/modprobe.tp_smapi +++ /dev/null @@ -1,2 +0,0 @@ -# Make sure that tp_smapi is always loaded before the hdaps module -install hdaps /sbin/modprobe -i tp_smapi ; /sbin/modprobe -i hdaps diff --git a/system/tp_smapi/modprobe.tp_smapi.conf b/system/tp_smapi/modprobe.tp_smapi.conf new file mode 100644 index 000000000000..98080e9df600 --- /dev/null +++ b/system/tp_smapi/modprobe.tp_smapi.conf @@ -0,0 +1,2 @@ +# Make sure that tp_smapi is always loaded before the hdaps module +install hdaps /sbin/modprobe -i tp_smapi ; /sbin/modprobe -i hdaps diff --git a/system/tp_smapi/tp_smapi.SlackBuild b/system/tp_smapi/tp_smapi.SlackBuild index 5d12f20ae2b4..483bcb847c1c 100644 --- a/system/tp_smapi/tp_smapi.SlackBuild +++ b/system/tp_smapi/tp_smapi.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for tp_smapi -# Copyright (c) 2008, Antonio Hernández Blas +# Copyright (c) 2008-2009, Antonio Hernández Blas # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ PRGNAM=tp_smapi VERSION=0.40 ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} KERNEL_VERS=${KERNEL_VERS:-"$(uname -r)"} @@ -34,11 +34,15 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} - if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e @@ -59,8 +63,11 @@ find . \ make HDAPS=1 KVER=$KERNEL_VERS -mkdir -p $PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/{hwmon,firmware} -install -m 0664 hdaps.ko $PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/hwmon/ +mkdir -p $PKG/lib/modules/${KERNEL_VERS}/extra +install -m 0664 hdaps.ko \ + $PKG/lib/modules/${KERNEL_VERS}/extra/ + +mkdir -p $PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/firmware install -m 0664 thinkpad_ec.ko tp_smapi.ko \ $PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/firmware @@ -69,22 +76,27 @@ install -m 0664 thinkpad_ec.ko tp_smapi.ko \ # We're not going to install these with a .new extension, because we don't # want them to be present if the package is removed. mkdir -p $PKG/etc/modprobe.d -cat $CWD/modprobe.tp_smapi > $PKG/etc/modprobe.d/tp_smapi -cat $CWD/modprobe.thinkpad_ec > $PKG/etc/modprobe.d/thinkpad_ec +cat $CWD/modprobe.tp_smapi.conf > $PKG/etc/modprobe.d/tp_smapi.conf +cat $CWD/modprobe.thinkpad_ec.conf > $PKG/etc/modprobe.d/thinkpad_ec.conf + +# Make hdaps kernel module from this package be prefered over hdaps in kernel-module package. +mkdir -p $PKG/etc/depmod.d +echo "override hdaps ${KERNEL_VERS} extra" > $PKG/etc/depmod.d/hdaps.conf ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a CHANGES README TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh +sed "s%@KERNEL@%$KERNEL_VERS%" $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION\_$(echo ${KERNEL_VERS} | tr '-' '_')-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/tp_smapi/tp_smapi.info b/system/tp_smapi/tp_smapi.info index eda99ea60e96..e5165c994d63 100644 --- a/system/tp_smapi/tp_smapi.info +++ b/system/tp_smapi/tp_smapi.info @@ -3,6 +3,8 @@ VERSION="0.40" HOMEPAGE="http://tpctl.sourceforge.net" DOWNLOAD="http://downloads.sourceforge.net/tpctl/tp_smapi-0.40.tgz" MD5SUM="f4eb8bb4d4413a5ae65aa7d77f4112c0" -MAINTAINER="Antonio Hernández Blas" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Antonio Hernández Blas" EMAIL="hba.nihilismus@gmail.com" APPROVED="rworkman" -- cgit v1.2.3