Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 46278

Summary: Kernel module groups should be configurable
Product: Gentoo Hosted Projects Reporter: Paul Pacheco <paulpach>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 46282    
Attachments: Patch to allow configurable module groups
genkernel.patch
genkernel.patch

Description Paul Pacheco 2004-03-30 12:27:26 UTC
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.
Comment 1 Paul Pacheco 2004-03-30 12:28:47 UTC
Created attachment 28392 [details, diff]
Patch to allow configurable module groups
Comment 2 Paul Pacheco 2004-04-06 08:28:19 UTC
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.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-04-06 08:44:26 UTC
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!
Comment 4 Tim Yamin (RETIRED) gentoo-dev 2004-04-11 04:49:37 UTC
*** Bug 46283 has been marked as a duplicate of this bug. ***
Comment 5 Paul Pacheco 2004-04-12 12:26:01 UTC
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.
Comment 6 Paul Pacheco 2004-04-22 13:29:49 UTC
Is there any problem with the patch?

Comment 7 Tim Yamin (RETIRED) gentoo-dev 2004-04-22 13:41:56 UTC
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...
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-05-01 15:15:00 UTC
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...
Comment 9 Paul Pacheco 2004-05-28 06:42:47 UTC
Created attachment 32202 [details, diff]
genkernel.patch

New patch without MODULES_FS.
Comment 10 Paul Pacheco 2004-05-28 06:46:08 UTC
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.



Comment 11 Tim Yamin (RETIRED) gentoo-dev 2004-06-12 15:03:47 UTC
Added into genkernel-3.0.2b; it should reach Portage from CVS in half-an-hour. Thanks!