lsmod, lspci, lsdev and compiling kernel
I have never seemed to be able to compile and reduce the size of a new kernel below the size of bare.i
I would expect that for the most part I have been hesitant to not omit anything I might need. Somethings are obvious like the radio section, I don't need it. but when it comes to modules etc. would using the commands: lsmod lsdev lspci tell me all I need to know? Are there other commands I could use to list things I must have in the kernel or as modules for a new kernel compile to work? |
I guess one of the reasons that you fail to make
it much smaller than bare.i is the fact that bare.i makes VERY heavy use of modules, in other words, besides the ide drivers and the base file-systems everything is a module. And no, the three tools you mention won't give you all the information you need to make your decisions. Just look at the file-systems, again. You only need to put the filesystem you actually use as a integral part of the kernel, all others can be modules. You don't need a hard-coded CD or Floppy support, make them modules ... I guess the safest bet would be to look at your dmesg output, have a good think about which of the things loaded need to be present as compiled-in parts, and which can be modules. Have fun! Cheers, Tink |
Thanks for that.
Does that make bare.i slower or faster compared to a kernel with more compiled in and less modules? One way or another would I be able to tell the difference without using time? I'm just playing around cause my slack is running so well there's nothing that demands my attention and I'm looking for something to do. If I got a faster kernel, thats great, if not then maybe I'm a little wiser, that's all. Cheers Rick |
The speed gain by compiling things into the kernel
rather than using modules should be marginal, a few milliseconds during boot :} ... the advantage of modules is that you can unload them (free up RAM) if they're not needed. The advantage of a module-less kernel is that there's one chance less of finding an exploit :} Either way, make sure you only select stuff you actually NEED. That should make the compile way faster, ;) and keep the kernel and module directory to an acceptable size ... Cheers, Tink |
Thanks again Tink,
Im running a 550 Mhz cpu with 380 Mb memory, overheating was an issue first kernel compile but cleaning cpu fan removing a redundant hd and repositioning ide cables solved that. However, shorter compile times would be nicer though I usually do it at night and hope I wake up in the middle of the night for the make modules command :^) Cheers |
The only stuff that has to be compiled into the kernel is support for the devices needed to actually boot your system, plus anything you need that isn't available as a module.
|
For faster compile times do your compiling from the command line, instead fo within X. You can also string together the commands:
make bzImage; make modules; make modules_install |
or rather with && instead of ; ... that way you
only execute later ones if the prior ones were successful ... Cheers, Tink |
All times are GMT -5. The time now is 12:49 AM. |