Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2001 10:27:04 -0700
From:      John E Hein <jhein@timing.com>
To:        Matt Peterson <matt+spam@peterson.org>
Cc:        freebsd-small@FreeBSD.ORG
Subject:   Free w/o the Pico
Message-ID:  <15384.58600.497715.933743@brain.timing.com>
In-Reply-To: <20011212211217.H35319@moaner.org>
References:  <20011212211217.H35319@moaner.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Matt Peterson wrote at 21:12 -0800 on Dec 12:
 > I apologize if this question has already been answered, I haven't found
 > an answer in the archives.  While PicoBSD certainly has its advantages,
 > my clients application is more designed for a "typical FreeBSD install".
 > We're also strapped for time, crunching OpenSSH and other required
 > programs just isn't going to happen.  Has anyone successfully "striped
 > down" the basic install to fit on 64Mb CF cards?  Any tips/tricks to
 > speed this process, besides slowly removing files and static binary
 > re-compiles?

There is mention of this in the archives for sure (search
 for mkflash from Warner Losh).

That said, we are able to get images below 10 MB (depending
 on what programs are included).  One big savings is
 running buildworld with NOSHARED=no.  This will build
 executables in /bin and /sbin that are dynamically linked.
 You cannot do this if you have a separate / and /usr (/usr
 is not mounted until later in the boot process).

As far as stripping out unnecessary bits from the base
 installworld, we have some scripts.  At the core of these
 scripts is the following:

populatedisk()
{
    (cd $FreeBSDSrcDir
    make -m ${FreeBSDSrcDir}/share/mk -f Makefile.inc1 \
        hierarchy DESTDIR=$1 NOMAN=yes
    (cd etc ; make -m ${FreeBSDSrcDir}/share/mk \
        distribution DESTDIR=$1 NOMAN=yes)
    for i in ${FreeBSDProgramDirs}; do
        echo "==> $i"
        test -d $i &&
            (cd $i ; make -m ${FreeBSDSrcDir}/share/mk \
                install -DNOINFO -DNOMAN DESTDIR=$1 -DNOPROFILE)
    done)
    rm -f $1/usr/lib/*.a
 .
 .
 .


For a pretty basic set of bits to install, we set
 FreeBSDProgramDirs to:

FreeBSDProgramDirs="bin/chmod \
	bin/cat \
	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/lib/libreadline \
	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/libedit \
	lib/libftpio \
	lib/libipsec \
	lib/libipx \
	lib/libkvm \
	lib/libmd \
	lib/libnetgraph \
	lib/libncurses \
	lib/libpam \
	lib/librpcsvc \
	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/login \
	usr.bin/ldd \
	usr.bin/less \
	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/top \
	usr.bin/touch \
	usr.bin/tty \
	usr.bin/uname \
	usr.bin/vi \
	usr.bin/w \
	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/pkg_add \
	usr.sbin/pwd_mkdb \
	usr.sbin/syslogd \
	usr.sbin/traceroute \
	usr.sbin/vidcontrol \
	usr.sbin/vipw"




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-small" in the body of the message




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