Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2003 00:14:53 +0200 (CEST)
From:      Marc Schneiders <marc@schneiders.org>
To:        Rodrigo Readi <scire@web.de>
Cc:        freebsd-small@freebsd.org
Subject:   Re: How to make the kernel small, smaller, smallest?
Message-ID:  <20030425000438.O90079-100000@voo.doo.net>
In-Reply-To: <200304241719.h3OHJOq24455@mailgate5.cinetic.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Apr 2003, at 19:19 [=GMT+0200], Rodrigo Readi wrote:

> Thanks for your answers to my previous posting. Manuels's Article about
> minibsd contains indeed a lot of interesting matters, but it is
> unfortunately not for my purpose: I want a minimal FreeBSD in one, at
> most two, floppies that allows me to start an Xserver over a
> NFS. PicoBSD is more for my purposes, thanks Bruce for your notes.
>
> Now I have a new question: how to build a very small kernel? Today I
> threw a lot away from the GENERIG config file, but inspite of it, it
> compiled a lot of functions (modules?) that dont seem usefull to
> me. At the end I had a little more than 2MB,

Is this just the kernel or also the modules? I think all modules are
built, but they are not in the kernel then. So I think you don't need
to worry.

If your kernel is 2MB, there must be more to cut. Mine are 1870295 and
1862058 and they could lose some things. Obviously you don't need any
ata or scsi stuff, no ISO9660 filesystem etc. There is a lot you can
cut. INET6 if you don't use that. NFS takes up lots of kernel bytes,
but you need that, right? Same probably with printer port, usb maybe?

About 2 years ago I looked into this a bit and built something really
small, to run on a laptop with 4 MB RAM. That must have been before
the GENERIC kernel got slightly fatter. It was 1.3MB or little under.

I am not an expert at all on kernel 'hacking'. I know no C whatsoever.
I just tried things. And when the kernel doesn't boot, well put the
option back in you just took out and rebuild. If you build it on a
recent machine it goes pretty fast these days.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030425000438.O90079-100000>