LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   how to build a light linux kernel? (https://www.linuxquestions.org/questions/ubuntu-63/how-to-build-a-light-linux-kernel-569600/)

stepan_par 07-15-2007 05:39 PM

how to build a light linux kernel?
 
hi guys. I am compiling the latest kernel on my ubuntu box and it is basically 500-600 mb!Why is that since comparing to Ubuntu's kernel it is much fatter(5-6 times fatter to be exact).How can i make the kernel be more light-weight. When i was extracting i noticed that the kernel extracted folders such as sparc so i am assuming it installed the dependencies for every single architecture. Is there a way i can make it i386 only?if i am wrong about my deduction what exactly is causing the problem?i compiled on feisty and the kernel is 2.6.22

ilikejam 07-15-2007 05:58 PM

Weird double-post. Please ignore.

ilikejam 07-15-2007 06:05 PM

Hi.

Are you just counting the size of the full kernel source directory after you compile? This will be very large, since it contains all the sources and binaries. Try doing a 'make deb-pkg' and see what the size of the .pkg file created is.

The sources contain all the files for every supported architecture, processor, driver etc, but when you compile on x86 you will only compile the relevant bits for x86. If you want to get the kernel size down further, you can remove drivers, FSes etc that you don't need. The kernel RPM for my mail server, for example, is 1.4MB compared with 45MB for the original Fedora kernel package.

Dave

stepan_par 07-15-2007 06:24 PM

thanks for the reply. I talked to the people on ubuntu-kernel irc chat and they told me to disable CONFIG_KALLSYMS_ALL. How do i disable this?

ilikejam 07-15-2007 07:10 PM

Hi. The double post was me, not you :)

Disabling CONFIG_KALLSYMS_ALL will drop the size of the kernel by only a few K. If you really want to do this (unless you're compiling for an embedded arch with very limited RAM, you probably don't) then you can in [g|x]config by switching off:
General setup -> Configure standard kernel features (for small systems) -> Load all symbols for debugging/ksymoops

I still think you're comparing the total size of the sources and compiled binaries with the size of the binary kernel package though. An 'everything switched on' kernel for i386 is only about 40-50Meg.

Dave

stepan_par 07-15-2007 07:32 PM

Ok. Also , i am not comapring the sources. I installed the kernel and in synaptic , while i clicked to rmeove my custom kernel , it took of like 500 mb but when i ticked of to remove the ubuntu kernel , it only removed about 100-200 mb. also , i isntalled kubuntu , removed kubuntu the kde and then isntalled kde-base , when i added my custom kernl it was over 2 gb with just kdebase

stepan_par 07-16-2007 10:17 AM

anyone got an answer on this topic?


All times are GMT -5. The time now is 01:36 AM.