LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-21-2003, 05:54 PM   #1
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Rep: Reputation: 15
Talking How to remove module from kernel without recompile?


Hi,

I'd like to know whether it is possible to remove a module from the kernel without having to recompile the kernel? I know this seems kind of contradictionary, but may be there is a way?

Just to be clear, I do not mean to remove a module with modprobe -r.

Here is my actual problem (you may skip this, as it is quite long and boring ). I had installed Mandrake 9.1 with the Lirc application as a module. Somehow I did not get it working (automatically) with my remote control (from Pinnacle Systems). That is, it assigned directory /dev/lirc -> serial. But I'd wanted it to be lirc->ttyS0.

I might have achieved this by manually fiddling with it, but I wanted to solve it differently.

I'd thought I just download Lirc from the lirc website and reconfigure it myself (actually I did succeed in this somehow the last time before I screwed up my previous (Mandrake) Linux installation ).

When I configure Lirc it says that "Your hardware does not require a kernel module.". After this I make and make install and all the other stuff that is mentioned in many Lirc How-To's.

But when I run modprobe lirc_serial it probably tries to load the mandrake pre-installed one which then results in errors (cannot remember what the errors were exactly now).

I decided to remove the lirc-mdk through "Remove Software" after having uninstalled the original Lirc (through make uninstall). The Mandrake "Remove Software" did remove some lirc stuff but not the modules that reside in /lib/modules/2.4.21-0.13mdk/kernel/3rdparty/!?

So I removed the lirc folder therein manually, did a depmode -a (thought this would have actually tricked other applications in thinking that the module did not exist anymore ) and recompiled Lirc. However, Lirc did not install any modules at the place I had just removed. It probably still thinks that I have those modules (doh?) ?!.

So to make the long story short, I think I need to reconfigure the module dependencies such that the kernel is actually not using the Lirc module, and such that Lirc will think it needs to compile and install the driver (module) itself.

As mentioned in the beginning, is this possible without having to go through the "hassle" of recompiling the kernel? May be just by performing make modules after a make config?

Thanks for any replies,
Stoic
 
Old 09-21-2003, 06:02 PM   #2
nhs
Member
 
Registered: Aug 2003
Location: Edinburgh, Scotland
Distribution: Gentoo
Posts: 246

Rep: Reputation: 30
You shouldn't need to recompile your kernel. Try completely deleting the Lirc source code directory and untarring again as it may be cacheing the results of your initial config. This should reset everything and allow you to compile without problem (hopefully).
 
Old 09-22-2003, 02:40 AM   #3
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by nhs
You shouldn't need to recompile your kernel. Try completely deleting the Lirc source code directory and untarring again as it may be cacheing the results of your initial config. This should reset everything and allow you to compile without problem (hopefully).
Thanks. I'll try that tonight when I get home.
 
Old 09-22-2003, 06:03 PM   #4
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Unfortunately after make uninstall, make distclean, and then removing the whole lirc-0.6.6 folder and untarring the lirc-0.6.6 package did not solve my issue.

Thus, after I ./setup.sh, configure for my remote control, configure, it still says "Your hardware does not require a kernel module.". Why it says this I do not understand. So I went on anyway with make and (as su) make install, chmod 666 /dev/lircd. Then when I modprobe lirc_serial it says modprobe: Can't locate module lirc_serial, which is logical as the driver is not in /lib/modules.

So there is something telling Lirc not to make this driver as it is unnecessary according to that something (most likely some kernel config file).

To ask my question again. Is it possible to remove a module from the kernel without recompiling the kernel?

Stoic
 
Old 09-22-2003, 06:55 PM   #5
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Btw there is still something hanging around in relation to lirc (even after make uninstall and previous Mandrake 'Remove Software'). It is in /lib/dev-state/lirc.

ls -l gets me this:
Code:
crw-rw-rw-    1 root     root      61,   0 Sep 21 22:54 serial
lrwxrwxrwx    1 root     root            5 Sep 21 23:00 ttyS0 -> ttyS0
I remember from the Mandrake Lirc install that lirc was assigned to serial. The original lirc package assigned lirc to ttyS0.

Will it do any harm if I remove /lib/dev-state/lirc?
 
Old 09-23-2003, 09:55 AM   #6
mikeon
LQ Newbie
 
Registered: Dec 2002
Location: France
Distribution: Mandrake 9.1
Posts: 5

Rep: Reputation: 0
Hi Stoic,
I've just been going through the same thing as you. I'm trying to get lirc to transmit signals through a 'homebrew' TX on the serial port.
Briefly, I had three days of problems, finally I uninstalled lirc, removed the mandrake lirc_serial.o.gz file and rpms and tried again to compile the source.
I found that everytime I rebooted, somthing was creating /dev/lirc & /dev/lircd even if I deleted these before booting. I eventually deleted the file you identified /lib/dev-state/lirc*
also, an entry in /etc/makedev (i think that's it, I'm not at the linux pc now).
I also had to manually remove Mserial module (part of win4lin) before doing modprobe lirc_serial.
Finally, I manually (for now) start /usr/local/sbin/lircd
It all seems to work now for me!
HTH
M.
 
Old 09-23-2003, 10:16 AM   #7
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mikeon
Hi Stoic,
I've just been going through the same thing as you. I'm trying to get lirc to transmit signals through a 'homebrew' TX on the serial port.
Briefly, I had three days of problems, finally I uninstalled lirc, removed the mandrake lirc_serial.o.gz file and rpms and tried again to compile the source.
I found that everytime I rebooted, somthing was creating /dev/lirc & /dev/lircd even if I deleted these before booting. I eventually deleted the file you identified /lib/dev-state/lirc*
also, an entry in /etc/makedev (i think that's it, I'm not at the linux pc now).
I also had to manually remove Mserial module (part of win4lin) before doing modprobe lirc_serial.
Finally, I manually (for now) start /usr/local/sbin/lircd
It all seems to work now for me!
HTH
M.
Great! So let us get this straight:
  • You uninstalled the lirc-mdk package (through, e.g., "Remove Software")
  • You uninstalled lirc (make uninstall, may be even delete the lirc-0.6.6 folder and 're-untarring' it)
  • You removed the lirc module(s) found in /lib/modules ... /lirc
  • You removed folder /lib/dev-state/lirc and some other system folder that contained stuff related to lirc
  • You installed lirc-0.6.6 through ./setup.sh, etc.
  • You could get modprobe lirc_serial working now (?)
  • You could start /dev/lircd
  • You could start irw, which actually outputted things on the terminal when you pressed buttons on your device (?)
I'll try this at home

Thanks,
Stoic
 
Old 09-23-2003, 10:22 AM   #8
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mikeon
Hi Stoic,
<snip />
I also had to manually remove Mserial module (part of win4lin) before doing modprobe lirc_serial.
<snip />
How do I know if I have this module installed and how do I remove it if I have it? Will it, e.g., show up in lsmod?
 
Old 09-23-2003, 11:48 AM   #9
mikeon
LQ Newbie
 
Registered: Dec 2002
Location: France
Distribution: Mandrake 9.1
Posts: 5

Rep: Reputation: 0
Quote:
Great! So let us get this straight:


1 * You uninstalled the lirc-mdk package (through, e.g., "Remove Software")
2 * You uninstalled lirc (make uninstall, may be even delete the lirc-0.6.6 folder and 're-untarring' it)
3 * You removed the lirc module(s) found in /lib/modules ... /lirc
4 * You removed folder /lib/dev-state/lirc and some other system folder that contained stuff related to lirc
5 * You installed lirc-0.6.6 through ./setup.sh, etc.
6 * You could get modprobe lirc_serial working now (?)
7 * You could start /dev/lircd
8 * You could start irw, which actually outputted things on the terminal when you pressed buttons on your device (?)
1. yes!
2. yes, make uninstall, but kept the untared stuff.
3. I deleted lirc_serial.so.gz but I forget where it was. I'd delete anything that mentions lirc that is not part of the tar package.
4. Yes, this was the main problem. I think this signals during bootup to recreate these devices if they don't exist. In my case this was a 'serial' device when I really needed to create with mknod /dev/lirc c 61 0
4a. I also removed a line in the file /etc/makedev.d/mandrake that mentioned lirc. No bad side effects yet..
5. exactly.
6. yes, after deleteing as per step 3.
7. I type /usr/local/sbin/lircd to start, this way I'm sure it's the freshly compiled version.
8. I've only tried rc and irrecord. Both work now. Just tried irw and that also works!

Don't worry about Mserial if you didn't install Win4Lin (commercial package not installed by default).
These steps worked for me but I think no two people have exactly the same setup, but this should help you get further.
Good luck!
M.
 
Old 09-23-2003, 05:56 PM   #10
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
I seem to be out of luck here . After having done all of the above I still don't get Lirc to build a lirc_serial driver . So my last option is to recompile the kernel .
 
Old 09-23-2003, 06:17 PM   #11
Stoic
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands
Distribution: Mandrake
Posts: 24

Original Poster
Rep: Reputation: 15
Ah finally! I did not have to modprobe lirc_serial for some reason (maybe cause I have it in my kernel instead of as a module? can't remember). Anyway, I got it working!

Stoic
 
  


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
not recompile kernel, but 1 module -possible? deNiro Debian 4 01-31-2005 03:48 PM
recompile kernel to include module samfrog88 Linux - Software 1 01-06-2005 06:28 PM
Should I recompile kernel 2.4.7 to remove rivafb in order to solve Nvidia issues? jtp51 Slackware - Installation 2 10-06-2004 11:10 AM
Kernel / module recompile for 5.1 ? how ? Wynand1 Linux - Newbie 6 03-09-2004 01:33 AM
Module Install without Kernel Recompile? bongski55 Linux - General 4 09-29-2003 12:30 AM


All times are GMT -5. The time now is 08:47 PM.

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