LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2005, 10:32 PM   #1
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
how to add 'modules' without re-compiling the kernel


Hello all,
i would like to add a module.
i know the kernel compilation method and have compiled it couple of times.
working on 2.4.26.

so what should be the steps of only adding module instead of compile the whole kernel.
should i proceed in the same way as i used to while kernel compilation ?

i follow the following steps

1. cd /usr/'src/linux
2. make mrproper.
3. make xconfig ..............here i first load the ".config" file.
4. save and exit from xconfig.
5. make dep.
6. vi Makefile
7. make clean
8. make bzImage
9. make modules
10 . make modules_install
.......
then making new directory in /boot........and copying bzimage and system.map there...etc.etc

now what shud i do if intending to add a single module..???
will it reamain there if i reboot the system or will have to add it every time ?

regards
 
Old 09-23-2005, 11:20 PM   #2
brainiac
Member
 
Registered: Jan 2005
Location: middle of a cornfield, IL
Distribution: Kanotix HD Install, Debian Testing, XP Pro,Vista RC1
Posts: 145

Rep: Reputation: 15
I believe "insmod" is what you are after. And it should stay after a reboot.
 
Old 09-23-2005, 11:30 PM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
If you're compiling a single module, just do 'make modules; make modules_install' and your new module will be available.

Dave
 
Old 10-02-2005, 01:51 PM   #4
kennedy01
LQ Newbie
 
Registered: Nov 2003
Location: Georgia
Distribution: Slackware 10.1
Posts: 28

Rep: Reputation: 15
how to add 'modules' without re-compiling the kernel

I need help with step 6 (edit make file). Here's the scenario.

This is EXACTLY what I need to do to get netfilter's u32 module added to my slack 10.1 bare kernel (2.4.26). I need this module to use dsl-qos and priority route outbound voip traffic. Ive put the module in /usr/src/linux/net/ipv4/netfilter/ipt_u32.c using netfilter's patch-o-matic tool (./runme newnat defining iptables and linux kernel sources). I see the file was added after p-o-m completed.

Ive probably messed up the .config file as Ive saved a cpl of times after a "make menuconfig" and also issued a "make mrproper" command.

NOTE: I checked for a .config file before starting..wasnt there. I open and saved as .config_before_pom and .config_after_mrproper, then verified three files were present (.config and the two saved)...they were there. I then attempted to load both of the saved configs and they errored, closed menuconfig without saving changes, files were GONE!

I could put the default sources from the slack cd back into /usr/src/linux-2.4.26/ and the run patch-o-matic again if necessary. Let me know.

** anyone have an explanation what the command "make mrproper" does?? **

How do I add the u32 module to the default slack 10.1 bare.i kernel without compiling the whole kernel?

thanks for the help! --justin
 
Old 10-03-2005, 10:22 AM   #5
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Hello Kennedy,
here is a good thread to read
first

and what i know about "make mrproper" is::
**"this removes the current .config and other files"**

regards
 
  


Reply



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
compiling kernel modules axr0284 Programming 2 11-26-2005 03:08 PM
kernel : how to add sys call through modules only? pinkeshzaveri Programming 1 09-14-2005 03:17 AM
need some help in Compiling Kernel modules bharat83 SUSE / openSUSE 1 01-07-2005 07:21 AM
Compiling kernel modules? jrjarrett Linux - Software 0 09-09-2003 10:24 AM
need to recompile modules if i add something to kernel option? doublefailure Linux - General 1 03-05-2003 10:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration