LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-18-2006, 06:32 PM   #1
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware current
Posts: 423

Rep: Reputation: 73
build kernels; losing modules


I'm returning to slackware after many years away (8 years, I think). I've only been playing with it for a few days, but I'm getting into kernel building so as to make all the lovely hardware in laptop come to life.

However, I've hit an annoying problem - please excuse me if the answer is posted already, but I just couldn't find it.

After I've compiled a new kernel (no patches, just menuconfig
option changes) I find all my modules in /lib/modules have gone, specifically, alsa stuff and rt2500.o for my wireless device.

This isn't a big surprise as both are built outside /usr/src/linux. I can build them manually, and speed this up a bit with scripts, but it is an annoyance having to do this every time I build the kernel.

So, my question is: when I type "make modules", can I arrange things so that my alsa and rt2500 modules are built and installed too?

thanks

Andrew
 
Old 12-18-2006, 06:38 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
It depends. To install the modules, generally, you do “make modules-install” after they’re built. Alsa drivers should be in the kernel. Anything built outside the kernel (e.g., rt2500) will have to be rebuilt while running the new kernel.
 
Old 12-18-2006, 07:19 PM   #3
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,670

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
correction:
"make modules_install"
 
Old 12-19-2006, 12:26 AM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I usually rename the folder with my existing modules before running make modules_install. If you do that then you can copy the extra modules you need into the new module tree.
 
Old 12-19-2006, 03:07 PM   #5
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware current
Posts: 423

Original Poster
Rep: Reputation: 73
OK, thanks for the replies.

I do make modules_install, but it doesn't affect alsa or the rt2500 driver.

alsa did work "out the box" but it stopped working after my first kernel build, so I downloaded the source from the alsa website, which source now resides outside the /usr/src/linux dir.

Moving the /lib/modules dir out the way and then moving it back after the build doesn't help much because, for example, rt2500.o throws up errors with the newly compiled kernel - so I have to recompile it every time.

I just thought that I could somehow incorporate my modules to be compiled and installed
with make modules and and make modules_install.
 
Old 12-20-2006, 12:11 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
If you compile in support for "Set module versions" you can use modules which are compiled outside the kernel source tree. You can put them in a folder like /lib/modules/misc so they won't be removed when re-installing kernel modules.
 
Old 12-20-2006, 07:55 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by mcnalu
OK, thanks for the replies.

I do make modules_install, but it doesn't affect alsa or the rt2500 driver.

alsa did work "out the box" but it stopped working after my first kernel build, so I downloaded the source from the alsa website, which source now resides outside the /usr/src/linux dir.

Moving the /lib/modules dir out the way and then moving it back after the build doesn't help much because, for example, rt2500.o throws up errors with the newly compiled kernel - so I have to recompile it every time.

I just thought that I could somehow incorporate my modules to be compiled and installed
with make modules and and make modules_install.
Hi,

You could just edit the 'Makefile' and add to the 'Extraversion=' a unique version level, ie; -1a or 1b ...

That way you would have a unique compile with /lib/modules/kernel-'Extraversion_level'. Your original kernel modules will remain. This will also prevent you from changing the original tree.

When I compile, I use '/home/build/linux' as my source therefore I don't have a problem with my builds. I always use the 'Extraversion' to give unique compiles.
 
  


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
LXer: New book explains how to build Linux 2.6 kernels LXer Syndicated Linux News 0 12-16-2006 07:54 AM
2 kernels 1 set of lib/modules?? fred22 Linux - General 2 02-24-2005 02:31 AM
/etc/modules when booting multiple kernels cbirdlinux Linux - General 2 07-22-2004 05:57 PM
Modules and 2.6test kernels rch Linux - General 3 11-11-2003 09:39 PM
How to test between 2 kernels in /etc/modules.conf pnb Linux - General 2 11-10-2003 04:29 PM

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

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