From owner-cvs-all@FreeBSD.ORG Mon May 19 15:05:14 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36DB337B401; Mon, 19 May 2003 15:05:14 -0700 (PDT) Received: from magic.adaptec.com (magic-mail.adaptec.com [208.236.45.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id C41E043F3F; Mon, 19 May 2003 15:05:12 -0700 (PDT) (envelope-from scott_long@btc.adaptec.com) Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6/8.11.6) with ESMTP id h4JM13Z02576; Mon, 19 May 2003 15:01:03 -0700 Received: from btc.adaptec.com (hollin.btc.adaptec.com [10.100.253.56]) by redfish.adaptec.com (8.8.8p2+Sun/8.8.8) with ESMTP id PAA12480; Mon, 19 May 2003 15:05:06 -0700 (PDT) Message-ID: <3EC95463.50705@btc.adaptec.com> Date: Mon, 19 May 2003 16:02:11 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Garrett Wollman References: <200305171158.h4HBwSUP054361@repoman.freebsd.org> <20030517125948.GC52158@sunbay.com> <20030517140630.GA60602@sunbay.com> <20030518005055.GG12759@sunbay.com> <200305192149.h4JLnUrt075384@khavrinen.lcs.mit.edu> In-Reply-To: <200305192149.h4JLnUrt075384@khavrinen.lcs.mit.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Ruslan Ermilov cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/release/alpha dokern.sh drivers.conf X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2003 22:05:14 -0000 Very interesting experiment. This looks like an excellent project for 5.2. I'm unclear of where the .dsc files fit into here, but that should be rather easy to handle in any case. Scott Garrett Wollman wrote: > < said: > > >>It'd be even more advantageous to gzip(1) all the .ko files, >>and have sysinstall(8) unpack them. > > > Even better would be to simply link them all together. The overhead > for symbol tables and dynamic linking information appears to be about > 24%, and much of that can be shared. Here is a simple science > experiment: > > Build a complete set of modules. > $ ld -Bshareable -d -warn-common -o foo.ko `find modules -name '*.kld'` > $ objcopy --strip-debug foo.ko foo-nodebug.ko > $ ls -l foo-nodebug.ko > -rw-r--r-- 1 wollman wheel 9005614 May 19 17:31 foo-nodebug.ko > > OK, so this still won't fit on a floppy. Let's try this instead: > > $ awk '/^#/ { next; } NF > 2 {print "modules/usr/src/sys/modules/"$2"/"$2".kld"}' /usr/src/release/i386/drivers.conf > kld-list > $ ld -Bshareable -d -warn-common -o foo.ko `while read kld; do if [ -e $kld ]; then echo $kld; else echo $kld | sed -e 's,s/if_,s/,' -e 's,/miibus/,/mii/,' -e 's,/\(sysv...\)/,/sysvipc/\1/,' -e 's,/firewire/,/firewire/firewire/,' -e 's,/sbp/,/firewire/sbp/,' -e 's,/fwe/,/firewire/fwe/,'; fi; done < kld-list` > $ objcopy --strip-debug foo.ko foo-nodebug.ko > $ ls -l foo-nodebug.ko > -rw-r--r-- 1 wollman wheel 1834728 May 19 17:44 foo-nodebug.ko > > Well, that right there is almost enough to fit all the drivers on a > single floppy again. If we can gzip it, we're more than there: > > -rw-r--r-- 1 wollman wheel 677731 May 19 17:47 foo-nodebug.ko.gz > > Let's try just the stuff from floppy 2: > > -rw-r--r-- 1 wollman wheel 732717 May 19 17:47 foo-nodebug.ko > > ...which gzips down to: > > -rw-r--r-- 1 wollman wheel 257111 May 19 17:47 foo-nodebug.ko.gz > > -GAWollman