View previous topic :: View next topic |
Author |
Message |
drinkcat n00b
Joined: 03 Apr 2006 Posts: 2
|
Posted: Mon Apr 03, 2006 4:10 pm Post subject: [HOWTO] Re-emerge custom kernel modules when updating kernel |
|
|
Hi,
I have several custom kernel modules (nvidia-kernel, ipp2p, bluetooth-alsa), and, each time I build a new kernel, I had to re-emerge them manually (and I had to remember which one were installed).
So I created a small script to rebuild kernel modules (I called it "eupdate_modules"):
Code: | #!/bin/bash
echo "Searching for ebuilds containing files in /lib/modules..."
LIST=`grep " /lib/modules/$KERNEL" /var/db/pkg/*/*/CONTENTS | grep ".ko" | sed -e 's/^\/var\/db\/pkg\/\(.*\)\/CONTENTS.*$/>=\1/'`
CMD="emerge -a"
for i in $LIST; do
CMD="$CMD $i"
done
echo "Running \"$CMD\"..."
exec $CMD |
The general procedure to build a new kernel is the following:
Code: | cd /usr/src
rm linux
ln -s linux-2.6.your-version linux (This is important because most ebuilds won't build against the correct kernel if you don't set the /usr/src/linux symlink)
cd linux
(configure your kernel and install it)
/path_to/eupdate_modules (my script)
(reboot)
|
I don't know if it could be integrated in genkernel (I build my kernels manually).
I hope it'll be useful for some of you, and if you think it is worth a HOWTO in the Wiki tell me so and I'll create a page. |
|
Back to top |
|
|
neysx Retired Dev
Joined: 27 Jan 2003 Posts: 795
|
|
Back to top |
|
|
drinkcat n00b
Joined: 03 Apr 2006 Posts: 2
|
Posted: Mon Apr 03, 2006 4:32 pm Post subject: |
|
|
Oops... Thanks for the info... I missed that one .-)
Sorry, moderators: feel free to lock or delete this thread. |
|
Back to top |
|
|
|
|
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
|
|