system/tp_smapi: Updated for version 0.40
This commit is contained in:
parent
66b5b99cb9
commit
b1a51046de
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
===============================================================================
|
||||
|
|
@ -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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Slackware build script for tp_smapi
|
||||
|
||||
# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com>
|
||||
# Copyright (c) 2008-2009, Antonio Hernández Blas <hba.nihilismus@gmail.com>
|
||||
# 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}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue