From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 26 18:18:39 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA24516A4BF for ; Tue, 26 Aug 2003 18:18:39 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 878A543FBF for ; Tue, 26 Aug 2003 18:18:38 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h7R1IFwN042459; Tue, 26 Aug 2003 19:18:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 26 Aug 2003 19:18:11 -0600 (MDT) Message-Id: <20030826.191811.22016699.imp@bsdimp.com> To: gurney_j@efn.org From: "M. Warner Losh" In-Reply-To: <20030826213939.GA10898@funkthat.com> References: <3F4B9BE0.5010209@acm.org> <001a01c36bff$cff9e840$a700000a@TYBOX> <20030826213939.GA10898@funkthat.com> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: tyler@statuo.com cc: kientzle@acm.org Subject: Re: Minimalist FreeBSD 4.8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2003 01:18:39 -0000 Actually, I have a small script that does something like this. Here's a breif sketch. # prepare /cf make buildworld ${chroot} /bin/sh -${e}c "(cd $srcdir env MAKEOBJDIRPREFIX=$objdir make -m ${srcdir}/share/mk -f \ Makefile.inc1 hierarchy DESTDIR=$dstdir NOMAN=yes (cd etc ; env MAKEOBJDIRPREFIX=$objdir make -m ${srcdir}/share/mk \ distribution DESTDIR=$dstdir NOMAN=yes) for i in ${FreeBSDProgramDirs}; do echo \"==> \$i\" test -d \$i && (cd \$i ; env MAKEOBJDIRPREFIX=$objdir make -m ${srcdir}/share/mk \ install -DNOINFO -DNOMAN DESTDIR=$dstdir -DNOPROFILE) done)" Here's my current minimal list for a bootable system, although you might be able to trim it a little. Also, it is optimized for 4.5. There will some tweaks needed for 4.8. Also, I've done the buildworld with NOSHARED=no since we put both / and /usr on the same partition in our systems. My scripts are more complete, but also very specific to Timing Solutions' needs. I've used these scripts to build flashes that take up about 12M or so. There's about 2M that can be trimmed. Warner P.S. Maybe I should find some time to pull together these scripts in a releaseable format... P.P.S., Here's what I use to set FreeBSDProgramDirs to in an over-arching makefile. FREEBSDMIN+= \ bin/cat \ bin/chmod \ bin/cp \ bin/csh \ bin/date \ bin/dd \ bin/df \ bin/echo \ bin/expr \ bin/hostname \ bin/kill \ bin/ln \ bin/ls \ bin/mkdir \ bin/mv \ bin/pwd \ bin/ps \ bin/rcp \ bin/rm \ bin/rmdir \ bin/sh \ bin/sleep \ bin/stty \ bin/sync \ bin/test \ gnu/lib/libregex \ gnu/usr.bin/awk \ gnu/usr.bin/cpio \ gnu/usr.bin/diff \ gnu/usr.bin/diff3 \ gnu/usr.bin/grep \ gnu/usr.bin/gzip \ gnu/usr.bin/tar \ lib/libc \ lib/libstdc++ \ lib/libcrypt \ lib/libdevstat \ lib/libedit \ lib/libipsec \ lib/libipx \ lib/libkvm \ lib/libmd \ lib/libnetgraph \ lib/libncurses \ lib/libpam \ lib/libskey \ lib/libutil \ lib/libwrap \ lib/libz \ lib/msun \ libexec/ftpd \ libexec/getty \ libexec/rlogind \ libexec/rshd \ libexec/rtld-elf \ libexec/telnetd \ sbin/adjkerntz \ sbin/dhclient \ sbin/disklabel \ sbin/dmesg \ sbin/fsck \ sbin/i386/fdisk \ sbin/ifconfig \ sbin/init \ sbin/ipfw \ sbin/kldload \ sbin/kldstat \ sbin/kldunload \ sbin/ldconfig \ sbin/md5 \ sbin/mknod \ sbin/mount \ sbin/mount_null \ sbin/mount_nfs \ sbin/newfs \ sbin/ping \ sbin/reboot \ sbin/route \ sbin/swapon \ sbin/sysctl \ sbin/umount \ share/termcap \ sys/boot \ usr.bin/chflags \ usr.bin/du \ usr.bin/ee \ usr.bin/env \ usr.bin/ftp \ usr.bin/find \ usr.bin/head \ usr.bin/hexdump \ usr.bin/id \ usr.bin/killall \ usr.bin/ldd \ usr.bin/less \ usr.bin/login \ usr.bin/netstat \ usr.bin/objformat \ usr.bin/rsh \ usr.bin/rlogin \ usr.bin/sed \ usr.bin/su \ usr.bin/tail \ usr.bin/telnet \ usr.bin/tip \ usr.bin/top \ usr.bin/touch \ usr.bin/tr \ usr.bin/tty \ usr.bin/uname \ usr.bin/vi \ usr.sbin/arp \ usr.sbin/chown \ usr.sbin/cron \ usr.sbin/dev_mkdb \ usr.sbin/inetd \ usr.sbin/mtree \ usr.sbin/ntp/ntpd \ usr.sbin/ntp/ntpdate \ usr.sbin/ntp/ntpq \ usr.sbin/kbdcontrol \ usr.sbin/pwd_mkdb \ usr.sbin/syslogd \ usr.sbin/traceroute \ usr.sbin/vidcontrol \ usr.sbin/vipw # "kitchen sink" FreeBSD on flash FREEBSDMAX+=${FREEBSDMIN} \ gnu/lib/libreadline \ lib/libftpio \ lib/librpcsvc \ usr.bin/vmstat \ usr.bin/w \ usr.sbin/ntp/ntpdc \ usr.sbin/ntp/ntptime \ usr.sbin/ntp/ntptimeset \ usr.sbin/ntp/ntptrace