- Use new common ramdisk build method.
- Add sysinst, and remove some binaries from list (for now).
This commit is contained in:
parent
010ec39dbb
commit
ba21baeee2
@ -1,67 +1,46 @@
|
||||
# $NetBSD: Makefile,v 1.11 2002/02/21 15:07:38 tsutsui Exp $
|
||||
# $NetBSD: Makefile,v 1.12 2002/03/16 15:54:08 tsutsui Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
.include "${.CURDIR}/../../../Makefile.inc"
|
||||
.include <bsd.own.mk>
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
IMAGE= ramdisk.fs
|
||||
IMAGESIZE= 2048k
|
||||
|
||||
CBIN= ramdiskbin
|
||||
WARNS= 1
|
||||
|
||||
MOUNT_POINT?= /mnt
|
||||
VND?= vnd0
|
||||
VND_DEV= /dev/${VND}a
|
||||
VND_RDEV= /dev/r${VND}a
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
CRUNCHBIN= ramdiskbin
|
||||
LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
|
||||
MTREECONF= ${DISTRIBDIR}/common/mtree.common
|
||||
IMAGEENDIAN= be
|
||||
MAKEDEVTARGETS= floppy
|
||||
PARSELISTENV= PWD_MKDB=${PWD_MKDB:Q}
|
||||
IMAGEDEPENDS= ${CRUNCHBIN} \
|
||||
dot.profile termcap.src \
|
||||
${DESTDIR}/usr/mdec/installboot \
|
||||
${DESTDIR}/usr/mdec/boot \
|
||||
${DESTDIR}/usr/mdec/bootxx \
|
||||
${_SRC_TOP_}/etc/group \
|
||||
${_SRC_TOP_}/etc/master.passwd \
|
||||
${_SRC_TOP_}/etc/netconfig \
|
||||
${_SRC_TOP_}/etc/protocols \
|
||||
${_SRC_TOP_}/etc/services
|
||||
|
||||
LISTS= list
|
||||
CRUNCHCONF= ${CBIN}.conf
|
||||
MTREECONF= mtree.conf
|
||||
|
||||
CRUNCHGEN?= crunchgen
|
||||
MTREE?= mtree
|
||||
|
||||
RAMDISKSIZE= 2048k
|
||||
DISKTYPE= floppyinstfs
|
||||
|
||||
all: ${CBIN}
|
||||
dd if=/dev/zero of=${IMAGE} bs=${RAMDISKSIZE} count=1
|
||||
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
|
||||
disklabel -rw ${VND} ${DISKTYPE}
|
||||
newfs -B be -m 0 -o space -i 8192 -c 128 ${VND_RDEV}
|
||||
mount ${VND_DEV} ${MOUNT_POINT}
|
||||
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -u
|
||||
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
||||
KERNOBJDIR=${KERNOBJDIR} \
|
||||
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
|
||||
@echo ""
|
||||
@df -i ${MOUNT_POINT}
|
||||
@echo ""
|
||||
umount ${MOUNT_POINT}
|
||||
vnconfig -u ${VND}
|
||||
|
||||
unconfig:
|
||||
-umount -f ${MOUNT_POINT}
|
||||
-vnconfig -u ${VND}
|
||||
-rm -f ${IMAGE}
|
||||
|
||||
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||
${CRUNCHGEN} -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
|
||||
|
||||
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c libhack.o
|
||||
${MAKE} -f ${CBIN}.mk all
|
||||
|
||||
HACKSRC=${TOP}/../../utils/libhack
|
||||
.include "${HACKSRC}/Makefile.inc"
|
||||
# turn off small gethostby* temporarily
|
||||
HACKOBJS:= ${HACKOBJS:Ngethost.o}
|
||||
realall: ${IMAGE}
|
||||
|
||||
release:
|
||||
|
||||
clean cleandir distclean:
|
||||
if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi; \
|
||||
rm -f ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
|
||||
rm -f *.core *.o *.cro *.c
|
||||
# Use stubs to eliminate some large stuff from libc
|
||||
HACKSRC=${DISTRIBDIR}/utils/libhack
|
||||
.include "${HACKSRC}/Makefile.inc"
|
||||
|
||||
# Turn off libhack's gethostby*() as it only supports /etc/hosts
|
||||
HACKOBJS:= ${HACKOBJS:Ngethost.o}
|
||||
|
||||
# This is listed in "list" file but is built here.
|
||||
${CRUNCHBIN}: libhack.o
|
||||
|
||||
.include "${DISTRIBDIR}/common/Makefile.crunch"
|
||||
.include "${DISTRIBDIR}/common/Makefile.makedev"
|
||||
.include "${DISTRIBDIR}/common/Makefile.image"
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -1,29 +0,0 @@
|
||||
# $NetBSD: disktab.preinstall,v 1.1 2000/03/04 19:27:04 tsubai Exp $
|
||||
#
|
||||
# Disk geometry and partition layout tables.
|
||||
# Key:
|
||||
# dt controller type
|
||||
# ty type of disk (fixed, removeable, simulated)
|
||||
# d[0-4] drive-type-dependent parameters
|
||||
# ns #sectors/track
|
||||
# nt #tracks/cylinder
|
||||
# nc #cylinders/disk
|
||||
# sc #sectors/cylinder, ns*nt default
|
||||
# su #sectors/unit, sc*nc default
|
||||
# se sector size, DEV_BSIZE default
|
||||
# rm rpm, 3600 default
|
||||
# sf supports bad144-style bad sector forwarding
|
||||
# sk sector skew per track, default 0
|
||||
# cs sector skew per cylinder, default 0
|
||||
# hs headswitch time, default 0
|
||||
# ts one-cylinder seek time, default 0
|
||||
# il sector interleave (n:1), 1 default
|
||||
# bs boot block size, default BBSIZE
|
||||
# sb superblock size, default SBSIZE
|
||||
# o[a-h] partition offsets in sectors
|
||||
# p[a-h] partition sizes in sectors
|
||||
# b[a-h] partition block sizes in bytes
|
||||
# f[a-h] partition fragment sizes in bytes
|
||||
# t[a-h] partition types (filesystem, swap, etc)
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: dot.profile,v 1.4 2001/02/01 06:08:00 tsutsui Exp $
|
||||
# $NetBSD: dot.profile,v 1.5 2002/03/16 15:54:09 tsutsui Exp $
|
||||
#
|
||||
# Copyright (c) 1995 Jason R. Thorpe
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
@ -65,8 +65,6 @@ if [ "X${DONEPROFILE}" = "X" ]; then
|
||||
fi
|
||||
done
|
||||
|
||||
/bin/sh # XXX for now
|
||||
|
||||
# Installing or upgrading?
|
||||
_forceloop=""
|
||||
while [ "X${_forceloop}" = X"" ]; do
|
||||
|
@ -1,93 +1,96 @@
|
||||
# $NetBSD: list,v 1.3 2001/02/01 06:07:22 tsutsui Exp $
|
||||
# $NetBSD: list,v 1.4 2002/03/16 15:54:09 tsutsui Exp $
|
||||
|
||||
# copy the crunched binary, link to it, and kill it
|
||||
COPY ${OBJDIR}/ramdiskbin ramdiskbin
|
||||
#LINK ramdiskbin sysinst
|
||||
LINK ramdiskbin bin/cat
|
||||
LINK ramdiskbin bin/chmod
|
||||
LINK ramdiskbin bin/cp
|
||||
LINK ramdiskbin bin/dd
|
||||
LINK ramdiskbin bin/df
|
||||
LINK ramdiskbin bin/dmesg
|
||||
LINK ramdiskbin bin/ed
|
||||
LINK ramdiskbin bin/ln
|
||||
LINK ramdiskbin bin/ls
|
||||
LINK ramdiskbin bin/mkdir
|
||||
LINK ramdiskbin bin/mt
|
||||
LINK ramdiskbin bin/mv
|
||||
LINK ramdiskbin bin/pax
|
||||
LINK ramdiskbin bin/pwd
|
||||
LINK ramdiskbin bin/rcmd
|
||||
LINK ramdiskbin bin/rm
|
||||
LINK ramdiskbin bin/sh
|
||||
LINK ramdiskbin bin/stty
|
||||
LINK ramdiskbin bin/sync
|
||||
LINK ramdiskbin bin/test
|
||||
LINK ramdiskbin bin/[
|
||||
LINK ramdiskbin sbin/disklabel
|
||||
LINK ramdiskbin sbin/fsck
|
||||
LINK ramdiskbin sbin/fsck_ffs
|
||||
LINK ramdiskbin sbin/halt
|
||||
LINK ramdiskbin sbin/ifconfig
|
||||
LINK ramdiskbin sbin/init
|
||||
LINK ramdiskbin sbin/mknod
|
||||
LINK ramdiskbin sbin/mount
|
||||
LINK ramdiskbin sbin/mount_cd9660
|
||||
LINK ramdiskbin sbin/mount_ffs
|
||||
LINK ramdiskbin sbin/mount_mfs
|
||||
LINK ramdiskbin sbin/mount_msdos
|
||||
LINK ramdiskbin sbin/mount_nfs
|
||||
LINK ramdiskbin sbin/newfs
|
||||
LINK ramdiskbin sbin/ping
|
||||
LINK ramdiskbin sbin/reboot
|
||||
LINK ramdiskbin sbin/restore
|
||||
LINK ramdiskbin sbin/route
|
||||
LINK ramdiskbin sbin/rrestore
|
||||
LINK ramdiskbin sbin/shutdown
|
||||
LINK ramdiskbin sbin/umount
|
||||
LINK ramdiskbin usr/bin/chgrp
|
||||
LINK ramdiskbin usr/bin/ftp
|
||||
LINK ramdiskbin usr/bin/gunzip
|
||||
LINK ramdiskbin usr/bin/gzcat
|
||||
LINK ramdiskbin usr/bin/gzip
|
||||
LINK ramdiskbin usr/bin/more
|
||||
LINK ramdiskbin usr/bin/sed
|
||||
LINK ramdiskbin usr/bin/tar
|
||||
LINK ramdiskbin usr/bin/tset
|
||||
LINK ramdiskbin usr/mdec/installboot
|
||||
LINK ramdiskbin usr/sbin/chown
|
||||
LINK ramdiskbin usr/sbin/chroot
|
||||
SPECIAL /bin/rm ramdiskbin
|
||||
SRCDIRS bin sbin usr.bin usr.sbin sys/arch/${MACHINE}/stand
|
||||
|
||||
# copy the MAKEDEV script and make some devices
|
||||
COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
|
||||
SPECIAL cd dev; sh MAKEDEV floppy
|
||||
SPECIAL /bin/rm dev/MAKEDEV
|
||||
PROG bin/cat
|
||||
PROG bin/chmod
|
||||
PROG bin/cp
|
||||
PROG bin/dd
|
||||
PROG bin/df
|
||||
#PROG bin/ed
|
||||
PROG bin/ln
|
||||
PROG bin/ls
|
||||
PROG bin/mkdir
|
||||
#PROG bin/mt
|
||||
PROG bin/mv
|
||||
PROG bin/pax usr/bin/tar
|
||||
PROG bin/pwd
|
||||
#PROG bin/rcmd
|
||||
#PROG bin/rcp
|
||||
PROG bin/rm
|
||||
PROG bin/sh
|
||||
PROG bin/stty
|
||||
#PROG bin/sync
|
||||
PROG bin/test bin/[
|
||||
|
||||
# we need the boot blocks /usr/mdec
|
||||
COPY ${DESTDIR}/usr/mdec/boot usr/mdec/boot
|
||||
COPY ${DESTDIR}/usr/mdec/bootxx usr/mdec/bootxx
|
||||
PROG sbin/disklabel
|
||||
PROG sbin/dmesg
|
||||
PROG sbin/fsck
|
||||
PROG sbin/fsck_ffs
|
||||
PROG sbin/ifconfig
|
||||
PROG sbin/init
|
||||
PROG sbin/mknod
|
||||
PROG sbin/mount
|
||||
PROG sbin/mount_cd9660
|
||||
PROG sbin/mount_ffs
|
||||
#PROG sbin/mount_msdos
|
||||
PROG sbin/mount_nfs
|
||||
PROG sbin/newfs sbin/mount_mfs
|
||||
PROG sbin/ping
|
||||
PROG sbin/reboot sbin/halt
|
||||
#PROG sbin/restore sbin/rrestore
|
||||
PROG sbin/route
|
||||
#PROG sbin/shutdown
|
||||
PROG sbin/swapctl sbin/swapon
|
||||
PROG sbin/umount
|
||||
|
||||
# and the termcap file
|
||||
COPY ${CURDIR}/termcap.src usr/share/misc/termcap
|
||||
PROG usr/bin/ftp
|
||||
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
|
||||
PROG usr/bin/more
|
||||
PROG usr/bin/sed
|
||||
PROG usr/bin/tset
|
||||
|
||||
PROG usr/sbin/chown usr/bin/chgrp
|
||||
PROG usr/sbin/chroot
|
||||
|
||||
PROG usr/mdec/installboot
|
||||
|
||||
SPECIAL dd srcdir distrib/utils/x_dd
|
||||
SPECIAL dmesg srcdir distrib/utils/x_dmesg
|
||||
#SPECIAL ed srcdir distrib/utils/x_ed
|
||||
SPECIAL ftp srcdir distrib/utils/x_ftp
|
||||
SPECIAL gzip srcdir distrib/utils/x_gzip
|
||||
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
|
||||
SPECIAL init srcdir distrib/utils/init_s
|
||||
SPECIAL more srcdir distrib/utils/more
|
||||
SPECIAL mount srcdir distrib/utils/x_mount
|
||||
SPECIAL ping srcdir distrib/utils/x_ping
|
||||
SPECIAL route srcdir distrib/utils/x_route
|
||||
SPECIAL sh srcdir distrib/utils/x_sh
|
||||
SPECIAL umount srcdir distrib/utils/x_umount
|
||||
|
||||
LIBS libhack.o -ledit -lutil -lcurses -ltermcap -ll -lm -lz
|
||||
|
||||
COPY ${DESTDIR}/usr/mdec/bootxx usr/mdec/bootxx
|
||||
COPY ${DESTDIR}/usr/mdec/boot usr/mdec/boot
|
||||
|
||||
# init invokes the shell as -sh
|
||||
ARGVLN sh -sh
|
||||
|
||||
# various files that we need in /etc for the install
|
||||
#COPY ${DESTDIR}/etc/disktab etc/disktab
|
||||
COPY ${CURDIR}/../../../../etc/group etc/group
|
||||
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
|
||||
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
|
||||
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
|
||||
COPY ${CURDIR}/../../../../etc/services etc/services
|
||||
SPECIAL pwd_mkdb -p -d . etc/master.passwd
|
||||
COPY ${_SRC_TOP_}/etc/group etc/group
|
||||
COPY ${_SRC_TOP_}/etc/master.passwd etc/master.passwd
|
||||
COPY ${_SRC_TOP_}/etc/netconfig etc/netconfig
|
||||
COPY ${_SRC_TOP_}/etc/protocols etc/protocols
|
||||
COPY ${_SRC_TOP_}/etc/services etc/services
|
||||
# generate Version 7 style etc/passwd
|
||||
CMD ${PWD_MKDB} -B -p -d . etc/master.passwd
|
||||
# ..but db files are not needed for libhack's getpwent.c
|
||||
CMD rm etc/spwd.db etc/pwd.db
|
||||
|
||||
# the disktab explanation file
|
||||
COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall
|
||||
# and the common installation tools
|
||||
COPY ${CURDIR}/termcap.src usr/share/misc/termcap
|
||||
|
||||
# and the installation scripts
|
||||
COPY ${CURDIR}/dot.profile .profile
|
||||
|
||||
# Minimize use of MFS
|
||||
SYMLINK /tmp var/tmp
|
||||
|
||||
#the lists of obsolete files used by sysinst
|
||||
SPECIAL sh ${CURDIR}/../../../../distrib/sets/makeobsolete -b -s ${CURDIR}/../../../../distrib/sets -t ./dist
|
||||
# and the boot script
|
||||
COPY ${CURDIR}/dot.profile .profile
|
||||
MTREE ./.profile type=file uname=root gname=wheel mode=0644
|
||||
|
@ -1,82 +0,0 @@
|
||||
# $NetBSD: mtree.conf,v 1.2 2001/02/01 06:05:46 tsutsui Exp $
|
||||
|
||||
/set type=dir uname=root gname=wheel mode=0755
|
||||
# .
|
||||
.
|
||||
|
||||
# ./bin
|
||||
bin
|
||||
# ./bin
|
||||
..
|
||||
|
||||
# ./dev
|
||||
dev
|
||||
# ./dev
|
||||
..
|
||||
|
||||
# ./dist
|
||||
dist
|
||||
# ./dist
|
||||
..
|
||||
|
||||
# ./etc
|
||||
etc
|
||||
# ./etc
|
||||
..
|
||||
|
||||
# ./mnt
|
||||
mnt
|
||||
# ./mnt
|
||||
..
|
||||
|
||||
# ./mnt2
|
||||
mnt2
|
||||
# ./mnt2
|
||||
..
|
||||
|
||||
# ./sbin
|
||||
sbin
|
||||
# ./sbin
|
||||
..
|
||||
|
||||
# ./tmp
|
||||
tmp mode=01777
|
||||
# ./tmp
|
||||
..
|
||||
|
||||
# ./var
|
||||
var
|
||||
# ./var
|
||||
..
|
||||
|
||||
# ./usr
|
||||
usr
|
||||
|
||||
# ./usr/bin
|
||||
bin
|
||||
# ./usr/bin
|
||||
..
|
||||
|
||||
# ./usr/mdec
|
||||
mdec
|
||||
# ./usr/mdec
|
||||
..
|
||||
|
||||
# ./usr/sbin
|
||||
sbin
|
||||
# ./usr/sbin
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
share
|
||||
|
||||
# ./usr/share/misc
|
||||
misc
|
||||
# ./usr/share/misc
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
..
|
||||
|
||||
# ./usr
|
||||
..
|
@ -1,44 +0,0 @@
|
||||
# $NetBSD: ramdiskbin.conf,v 1.3 2001/02/18 06:20:18 tsutsui Exp $
|
||||
#
|
||||
# ramdiskbin.conf - unified binary for the install ramdisk
|
||||
|
||||
srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin
|
||||
srcdirs sys/arch/newsmips/stand
|
||||
|
||||
progs cat chmod chown chroot cp dd df disklabel dmesg ed
|
||||
progs fsck fsck_ffs ftp gzip ifconfig init installboot ln ls
|
||||
progs mkdir mknod more mount mount_cd9660 mount_ffs
|
||||
progs mount_msdos mount_nfs mv newfs pax ping pwd rcmd reboot
|
||||
progs restore rm route sed sh shutdown stty sync test tset umount
|
||||
#progs sysinst
|
||||
|
||||
special dd srcdir distrib/utils/x_dd
|
||||
special dmesg srcdir distrib/utils/x_dmesg
|
||||
special ed srcdir distrib/utils/x_ed
|
||||
special ftp srcdir distrib/utils/x_ftp
|
||||
special gzip srcdir distrib/utils/x_gzip
|
||||
special ifconfig srcdir distrib/utils/x_ifconfig
|
||||
special init srcdir distrib/utils/init_s
|
||||
special more srcdir distrib/utils/more
|
||||
special mount srcdir distrib/utils/x_mount
|
||||
special ping srcdir distrib/utils/x_ping
|
||||
special route srcdir distrib/utils/x_route
|
||||
special sh srcdir distrib/utils/x_sh
|
||||
special umount srcdir distrib/utils/x_umount
|
||||
#special sysinst srcdir distrib/utils/sysinst/arch/newsmips
|
||||
|
||||
ln chown chgrp
|
||||
ln gzip gzcat gunzip
|
||||
ln sh -sh # init invokes the shell this way
|
||||
ln test [
|
||||
ln mount_cd9660 cd9660
|
||||
ln mount_ffs ffs
|
||||
ln mount_nfs nfs
|
||||
ln newfs mount_mfs
|
||||
ln pax tar
|
||||
ln rcmd rsh
|
||||
ln reboot halt
|
||||
ln restore rrestore
|
||||
|
||||
libs libhack.o
|
||||
libs -ledit -lutil -lcurses -ltermcap -lcrypt -ll -lm -lz
|
Loading…
Reference in New Issue
Block a user