-# $OpenBSD: Makefile,v 1.1 1997/04/13 17:17:52 mickey Exp $
+# $OpenBSD: Makefile,v 1.2 1997/04/14 10:57:09 deraadt Exp $
# $NetBSD: Makefile,v 1.1 1995/07/18 04:13:06 briggs Exp $
TOP= ${.CURDIR}/..
CRUNCHCONF?= ${.CURDIR}/${CBIN}.conf
BASE=miniroot
-MOUNT_POINT= /mnt1
+MOUNT_POINT= /mnt
BDEV= /dev/rd0a
CDEV= /dev/rrd0a
RDEV= /dev/rd0c
-KERNEL= /sys/arch/i386/compile/RAMDISK/bsd
-
-all: ${CBIN} ${IMAGE}
- @echo "all done"
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CRDEV= /dev/r${VND}c
+PID!= echo $$$$
+REALIMAGE!= echo /tmp/image.${PID}
+LISTFLOPPY= ${.CURDIR}/list_floppy
.include "Makefile.inc"
+all: floppy
+
+floppy: bsd.gz
+.ifndef FLOPPY3
+ dd if=/dev/zero of=${REALIMAGE} bs=10k count=120
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w -r ${VND} floppy5
+ newfs -m 0 -o space -i 8192 -c 80 ${VND_RDEV} floppy5
+.else
+ dd if=/dev/zero of=${REALIMAGE} bs=10k count=144
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w -r ${VND} floppy3
+ newfs -m 0 -o space -i 6500 -c 80 ${VND_RDEV} floppy3
+.endif
+ mount ${VND_DEV} ${MOUNT_POINT}
+ TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
+ TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTFLOPPY}
+ sync
+ cat /*bin/* > /dev/null
+ sync
+ /usr/mdec/installboot -v /mnt/boot ${DESTDIR}/usr/mdec/biosboot ${VND_CRDEV}
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ sync
+ cat /*bin/* > /dev/null
+ sync
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND}
+ cp ${REALIMAGE} ${IMAGE}
+ rm ${REALIMAGE}
+
DISKTYPE= rdroot
NBLKS= 4046
# old format, minfree, opt, b/i trks, sects, cpg
NEWFSARGS= -t ffs -m 0 -o space -c 16 -i 4096
-${IMAGE}: do_prep do_mount do_files do_umount_copy do_unconfig
+bsd.gz: bsd.rd
+ gzip -c9 bsd.rd > bsd.gz
+
+bsd.rd: ${IMAGE} bsd rdsetroot
+ cp bsd bsd.rd
+ ${.CURDIR}/${__objdir}/rdsetroot bsd.rd < ${IMAGE}
+
+bsd:
+ cd ${.CURDIR}/../../../../sys/arch/i386/conf && config RAMDISK
+ cd ${.CURDIR}/../../../../sys/arch/i386/compile/RAMDISK && \
+ make clean && make depend && make
+ cp ${.CURDIR}/../../../../sys/arch/i386/compile/RAMDISK/bsd bsd
+
+${IMAGE}: do_prep do_mount do_files do_umount_copy do_unconfig ${CBIN}
mv -f ${IMAGE}.tmp ${IMAGE}
-if [ -e ${.CURDIR}/${__objdir}/rd.pid ] ; then \
kill `cat ${.CURDIR}/${__objdir}/rd.pid`; \
rdsetroot: ${TOP}/common/rdsetroot.c
${HOSTCC} -DDEBUG -o rdsetroot ${TOP}/common/rdsetroot.c
-setroot: ${IMAGE} bsd
- ${.CURDIR}/${__objdir}/rdsetroot bsd < ${IMAGE}
-
-bsd: ${KERNEL}
- cp ${KERNEL} bsd
-
writetape:
echo rewinding tape < /dev/rst0
buffer -i /usr/mdec/stboot -o /dev/nrst0
rm ${.CURDIR}/${__objdir}/rd.pid; \
fi
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND}
+ -/bin/rm -f ${IMAGE}
.PRECIOUS: ${IMAGE}
--- /dev/null
+# $OpenBSD: instbin.conf,v 1.1 1997/04/14 10:57:12 deraadt Exp $
+#
+# instbin.conf - unified binary for the inst/upgr floppies
+#
+
+srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin
+
+progs bad144 cat chmod chown chroot cp dd df disklabel ed expr fsck_ffs
+progs ftp fdisk
+progs ifconfig init less ln ls mkdir mknod mount mount_cd9660
+progs mount_ffs mount_msdos mount_nfs mount_kernfs
+progs mv newfs pax pdksh ping pwd reboot rm route
+progs sed shutdown slattach strings stty sync test tip umount
+progs rsh restore gzip
+
+ln chown chgrp
+ln fsck_ffs fsck
+ln less more
+ln pax tar
+ln pdksh sh
+ln pdksh -sh # init invokes the shell this way
+ln test [
+ln reboot halt
+
+libs -ledit -lutil -ltermcap -lkrb -ldes -ll -lm
+++ /dev/null
-# $OpenBSD: raminst.conf,v 1.1 1997/04/13 17:17:55 mickey Exp $
-#
-# instbin.conf - unified binary for the inst/upgr floppies
-#
-
-srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin
-
-progs bad144 cat chmod chown chroot cp dd df disklabel ed expr fsck_ffs
-progs ftp fdisk
-progs ifconfig init less ln ls mkdir mknod mount mount_cd9660
-progs mount_ffs mount_msdos mount_nfs mount_kernfs
-progs mv newfs pax pdksh ping pwd reboot rm route
-progs sed shutdown slattach strings stty sync test tip umount
-progs rsh restore gzip
-
-ln chown chgrp
-ln fsck_ffs fsck
-ln less more
-ln pax tar
-ln pdksh sh
-ln pdksh -sh # init invokes the shell this way
-ln test [
-ln reboot halt
-
-libs -ledit -lutil -ltermcap -lkrb -ldes -ll -lm