[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] How small





On Fri, 24 Jul 1998, Richard Paton wrote:

> 
> How small can linux go?  I have some processors to put an operating system
> on; PC104 386 with 4MB of RAM and 8MB of Disk on Chip.  Can Linux
> conveniently be made to fit on this, or would it be a major exercise?
> 
> Thanks for any info.
> 
> Richard Paton
> 


I have constructed a 4.5MB root filesystem that I boot into ramdisk (I
have 32MB on my PC104 board).  It contains enough to support interactive
sessions.  So you should be able to fit a root filesystem on your Disk on
Chip.  I would not run a ramdisk in your case because of the limited RAM.

As to the 4MB RAM, I may be wrong, but I suspect if you run only one or two
embedded applications (that is, no interactive logins), it should be enough.
The trick is to avoid paging.  You could launch the applications via inittab
so they are loaded and running at boot-time.  Paging comes in when the
kernel has to continually load new applications.

One remark about ramdisk:  I have chosen to use a ramdisk for the
following reason.  If you run a root filesystem off your Disk on Chip, you
run the risk of a disk corruption if you do not shut down the system
properly.  I would guess that this is the norm in embedded devices where
your end user just hits reset or cycles power.  While fsck usually fixes
most problems, it may eventually fail in which case you will have to
rebuild your root filesystem on your Disk on Chip.   Using a ramdisk
avoids this problem since the root filesystem image is unchanged with each
bootup.  The Disk on Chip serves essentially as a very large boot ROM.

Finally, constructing a small root filesystem is quite easy.  Initially, I
started by installing only the required components of the 'A' disk series
from the Slackware distribution.  I have since "graduated" to creating
small root filesystems from a running Linux system via a set of scripts
I've written. 


Hope this helps.  Good luck!

Ken Teh


--- [rtl] ---
For more information on Real-Time Linux see:
http://www.rtlinux.org/