right now, there are 5 group of modules that genkernel uses, they are described in /usr/share/genkernel/${ARCH}/module_load These groups are SCSI_MODULES FIREWIRE_MODULES ATARAID_MODULES PCMCI_MODULES AND USB_MODULES. This is a problem because modules such as ide don't belong to any predefined group. This patch allows the user to put as many groups as he wants in this file, (I will add a group for IDE in a separate bug depending on this one) and to remove groups that are not used in different platforms. to add a new group, add it to the variable MODULE_GROUPS in that file, and then make a variable ${GROUP}_MODULES="..." and run genkernel again. Hope you like it.
Created attachment 28392 [details, diff] Patch to allow configurable module groups
Another possible approach to this would be to use everything that starts with MODULES_ as a group, and no need to do the MODULE_GROUPS thing. Would this be better? The file would look like this: MODULES_SCSI="..." MODULES_FS="..." MODULES_FIREWIRE="..." MODULES_ATARAID="..." MODULES_PCMCI="..." MODULES_USB="..." it would be very easy to do using ${!MODULES_*} If you prefer this approach, let me know and I will make a patch for you.
I think that would be a better approach since that way there's no need to have a variable containing the list of groups possibly causing issues and people forgetting to add things into it. If you could make a patch for that; that would be great. The current patch also looks fine and seems to work fine here without issues, but be careful with the spelling of "PCMCIA" since it was spelt as "PCMCI" in the patch. Thanks!
*** Bug 46283 has been marked as a duplicate of this bug. ***
Created attachment 29153 [details, diff] genkernel.patch This new patch implements the second approach. I also added the MODULES_FS variable as requested. There is an interesting side effect to this patch. If the user defines an environment variable before calling genkernel, for example: export MODULES_XXX="..." genkernel then those modules will be included in the initrd under the group XXX. This might be worth mentioning somewhere in the documentation because it makes it easier for the user to customize the initrd.
Is there any problem with the patch?
Nope, the patch is fine and there are no issues with it, thanks for submitting it! I'm going to merge it into the next Genkernel release with a few tweaks to the default configurations which should be done soon...
Hm; I think we should remove MODULES_FS since there are known problems [ according to some other comment present in this Bugzilla ] with filesystem modules not working reliably in the kernel...
Created attachment 32202 [details, diff] genkernel.patch New patch without MODULES_FS.
The last patch is the same thing without MODULES_FS. MODULES_FS will only do something if the file system drivers are modules. Since that is not the default configuration that genkernel has, it should not matter whether MODULES_FS exists or not.
Added into genkernel-3.0.2b; it should reach Portage from CVS in half-an-hour. Thanks!