dmlb2000 n00b
Joined: 27 Apr 2004 Posts: 13
|
Posted: Wed Jul 28, 2004 7:16 am Post subject: For those of us who use genkernel... |
|
|
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 |
|