salahuddin_66 |
08-05-2004 01:20 AM |
package remove problem
hello
i have installed my motorola sm56 driver following instruction everything ok
but when i try to connect using kppp
then is shows stegment fault
so now i wanna remove the files i have installed from my slackware 9.1
--------------------------------------------------------------------------------------------------
folder: sm56-gcc3
=============country.dat.gz
=============fixscript
=============kludge.c
=============Makefile
=============sm56.4
=============sm56.lib
=============sminst.sh
i have installed it by make install but the make uninstall command is not working
make file
Quote:
# /*date of delta: 12/17/02
#=========================================================
# Makefile for the sm56 modem driver for Linux
#=========================================================
all:
echo "Writing Version.c"
echo "#define UTS_RELEASE \""`uname -r`"\"" >version.c
echo "const char __module_kernel_version[] __attribute__((section(\".modinfo\" ))) = \"kernel_version=\"UTS_RELEASE;">>version.c
echo "#ifdef MODVERSIONS" >>version.c
echo "const char __module_using_checksums[] __attribute__((section(\".modinfo\"))) = \"using_checksums=1\";" >>version.c
echo "#endif">>version.c
echo Compiling version.c
gcc -DLINUX -D__KERNEL__ -DMODULE -Wall -O -fomit-frame-pointer -o version.a -c version.c
echo Linking output version.a with Motorola proprietary sm56.lib
ld -r -o sm56.a version.a sm56.lib
echo Updating kernel symbols in output sm56.a
objcopy --redefine-sym kmalloc=kmalloc_hack --redefine-sym __vmalloc=vmalloc_hack sm56.a sm56_h.a
echo Compiling kmhack.o from input kludge.c
gcc -DLINUX -D__KERNEL__ -DMODULE -Wall -O -I/usr/src/linux-2.4.22/include -fomit-frame-pointer -o kmhack.o -c kludge.c
echo Linking kmhack.o with sm56_h.a to generate sm56.o
ld -r -o sm56.o sm56_h.a kmhack.o
echo "Please Run \"make install\" "
clean:
rm -f *.a
rm -f *~
rm -f *.o
rm -f version.c
rm -f *.oo
install:
make all
#Took From Original Sm56setup
chmod u+x ./sminst.sh
./sminst.sh
|
sminst.sh file
Quote:
echo "Select A Country Code From The List"
zcat ./country.dat
echo -n "Enter Country Code (If Country Code does not Exists Just Enter): "
read COUNTRYCODE
grep "$COUNTRYCODE" sm56.4 >/dev/null
if [ $? != 0 ]
then
echo "Country Code Does not exists!!!"
COUNTRYCODE=1
exit
fi
if [ -z $COUNTRYCODE ]
then
COUNTRYCODE=1
fi
if [ -d /lib/modules/`uname -r`/misc ]; then
mkdir -p /lib/modules/`uname -r`/misc;
#Adding The SifScript Stuff for Solving the depmod problem
./fixscript sm56.o sm56.oo >/dev/null 2>/dev/null
cp -fv ./sm56.o /lib/modules/`uname -r`/misc/sm56;
# Un Comment This Stuff If the Fixscript fails and comment the above stuff
#cp -fv ./sm56.o /lib/modules/`uname -r`/misc/sm56;
else
mkdir -p /lib/modules/`uname -r`/kernel/drivers/char;
#Adding The SifScript Stuff for Solving the depmod problem
./fixscript sm56.o sm56.oo >/dev/null 2>/dev/null
cp -fv ./sm56.oo /lib/modules/`uname -r`/kernel/drivers/char/sm56;
# Un Comment This Stuff If the Fixscript fails and comment the above stuff
#cp -fv ./sm56.o /lib/modules/`uname -r`/kernel/drivers/char/sm56;
fi
# make devices
echo 'Creating device /dev/sm56...'
if [ -e /dev/sm56 ]; then
rm -f /dev/sm56
fi
mknod /dev/sm56 c 24 0
if [ -e /dev/motomem ]; then
rm -f /dev/motomem
fi
mknod /dev/motomem c 28 0
chmod a+w /dev/motomem
echo 'Pointing /dev/modem to /dev/sm56...'
rm -f /dev/modem 2>/dev/null
rm -f /dev/input/modem 2>/dev/null
rm -f /dev/ttyS14 2>/dev/null
ln -s /dev/sm56 /dev/modem
ln -s /dev/sm56 /dev/input/modem
ln -s /dev/sm56 /dev/ttyS14
#
# update modules.conf
#
if [ -e /etc/modules.conf ]; then
MODFILE="/etc/modules.conf"
else
MODFILE="/etc/conf.modules"
fi
echo "Adding SM56 to $MODFILE..."
grep -v sm56 $MODFILE > /etc/modules.tmp
grep -v ppp /etc/modules.tmp >/etc/modules.temp
mv -f /etc/modules.temp /etc/modules.tmp 2>/dev/null
echo 'alias char-major-24 sm56' >> /etc/modules.tmp
echo "options sm56 country=$COUNTRYCODE" >> /etc/modules.tmp
echo "alias char-major-108 ppp_generic " >>/etc/modules.temp
echo "alias /dev/ppp ppp_generic " >>/etc/modules.tmp
echo "alias tty-ldisc-3 ppp_async " >>/etc/modules.tmp
echo "alias tty-ldisc-14 ppp_synctty " >>/etc/modules.tmp
echo "alias ppp-compress-21 bsd_comp " >>/etc/modules.tmp
echo "alias ppp-compress-26 ppp_deflate " >>/etc/modules.tmp
echo "alias ppp-compress-24 ppp_deflate " >>/etc/modules.tmp
mv -f $MODFILE $MODFILE~
mv -f /etc/modules.tmp $MODFILE
/sbin/insmod sm56
echo ' '
echo "Installing sm56 man file ....."
cp ./sm56.4 /usr/share/man/man4
echo "Self Cleaning ..... "
make clean
echo "[1;31m"
echo "Installation of SM56 Internal Modem completed."
echo "Please use the command [1;33m\"insmod sm56\"[1;31m Before dialing"
echo "The Command [1;33m\" depmod -a \" [1;31m may can give some unresolved simbols in sm56"
echo " But the insmod will work properly"
echo "If you experience any further problem Please Contact us at any of these E-Mail id"
echo " [1;34mdiscus@linmodems.org[1;31m"
echo " [1;34mCyber Lizard(Jane Iban):- cyberlizard0@yahoo.com[1;31m"
echo " [1;34mMarvin Stodolsky:- stodolsk@rcn.com[1;31m"
echo " [1;34mRajesh Kizhuveetil:- rajeshk_tul@hotmail.com[1;31m"
echo " Thanks !!!! "
echo "[0;39m"
|
the fix script
Quote:
#! /bin/bash
# To make this file executable: chmod +x fixscript
# This is a very slight edit of the ltfixscript contributed to
# the Linmodems Newslist
# From - Sun Jul 23 04:27:38 2000
# From: "Mark Spieth" <mark at digivation.com.au>
# To: <discuss@linmodems.org>
# Subject: ltmodem symbols and version fixed
# Date: Sun, 23 Jul 2000 12:39:44 +1000
# Organization: Digivation Pty Ltd
echo "Fixscript V1.7"
if [ -z "$1" -o -z "$2" ]; then
cat <<END
This script changes version number tags of binary
kernel modules to match the version of the currently
running kernel. It also renames any symbol that the
current kernel can't resolve into their equivalent
resolvable symbols.
For inserting binary modules into kernels, the 'fixed'
module can be inserted with:
insmod module
which is used in automated kernel module management,
rather than forcing module loading with:
insmod -f module
which is necessary when kernel and module versions
are not matched.
WARNING! This change is purely cosmetic, and the use
of version matched binaries whenever possible is
strongly advised. It may crash your kernel due to
inconsistencies in data structures between the kernel
as it stands and the headers used to originally compile
the module being fixed. No guarantees are given or implied
under any circumstances.
GNU objcopy version 2.9.5 or later is required;
this is provided as part of the 'binary utilities'
packages such as the Debian binutils.deb
USAGE: fixscript input-file output-file
END
exit 1
fi
MI=/tmp/modinfo
[ -z "$DEPMOD" ] && DEPMOD=depmod
#new kernel version modinfo section
echo -ne "kernel_version="`uname -r`"\0" > $MI
#build the objcopy command
CMD="objcopy"
for i in `$DEPMOD -e $1 2>&1 | sed 's/depmod://g' | grep -vE "^$1:|Unresolved symbols|^#"` ; do
echo -n doing $i
i1=`echo $i | awk '{
gsub(/_R[0-9a-fA-F]+/,"");
printf("%s", $1);
}'`
echo -n " trunc=$i1"
new=`awk '/ '$i1'_R/ {
printf("%s", $2);
}' < /proc/ksyms`
echo " new=$new"
CMD="$CMD --redefine-sym=$i=$new"
done
#fix symbols which conflict with the serial driver
CMD="$CMD --redefine-sym=register_serial=register_lucent"
CMD="$CMD --redefine-sym=unregister_serial=unregister_lucent"
CMD="$CMD --redefine-sym=serial_console_init=ltmodem_console_init"
#replace the modinfo section with the new one
CMD="$CMD --remove-section=.modinfo --add-section=.modinfo=$MI"
CMD="$CMD $*"
#run the command
$CMD
#remove the section file
rm -f $MI
|
how can i remove this from my slackware
i may be change my modem soon
bye
|