From owner-freebsd-small@FreeBSD.ORG Thu Apr 24 15:15:02 2003 Return-Path: Delivered-To: freebsd-small@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1256E37B401 for ; Thu, 24 Apr 2003 15:15:02 -0700 (PDT) Received: from voo.doo.net (voo.doo.net [81.17.45.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14C6C43FB1 for ; Thu, 24 Apr 2003 15:15:00 -0700 (PDT) (envelope-from marc@schneiders.org) Received: from localhost (localhost [127.0.0.1]) by voo.doo.net (8.12.8/8.12.6) with ESMTP id h3OMErJe095121; Fri, 25 Apr 2003 00:14:55 +0200 (CEST) (envelope-from marc@schneiders.org) Date: Fri, 25 Apr 2003 00:14:53 +0200 (CEST) From: Marc Schneiders Sender: To: Rodrigo Readi In-Reply-To: <200304241719.h3OHJOq24455@mailgate5.cinetic.de> Message-ID: <20030425000438.O90079-100000@voo.doo.net> X-Preferred-email-to: marc@schneiders.org X-Other-email-to: marc@venster.nl X-Organization: Venster (Zeist - NL) X-URL: http://www.bijt.net/ X-SOA: A.ROOT-SERVERS.ORSC. X-OS: FreeBSD: The Power to Serve MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-small@freebsd.org Subject: Re: How to make the kernel small, smaller, smallest? X-BeenThere: freebsd-small@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 22:15:02 -0000 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.