Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Re-merge packages which provide kernel modules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
fifthcent
n00b
n00b


Joined: 28 May 2002
Posts: 36

PostPosted: Thu Apr 07, 2005 10:05 pm    Post subject: Re-merge packages which provide kernel modules Reply with quote

After switching kernel versions, it is necessary to re-emerge all the packages which provide provide kernel modules. It would be best to do this after compiling the new kernel and modules, so you don't have to worry about them after booting the new kernel.

So, first make sure that /usr/src/linux points to the new kernel.
Code:
cd /usr/src
ln -sf linux-2.6.11-gentoo-r5 linux # this should point to your new kernel


Then run the following:
Code:
emerge -a `grep -l '^dir /lib/modules' /var/db/pkg/*/*/CONTENTS | sed -e 's/\/var\/db\/pkg\//=/' -e 's/\/CONTENTS//'`


This will find all packages which put files into /lib/modules, and ask you if you want to emerge them again.

Hope someone finds this useful


Last edited by fifthcent on Fri Apr 08, 2005 12:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Thu Apr 07, 2005 10:23 pm    Post subject: Reply with quote

This is what your line reports back for my installation:
Code:
[ebuild   R   ] media-libs/svgalib-1.9.19-r3
[ebuild   R   ] media-video/ati-drivers-8.10.19
[ebuild   R   ] net-dialup/slmodem-2.9.9a-r2
[ebuild   R   ] net-fs/shfs-0.35-r1
[ebuild   R   ] net-wireless/madwifi-driver-0.1_pre20050224
[ebuild   R   ] x11-base/xorg-x11-6.8.2-r1

Everything OK except xorg-x11 and svgalib => There's no such thing as a xorg-x11 kernelmodule that needs recompilation after a kernel upgrade.
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Fri Apr 08, 2005 12:17 am    Post subject: Reply with quote

yeah, those use /usr/lib/modules for their own purposes.. can yank it out with another grep option.
In particular, grep for
Code:

" /lib/modules"

instead of just
Code:

/lib/modules
Back to top
View user's profile Send private message
fifthcent
n00b
n00b


Joined: 28 May 2002
Posts: 36

PostPosted: Fri Apr 08, 2005 12:06 pm    Post subject: Reply with quote

Thanks for the fix, I'll update the original post to reflect it.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Sun Apr 10, 2005 6:54 pm    Post subject: Reply with quote

Nice idea! :wink:
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
nathanj
n00b
n00b


Joined: 03 Nov 2003
Posts: 46
Location: Perth, WA, Australia

PostPosted: Mon May 23, 2005 11:51 am    Post subject: Reply with quote

Code:

greed root # ./afterkernel

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-video/nvidia-kernel-1.0.6629-r4

Do you want me to merge these packages? [Yes/No] n

Quitting.

greed root #


This will be handy for sure!
_________________
nathan
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Mon May 23, 2005 6:12 pm    Post subject: Reply with quote

Waow, thats definitely very handy
Code:
These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-libs/svgalib-1.9.19-r3  -build -debug 0 kB
[ebuild   R   ] media-video/ati-drivers-8.12.10  +opengl 0 kB
[ebuild   R   ] net-wireless/ipw2200-1.0.3  -debug 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No]


although I'm not sure svgalib has to do with a kernel module
nice idea, thank you!
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Mon May 23, 2005 6:49 pm    Post subject: Reply with quote

Tsuna wrote:
Waow, thats definitely very handy
Code:
These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-libs/svgalib-1.9.19-r3  -build -debug 0 kB
[ebuild   R   ] media-video/ati-drivers-8.12.10  +opengl 0 kB
[ebuild   R   ] net-wireless/ipw2200-1.0.3  -debug 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No]


although I'm not sure svgalib has to do with a kernel module
nice idea, thank you!

svgalib creates a modules somewhere I can remember under /lib/modules/`uname -r`/kernel with the name svgalib_helper.ko or something similar (talking by memory, dont remember the exact name). This modules can provide (when loaded) acces to high resolution modes from the console. It can be used by certain programs like links -g, mplayer and many others. Of course, that modules needs to be loaded every time (or put in the correct file) for it to load on every boot, and also needs to be recompiled each time that the kernel changes.

Btw, good work!
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Wed Jun 01, 2005 11:15 pm    Post subject: Reply with quote

would it be possible to improve this a little bit in order to be able to run afterkernel.sh right after the brand new kernel is compiled and so that the newly compiled modules will go directly into the fresh kernel's folders, instead of having to reboot and run afterkernel.sh and modprobe the recompiled modules

maybe this is just impossible, but it'd be handy
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
MockieMoo
n00b
n00b


Joined: 31 Dec 2004
Posts: 55
Location: Minneapolis, Minnesota, USA

PostPosted: Sun Jun 05, 2005 9:53 pm    Post subject: Reply with quote

Code:
These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-libs/svgalib-1.9.19-r3  -build -debug 0 kB
[ebuild   R   ] media-sound/nforce-audio-1.0.0301  0 kB
[ebuild   R   ] media-video/nvidia-kernel-1.0.6629-r4  0 kB


Very nice, much better than the inelegant way I was doing it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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