On Thu, Jun 09, 2011 at 11:52:42AM +0100, Ignas Anikevicius wrote: > Hello list, > > I was wondering if it is possible to have a tool with which it would be > possible to have external modules installed for _all_ kernel versions in > my computer. Now I am using 2.6.38 kernel, but would like to try 2.6.39 > and the thing is that I would like to have tp_smapi and phc-intel > modules in both kernels. Is it possible to have it without any serious > hacking? > > I have only 3 ideas how I could achieve that: > * Making a custom ebuild, which would build the modules, but install > itself as a different package depending on the kernel version (eg > tp_smapi-2.6.39-gentoo)? > * Making a custom ebuild, which would build the modules for all kernel > versions in one go... (is this possible?) > * patching the gentoo-sources each time.
kernel modules are CONFIG_PROTECTED, so they are not automatically removed when you uninstall / remerge the package (you have to remove them manually), so you just have to remerge the package after you change the /usr/src/linux symlink there is also the module-rebuild utility, that automatically remerges packages that installed a kernel module i.e. ln -sfn linux-VERSION1 /usr/src/linux module-rebuild -X rebuild ln -sfn linux-VERSION2 /usr/src/linux module-rebuild -X rebuild ... you might have to do module-rebuild populate before the first time... yoyo