build kernels; losing modules
I'm returning to slackware after many years away (8 years, I think). I've only been playing with it for a few days, but I'm getting into kernel building so as to make all the lovely hardware in laptop come to life.
However, I've hit an annoying problem - please excuse me if the answer is posted already, but I just couldn't find it. After I've compiled a new kernel (no patches, just menuconfig option changes) I find all my modules in /lib/modules have gone, specifically, alsa stuff and rt2500.o for my wireless device. This isn't a big surprise as both are built outside /usr/src/linux. I can build them manually, and speed this up a bit with scripts, but it is an annoyance having to do this every time I build the kernel. So, my question is: when I type "make modules", can I arrange things so that my alsa and rt2500 modules are built and installed too? thanks Andrew |
It depends. To install the modules, generally, you do “make modules-install” after they’re built. Alsa drivers should be in the kernel. Anything built outside the kernel (e.g., rt2500) will have to be rebuilt while running the new kernel.
|
correction:
"make modules_install" |
I usually rename the folder with my existing modules before running make modules_install. If you do that then you can copy the extra modules you need into the new module tree.
|
OK, thanks for the replies.
I do make modules_install, but it doesn't affect alsa or the rt2500 driver. alsa did work "out the box" but it stopped working after my first kernel build, so I downloaded the source from the alsa website, which source now resides outside the /usr/src/linux dir. Moving the /lib/modules dir out the way and then moving it back after the build doesn't help much because, for example, rt2500.o throws up errors with the newly compiled kernel - so I have to recompile it every time. I just thought that I could somehow incorporate my modules to be compiled and installed with make modules and and make modules_install. |
If you compile in support for "Set module versions" you can use modules which are compiled outside the kernel source tree. You can put them in a folder like /lib/modules/misc so they won't be removed when re-installing kernel modules.
|
Quote:
You could just edit the 'Makefile' and add to the 'Extraversion=' a unique version level, ie; -1a or 1b ... That way you would have a unique compile with /lib/modules/kernel-'Extraversion_level'. Your original kernel modules will remain. This will also prevent you from changing the original tree. When I compile, I use '/home/build/linux' as my source therefore I don't have a problem with my builds. I always use the 'Extraversion' to give unique compiles. |
All times are GMT -5. The time now is 05:07 AM. |