[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Really small kernel



At Mon, 08 Nov 2004 17:26:44 +0000,
ognjen Bezanov wrote:
> 
> Thanks for all the answers, 
> 
> In essence i want to keep the kernel  small so that it boots up as fast
> as possible.
> 
> Plus the hardware is a 75mhz laptop with very little ram, i want to save
> as much ram as i can for other programs, hence the need for a small
> kernel.
> 
> As far as modules are concerned, i was under the impression that the
> kernel + modules would be bigger (size wise) then having everything
> together in one.
> 
> Do using (or not using) modules make a difference to the total size when
> loaded into ram?
> 

Removing module support from the kernel would save a bit, but I don't know how
much. If it gets read of the kernel symbol table, it could save you some memory
as my kallsyms file take about 500K. You will have to test though to see if you
actually save that much in memory.

As for the modules themselves, it means that you don't have to load the modules
that you are not using at the moment, which could save you some memory (such as
floppy, cdrom, serial, etc.)

This way you also save the memory some of the modules allocate, how much that is
would depend on the module though.

The shouldn't be any other difference in memory usage otherwise when comparing
compiling things as modules, compared to compiling into the kernel. What insmod
does is basically dynamically link the code. Modules are regular object files,
and insmod looks for the unknown symbols, and then tries to resolve them using
the kernel's exported symbols (same as statically linking a regular object file
actually, only done at runtime).

> On Mon, 2004-11-08 at 16:21, Martin Theiß wrote:
> > Hi ognjen Bezanov, *,
> > 
> > ognjen Bezanov wrote:
> > 
> > > Hi all, 
> > > 
> > > I want to find a way to find out what things i need to enable for my
> > > laptop to function.
> > > 
> > > I want to compile a kernel which only has support for the hardware im
> > > using and no module support
> > > 
> > Why no modules? Modules only have a slight overhead, when loading. After
> > this they perform like built-in modules.
> > 
> > > Is there any command which will let me view all the hardware on my pc
> > > and what respective setting i need on my .config file?
> > > 
> > lshw is a good tool to find out, what is in your laptop. also you should
> > consider using lspci. both together should give you a really good overview.
> > the only problem is to "translate" these infos into a .config. i don't know
> > of any tool which is capabale of doing this job.
> > the best way to do, what you want is running the distclean target of the
> > kernel and starting with the allnoconfig target. from this startingpoint you
> > can enable the different settings via menuconfig or similar.
> > 
> > > I want to make the kernel as small as possible
> > > 
> > Remember, size only matters at boot time (maybe 3-5% faster startup) or when
> > you really don't have much ram available.
> > 
> > Kind regards
> > Martin
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-laptop-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 



Reply to: