On Tue, Aug 12, 2008 at 10:58:38AM +0530, arshad hussain wrote: > On 8/11/08, onnm <on2008nm@xxxxxxxxx> wrote: > > Hi , that was an Idea taken from your book Greg (LKN !) :-) but I am really > > looking out to automate this task - this will save lot of time and put in > > that time into something more interesting ;-) ! > > > > > > On Mon, Aug 11, 2008 at 10:27 AM, Greg KH <greg@xxxxxxxxx> wrote: > > > >> On Mon, Aug 11, 2008 at 09:04:30AM +0530, onnm wrote: > >> > I am trying to write a script which will enable (update) Kernel to be > >> > automatically configured based on following things : > >> > > >> > (1) active modules in /proc/modules > >> > (2) output of lspci > >> > > >> > where else can I see to get a very minimal kernel image which will be > >> > required to run on a given machine ( obviously , running all devices > >> which > >> > were previously working !!) > > I did it a little differently. Objective was to run a minimal linux kernel > on a verity of hardware(different make of nic's, scsi controller etc). > So I prepared a kernel with most of the things as installable modules. > Very few thing were compiled into the kernel. That few things was > ext2/3, ramdisk etc... (which must be). > > This was about it . As Linux boots, a script runs hwinfo and > modprob's the drivers. You don't even need to do that, just ask the kernel to emit the hotplug messages for the hardware it found and the modules will be automatically loaded. See the startup code for any modern distro for how to do this in a few lines of shell script, or a simple .c program. thanks, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ