Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Compile modules for the Live CD kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Sat Aug 12, 2006 2:22 pm    Post subject: [SOLVED] Compile modules for the Live CD kernel Reply with quote

I decided to post my actual problem under a new topic (this one) hoping someone could help me then :)

I got the live disc kernel running on a machine and I'd like to compile some new modules for that kernel (2.6.15-r5 gentoo) but that specific version is no longer in the portage tree. Is there a way to use a r1 or different revision to compile the modules? I mean there can't be that many changes in the revisions that an external module (vmware) can't be compiled against it... right?


Last edited by Cyberwizzard on Sat Aug 12, 2006 10:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
sfragis
Tux's lil' helper
Tux's lil' helper


Joined: 24 Mar 2005
Posts: 95
Location: RE < IT < Europe

PostPosted: Sat Aug 12, 2006 4:11 pm    Post subject: Reply with quote

IMHO, one could use a different revision (such as r1 or r8, which are still in portage); a change in the revision number should reflect kernel bug fixes mainly. If you want to build the module with emerge, I think that /usr/src/linux must be a valid link to an existing kernel tree. Suppose you emerged gentoo-sources-2.6.15-r1. That will cause the module being installed in /lib/modules/2.6.15-r1/x/y/z.ko even if you booted with a different kernel (2.6.15-r5 in your case). You can try moving the module to the right directory /lib/modules/2.6.15-r5/x/y/z.ko. Maybe a "depmod -a" is also useful.
_________________
Regards
Fabio Strozzi
Back to top
View user's profile Send private message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Sat Aug 12, 2006 10:00 pm    Post subject: Reply with quote

So in theory I should be able to emerge vmware-modules (from the overlay) and grab the modules from the r1 or r8 module directory and depmod -a my way in there? Sounds good :)
Back to top
View user's profile Send private message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Sat Aug 12, 2006 10:38 pm    Post subject: Reply with quote

I'm logging here what I'm doing:

I just unmasked and emerged gentoo-sources-2.6.15-r8. Then I set /usr/src/linux to the r8 sources. Next I copied the System map file from /boot to the sources dir and renamed it to System.map.
Next I copied and decompressed /proc/config.gz to /usr/src/linux/.config

Next I ran 'make oldconfig' and 'make modules_prepare' to be able to run 'emerge vmware-modules'.
After emerging the modules I moved the misc directory in /lib/modules from the r8 to r5 and ran 'depmod -a'.

I entered 'modprobe vmmon' and 'modprobe vmnet' and behold... IT WORKED! :D

I tried something like this before but it failed time after time... This time I changed 3 things: used the r8 kernel, copied the System.map emerge complained about and ran 'depmod -a' to fix the dependencies (instead of forcing them in). :D

Thanks a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum