improving compiled modules of kernel - per-user (was Reasons Why Jaunty Will Not Ship With 2.6.29)

Stefan Hamminga stefan at engit.nl
Sun Feb 15 15:56:32 UTC 2009


-----Original Message-----
> hi,
> On Do, 2009-02-12 at 14:48 +0000, Scott James Remnant wrote:
> > I'd do something like:
> 
> >  - iterate /sys, looking for the devices
> >  - track to their drivers (either by looking at what's loaded, or
> >    comparing modalias to MODULE_DEVICE_TABLE)
> isnt that what MODULES=dep in /etc/initramfs.conf does already ? you would only need the 

> > - figure out the CONFIG entry
> > - spit out a config

> parts actually imho ...


I was thinking about this lately myself and started a little work on a bash script that retrieves a list of currently used modules and drivers (using lspci) and looks up the corresponding .config entry in the kernel source Makefiles.

Here is what I've got so far:

for mod in `((lspci -v | grep -i "Kernel driver in use: " | cut -b 24-) && (lspci -v | grep -i "Kernel modules: " | cut -b 18-)) | sort -u` ; do
	echo `grep $mod $(find -name Makefile) | grep -v debian | sed s/.*obj-\$\(// | sed s/\).*// | grep CONFIG`
done

Cheers,
Stefan





More information about the Ubuntu-devel-discuss mailing list