Shrink ramdiskbin by ~184K.

- use libhack to avoid dragging in YP and DB (saves about 108K of libc
   we have no need for).
 - use more of the -DSMALL utils from distrib/utils/x_*  (saves about 76K)
	(except x_gzip, which is actually bigger).
People who want to be able to install files which have been translated
into EBCDIC, or install over XNS, can probably figure out other ways
to get this done.

This means that a boot image again fits on a single 1.44M floppy, with
about 50k to spare.
This commit is contained in:
sommerfe 1999-03-13 21:21:51 +00:00
parent 32e0182e15
commit 72b3c2be3c
3 changed files with 29 additions and 6 deletions

View File

@ -1,11 +1,14 @@
# $NetBSD: Makefile,v 1.9 1999/03/04 20:32:19 wrstuden Exp $
# $NetBSD: Makefile,v 1.10 1999/03/13 21:21:51 sommerfe Exp $
TOP= ${.CURDIR}/..
WARNS=1
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk.fs
AUXTARGETS= install.sh upgrade.sh start.sh
AUXDEPENDS= dot.profile dot.hdprofile disktab.preinstall \
termcap.mini termcap.pc3
AUXCLEAN= ${AUXTARGETS}
CBIN= ramdiskbin
@ -35,7 +38,7 @@ upgrade.sh: upgrade.tmpl
start.sh: start.tmpl
sed "s/@@VERSION@@/${VER}/" < ${.ALLSRC} > ${.TARGET}
all: ${AUXTARGETS} ${CBIN}
all: ${AUXTARGETS} ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS}
dd if=/dev/zero of=${IMAGE} count=2880
vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
disklabel -rw ${VND_CDEV} ${DISKTYPE}
@ -61,9 +64,17 @@ ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
make -f ${CBIN}.mk all
# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC=${TOP}/../../utils/libhack
.include "${HACKSRC}/Makefile.inc"
clean cleandir distclean:
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: list,v 1.11 1999/03/11 06:24:36 marc Exp $
# $NetBSD: list,v 1.12 1999/03/13 21:21:51 sommerfe Exp $
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/ramdiskbin ramdiskbin
@ -55,7 +55,7 @@ SYMLINK /bin/cat usr/bin/chgrp
SYMLINK /bin/cat usr/bin/ftp
SYMLINK /bin/cat usr/bin/gunzip
SYMLINK /bin/cat usr/bin/gzcat
SYMLINK /bin/cat usr/bin/gzip
# SYMLINK /bin/cat usr/bin/gzip
SYMLINK /bin/cat usr/bin/less
SYMLINK /bin/cat usr/bin/more
SYMLINK /bin/cat usr/bin/sed
@ -84,6 +84,8 @@ COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
COPY ${CURDIR}/../../../../etc/services etc/services
SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
SPECIAL /bin/rm etc/spwd.db
SPECIAL /bin/rm etc/pwd.db
# and the common installation tools
# COPY ${CURDIR}/../../../utils/script-installer/dot.commonutils .commonutils

View File

@ -1,4 +1,4 @@
# $NetBSD: ramdiskbin.conf,v 1.9 1999/01/21 07:52:01 garbled Exp $
# $NetBSD: ramdiskbin.conf,v 1.10 1999/03/13 21:21:51 sommerfe Exp $
#
# ramdiskbin.conf - unified binary for the install ramdisk
#
@ -16,6 +16,15 @@ progs sysinst pax
special sysinst srcdir distrib/utils/sysinst/arch/i386
special init srcdir distrib/utils/init_s
special dd srcdir distrib/utils/x_dd
special ftp srcdir distrib/utils/x_ftp
special ifconfig srcdir distrib/utils/x_ifconfig
special route srcdir distrib/utils/x_route
special sh srcdir distrib/utils/x_sh
# "special" gzip is actually larger assuming nothing else uses -lz..
#special gzip srcdir distrib/utils/x_gzip
ln pax tar
ln chown chgrp
ln gzip gzcat gunzip
@ -30,4 +39,5 @@ ln mount_kernfs kernfs
ln reboot halt
ln restore rrestore
libs -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm
# libhack.o is built by Makefile & included Makefile.inc
libs libhack.o -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm