LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-25-2007, 03:28 PM   #1
jheiman
LQ Newbie
 
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0
How small can the kernel image get?


I have an academic question/challenge (with practical use): how small can a kernel bzImage get and still be a kernel? I'm soliciting results, suggestions, and ideas (but not useless feedback, thanks), to get the kernel size down to 50kb.

I've tried turning off support for everything that menuconfig allows (silly, I know, but I'm seriously looking for the lowest common denominator), and compiling with "standard" tools and libraries that Ubuntu provides results in a 500k image. Additionally enabling "Optimize for size" lowered this about 10%. I'm climbing the learning curve to discover how to compile against the uClibc libraries, which I suspect will have a big impact. But I'm interested in what is still there, being compiled, even when support for everything is disabled, and if (and how) I can get rid of that, too!!
 
Old 04-25-2007, 04:01 PM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
I remember back when Linux kernels where just a couple of hundred kilobytes, like 300kb, back in the days when slackware was the first distro. But there wasn't support for as many drivers as today. You would have to disable support for all the hardware that you will not need and enable only module support for the hardware that you will use, especially the hard disk, video, keyboard, mouse and (very important) network card. As long as it is under 1mb it should be adequate for most embedded systems.
 
Old 04-25-2007, 04:15 PM   #3
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by jheiman
I'm climbing the learning curve to discover how to compile against the uClibc libraries, which I suspect will have a big impact.
Not much comment on the rest of your post, but your kernel does not link against the C library, so this would not make any difference…
 
Old 04-25-2007, 08:31 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
You can see the size of the resident kernel from the kernel map. That is, of course, its size when uncompressed, and it doesn't consider modules.

The kernel can be made quite small, but size is typically not something that one optimizes for.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
difference netween linux-image and kernel image? mariogarcia Linux - Software 2 06-19-2006 08:01 AM
Small image beside URL in browser ctkroeker Linux - General 3 12-16-2005 05:01 PM
Kernel-image renamed to linux-image? powadha Debian 2 08-02-2005 05:07 AM
making konquerer display image thumbnails large, but other icons small? webazoid Linux - Software 0 08-01-2004 08:29 PM
Is "kernel-image-x_i386.deb or i586.deb the right image for P4 processor? davidas Debian 1 04-06-2004 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration