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 11-23-2006, 05:38 PM   #1
brooky9999
Member
 
Registered: May 2006
Location: Marlow, UK
Distribution: Slackware 12.2
Posts: 232

Rep: Reputation: 30
Kernel modules


Hi,

I'm using Slack 10.2 with a custom kernel.

When you download/install/compile a custom kernel, where do the kernel modules come from?

Many thanks,


Mark.
 
Old 11-23-2006, 05:51 PM   #2
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Quote:
Originally Posted by brooky9999
Hi,

I'm using Slack 10.2 with a custom kernel.

When you download/install/compile a custom kernel, where do the kernel modules come from?

Many thanks,


Mark.
They are built when you do "make modules" and installed when you do "make modules_install". Pretty obvious really.

If you're asking where the code comes from, it's part of the kernel source.
 
Old 11-23-2006, 06:16 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
If using 2.6 kernels the correct commands is
make Bulid the kernel and modules
make modules_install

The make now does the kernel image and modules both with the single command.

In 2.4 kernels you would do a
make to build the kernel
make modules to build the modules
make modules_install to place them in /lib/modules

Brian
 
Old 11-23-2006, 07:19 PM   #4
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Quote:
Originally Posted by Brian1
If using 2.6 kernels the correct commands is
make Bulid the kernel and modules
make modules_install

The make now does the kernel image and modules both with the single command.

In 2.4 kernels you would do a
make to build the kernel
make modules to build the modules
make modules_install to place them in /lib/modules

Brian
Yeah, you're right. I keep forgetting about that. Old habits LOL
 
Old 11-23-2006, 07:22 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Old habits, over 10 years in linux and I still do some of the simpliest things the old fashion way
 
Old 11-23-2006, 07:27 PM   #6
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Quote:
Originally Posted by Brian1
Old habits, over 10 years in linux and I still do some of the simpliest things the old fashion way
Ditto
 
Old 11-24-2006, 03:11 AM   #7
brooky9999
Member
 
Registered: May 2006
Location: Marlow, UK
Distribution: Slackware 12.2
Posts: 232

Original Poster
Rep: Reputation: 30
Hiya all,

The reason I as is that after compiling 2.6.18.3, my /lib/modules/2.6.18.3/kernel folder is empty.

Shouldn't it have a drivers folder which is full of goodies that I've compiled?


M.
 
Old 11-24-2006, 08:42 AM   #8
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Did you skip the "make modules_install" step? Sounds like it. just go to the kernel source directory and run the command. If it's already been compiled it should go ahead and install the modules.
 
Old 11-27-2006, 03:17 AM   #9
brooky9999
Member
 
Registered: May 2006
Location: Marlow, UK
Distribution: Slackware 12.2
Posts: 232

Original Poster
Rep: Reputation: 30
Hiya Masonm,

No I didn't skip that step... I always make sure I run that.

I'm stumped http://images.linuxquestions.org/que...milies/mad.gif




Mark.
 
Old 11-27-2006, 06:07 AM   #10
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Rep: Reputation: 30
make modules_install
^

didnt leave the underscore out did you ??
 
Old 11-27-2006, 06:48 AM   #11
brooky9999
Member
 
Registered: May 2006
Location: Marlow, UK
Distribution: Slackware 12.2
Posts: 232

Original Poster
Rep: Reputation: 30
Hi synapse,

No, definately got the underscore in there.

I'm wondering, am I barking up the wrong tree here? If I compile everyting into the kernel directly (which I tend to do) and not as modules, then will I see anything in the /lib/modules/2.6.18.3/kernel folder?


Mark.
 
Old 11-27-2006, 12:15 PM   #12
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
To get a list of compiled modules that should be under your /lib/modules/2.6.18.3 directory, run the following command:
Code:
grep -i '=M' /usr/src/linux-2.6.18.3/.config
To see a list of any kernel modules in that dir:
Code:
find /lib/modules/2.6.18.3 -type f -name '*.ko'
To get a count of how many modules are in there:
Code:
find /lib/modules/2.6.18.3 -type f -name '*.ko' | wc -l
I have 1583 kernel modules shown from running the previous command.
Of course, if the first command doesn't show any compile options selected as modules, then it makes sense that the directory structure was created by 'make modules_install', but no actual modules were placed there.

Good luck
 
Old 11-27-2006, 12:52 PM   #13
malo_umoran
Member
 
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Rep: Reputation: 32
Quote:
Originally Posted by WindowBreaker
To get a list of compiled modules that should be under your /lib/modules/2.6.18.3 directory, run the following command:
Code:
grep -i '=M' /usr/src/linux-2.6.18.3/.config
To see a list of any kernel modules in that dir:
Code:
find /lib/modules/2.6.18.3 -type f -name '*.ko'
To get a count of how many modules are in there:
Code:
find /lib/modules/2.6.18.3 -type f -name '*.ko' | wc -l
I have 1583 kernel modules shown from running the previous command.
Of course, if the first command doesn't show any compile options selected as modules, then it makes sense that the directory structure was created by 'make modules_install', but no actual modules were placed there.

Good luck
1583??????

M.
 
Old 11-27-2006, 12:53 PM   #14
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
If you compiled everything into the kernel instead of as modules you have your answer.
 
Old 11-27-2006, 01:01 PM   #15
malo_umoran
Member
 
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Rep: Reputation: 32
hmmm ... maybe, but it is still pretty much. I thin, I would not reach 300 when I would compile everything in modules.
 
  


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
kernel: No module symbols loaded - kernel modules not enabled. Qucho Debian 9 05-26-2004 02:50 AM
Kernel Modules and modules.conf init Linux - General 0 02-20-2004 06:51 PM
new kernel (2.4.22 up from 2.4.20-6) - missing modules - use old modules? Simon Bridge Linux - Software 1 02-04-2004 05:52 AM
How to keep modules/drivers across kernel recompiles and kernel versions? Pisces107 Linux - General 5 01-21-2004 08:29 PM
Kernel modules: why are some kernel modules zipped? hampel Slackware 3 06-30-2003 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:52 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