LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-05-2004, 01:20 AM   #1
salahuddin_66
Member
 
Registered: Jan 2004
Location: Dhaka, Bangladesh
Distribution: Debian, Gentoo
Posts: 283

Rep: Reputation: 30
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 ""
echo "Installation of SM56 Internal Modem completed."
echo "Please use the command \"insmod sm56\" Before dialing"
echo "The Command \" depmod -a \"  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 " discus@linmodems.org"
echo " Cyber Lizard(Jane Iban):- cyberlizard0@yahoo.com"
echo " Marvin Stodolsky:- stodolsk@rcn.com"
echo " Rajesh Kizhuveetil:- rajeshk_tul@hotmail.com"

echo " Thanks !!!! "
echo ""





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
 
Old 08-05-2004, 01:46 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Code:
# remove all files installed
rm -r /lib/modules/`uname -r`/misc/sm56
rm -r /lib/modules/`uname -r`/kernel/drivers/char/sm56
rm -f /dev/sm56
rm -f /dev/motomem
rm -f /dev/input/modem
rm -f /dev/modem
rm -f /dev/ttyS14
rm  /usr/share/man/man4/sm56.4

#remove lines added in modules.conf by hand, it will be quicker than with a script
 
Old 08-05-2004, 09:44 AM   #3
salahuddin_66
Member
 
Registered: Jan 2004
Location: Dhaka, Bangladesh
Distribution: Debian, Gentoo
Posts: 283

Original Poster
Rep: Reputation: 30
thanx


but tell me which lise i have to remove from conf file

Quote:
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF verion 0.9.0 ---
alias char-major-116 snd
alias snd-card-0 snd-intel8x0
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options snd major=116 cards_limit=1
options snd-intel8x0 index=0
# --- END: Generated by ALSACONF, do not edit. ---

alias char-major-195 nvidia
alias char-major-24 sm56
options sm56 country=1
alias /dev/ppp ppp_generic
alias tty-ldisc-3 ppp_async
alias tty-ldisc-14 ppp_synctty
alias ppp-compress-21 bsd_comp
alias ppp-compress-26 ppp_deflate


only the sm56's or the whole under the sm56


alias ppp-compress-24 ppp_deflate
 
Old 08-05-2004, 10:55 AM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Yes, only the sm56, others seem be generic, it would not hurt that let them as this

alias char-major-24 sm56
options sm56 country=1
 
Old 08-05-2004, 10:57 AM   #5
salahuddin_66
Member
 
Registered: Jan 2004
Location: Dhaka, Bangladesh
Distribution: Debian, Gentoo
Posts: 283

Original Poster
Rep: Reputation: 30
solved
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove package maurovezz Mandriva 3 07-04-2005 07:57 PM
how to remove a package abd_bela Debian 6 05-14-2005 12:01 PM
remove package spidna Debian 3 02-26-2005 06:26 PM
remove package jbzy3000 Fedora 1 02-14-2005 05:48 PM
Add/Remove Package problem RH9.0 chrisjbzero Red Hat 5 03-31-2004 09:32 AM


All times are GMT -5. The time now is 04:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration