Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
For those of us who use genkernel...
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
dmlb2000
n00b
n00b


Joined: 27 Apr 2004
Posts: 13

PostPosted: Wed Jul 28, 2004 7:16 am    Post subject: For those of us who use genkernel... Reply with quote

For those of us that use genkernel there is one thing I've encountered that is very annoying about making kernels.

When a new kernel comes out and I gen a new kernel the external modules don't get made (ie nvidia-kernel, alsa-driver...) so next time I start with the new kernel I have NO sound and NO X

I think this should be done with genkernel and it's really easy to modify genkernel to do it

And here's the diff to do it.

Code:

--- genkernel.org       2004-07-27 17:13:47.595657680 +0000
+++ genkernel   2004-07-27 17:13:08.394617144 +0000
@@ -130,7 +130,7 @@
        # Compile modules
        compile_modules

-       print_info 1 "Copying config for successful build to /etc/kernels/kernel-config-${ARCH}-${KV}"
+       print_info 1 "Copying ${KERNEL_DIR}/.config for successful build to /etc/kernels/kernel-config-${ARCH}-${KV}"
        [ ! -e "/etc/kernels" ] && mkdir -p /etc/kernels
        cp "${KERNEL_DIR}/.config" "/etc/kernels/kernel-config-${ARCH}-${KV}"
 fi
@@ -237,3 +237,19 @@
 print_info 1 'is about the default genkernel configuration...'
 print_info 1 ''
 print_info 1 'Make sure you have the latest genkernel before reporting bugs.'
+print_info 1 ''
+print_info 1 "Making external kernel drivers ${KERNEL_EXT_DRIVER}"
+
+# emerging external kernel modules
+export KERNEL_DIR="${KERNEL_DIR}"
+export KV_OUPUT="`basename ${KERNEL_DIR}`"
+for x in ${KERNEL_EXT_DRIVER}
+do
+       if [ "`echo $x | grep alsa`" != "" ]
+       then
+               print_info 2 "export ALSA_CARDS=${ALSA_CARDS}" 1 0 1
+               export ALSA_CARDS="${ALSA_CARDS}"
+       fi
+       print_info 2 "executing emerge =${x}" 1 0 1
+       emerge "=${x}"
+done

First
Copy this text to a file (ie mygenkernel.diff)

Second
Move the file to /usr/share/genkernel/ (the default location of genkernel)
If you need to find where genkernel is located:
Code:

# file `which genkernel`

this should show a symlink to where the genkernel bash script is located

Third
Code:

# cd /usr/share/genkernel/
# patch -p0 <mygenkernel.diff


and then you need to add the following new variables to the /etc/genkernel.conf file
Code:


# External kernel drivers to recompile after kernel
KERNEL_EXT_DRIVER="media-sound/alsa-driver media-video/nvidia-kernel"
ALSA_CARDS="intel8x0"


KERNEL_EXT_DRIVER is a space separated list of catagory/ebuild of external kernel drivers
ALSA_CARDS is what sound card you have if you don't know what this is try here
This is what I have in on my system you need to change the ALSA_CARDS variable to match your card on your system.
Same with the KERNEL_EXT_DRIVER variable remember you need the catagory as well as kernel driver
Back to top
View user's profile Send private message
dmlb2000
n00b
n00b


Joined: 27 Apr 2004
Posts: 13

PostPosted: Wed Jul 28, 2004 7:45 am    Post subject: Reply with quote

Someone is going to mention genkernel --callback so I'll address it now

I can't pass the --kerneldir=/usr/src/... to the --callback so that's why I wrote this.
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