On Mon, Sep 13, 2004 at 08:28:56 -0400, Ed L Cashin wrote: > aq <aquynh@xxxxxxxxx> writes: > > > hello, > > > > I always find difficult to compile the kernel. The trouble is: there > > are too many device drivers available in the kernel source, and the > > process of compiling (like "make menuconfig") renders all the devices > > for the user to choose. And it is really confusing since chances are > > that people dont know which devices are available in their machine, so > > they dont know which device drivers should be selected to compile > > (otherwise if they choose everything to make sure the kernel works, > > the binary kernel would be too big). People who don't know what devices are available in their machine usualy don't know how to compile kernel either. There are pre-packaged kernels in all distros. > Not if they compile all the drivers as loadable modules. Which is exactly what pre-packaged kernels do. > > I think it would be very nice for "make menuconfig" first trying to > > detect what devices are available in the machine, then it "optimize" > > the selection of drivers to be compiled. After that user can refine > > what they want or not in the kernel. > > > > Is there any way to do that kind of thing ? > > Yes, you could do that. Probably nobody has because it would be > difficult and/or error prone, while it's easy to build more modules > than you need. The ones that aren't needed never get loaded. > > Don't let me stop you, though. You could use lcpci and dmesg to get a > starting idea of what the system has. Except it's such a horrible mess, that it's almost impossible. Usualy distribution installers try to load each module in turn and watch whether it found any devices. If it did, they record the fact, that it has to be loaded, usualy in /etc/modules or somesuch place. What I am not sure whether exists, but might be nice (and right way to go) would be to: 1) Take all-modules kernel. 2) Try all modules, whether they find anything. 3) Recompile the module with those modules built-in. And use existing tools for the first two steps (eg. Knoppix sure has one). ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature