LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-23-2005, 08:10 PM   #1
fred22
Member
 
Registered: Apr 2004
Posts: 42

Rep: Reputation: 15
2 kernels 1 set of lib/modules??


Can I compile a new kernel of the same version and use the lib modules from the other kernel?

For example I have 2.6.10 but I need to customise it so a device will work. What I have found though when creating custom kernels is that other drivers don't play along with the new kernel. This is a pain. So I thought I could maybe copy the source and recompile the kernel and use the the same lib modules from my current kernel....I hope that made sense. I trying it now anyway....

Thanks
 
Old 02-23-2005, 08:32 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
If I got you right ....

Not the SAME modules, but identical should work...

The way the modules are stored is extracted from
your kernels Makefile ... e.g.
Code:
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 8
EXTRAVERSION = .1
NAME=Zonked Quokka
will store modules in
/lib/modules/2.6.8.1

Now if you have the working kernel installed you can
edit the Makefile like so:
Code:
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 8
EXTRAVERSION = .1homebrew
NAME=Zonked Quokka
before you modify stuff ... make also sure you copy
the original .config file to a safe place :)



Cheers,
Tink
 
Old 02-24-2005, 02:31 AM   #3
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
Realistically, I think it should work, as long as the two actual kernel images aren't configured drastically differently. A few things will affect whether the same module will work on both kernels --

1- Same kernel version
2- Same kernel stack size (4 or 8 kb)
3- SMP or single processor
4- Any module dependencies

There are probably more things which would impact your outcome, but on the same machine, not much would probably interfere.

Skip the 'make modules && make modues_install' step and see what happens :-D
Just copy your arch/i386/boot/bzImage to a location in /boot and A/B between the two kernel images.

--Shade
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Update-modules: No longer managing /lib/modules/modprobe.conf? geekzen Debian 0 04-03-2004 06:49 PM
/etc/conf.modules is more recent than /lib/module/2.2.15-4mdk/modules.dep Derek-kun Linux - Newbie 3 09-26-2003 02:56 AM
Slack9 - no PPP (can't open dependencies file /lib/modules/2.4.18/modules.dep) bluehz Slackware 1 05-04-2003 02:32 PM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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