summaryrefslogtreecommitdiff
path: root/distrib/mvme68k/ramdisk/Makefile
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-05-12 03:25:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-05-12 03:25:21 +0000
commite5a63f944c60883c4649c1562e939caee1fd0fd7 (patch)
tree4589b7063e3881a85c416e1165cd253567498682 /distrib/mvme68k/ramdisk/Makefile
parent3e2ecb7d9b6ffb66450fb1e5d8823e8b32d70e20 (diff)
do not build a filesystem containing a bsd containing a ramdisk.
instead, build simply a bsd containing a ramdisk. people can netboot this :-)
Diffstat (limited to 'distrib/mvme68k/ramdisk/Makefile')
-rw-r--r--distrib/mvme68k/ramdisk/Makefile134
1 files changed, 77 insertions, 57 deletions
diff --git a/distrib/mvme68k/ramdisk/Makefile b/distrib/mvme68k/ramdisk/Makefile
index 49bcadc9e19..7d5d76e84a5 100644
--- a/distrib/mvme68k/ramdisk/Makefile
+++ b/distrib/mvme68k/ramdisk/Makefile
@@ -3,74 +3,94 @@
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
-IMAGE= miniroot-${REV}.fs
-CRUNCHCONF?= ${.CURDIR}/${CBIN}.conf
-BASE=miniroot
+IMAGE= mr.fs
+CRUNCHCONF?= ${.CURDIR}/${CBIN}.conf
+BASE=mr
-MOUNT_POINT= /mnt1
-BDEV= /dev/rd0a
-CDEV= /dev/rrd0a
-RDEV= /dev/rd0c
+MOUNT_POINT= /mnt
-KERNEL= ${SRCSYSDIR}/arch/mvme68k/compile/MINIROOT/bsd
-
-all: ${CBIN} ${IMAGE}
- @echo "all done"
+#FS= ramdisk.fs
+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_ramdisk
.include "Makefile.inc"
-DISKTYPE= rdroot
-NBLKS= 4096
+all: bsd.rd
+
+#${FS}: bsd.gz
+# dd if=/dev/zero of=${REALIMAGE} count=4096
+# vnconfig -v -c ${VND} ${REALIMAGE}
+# disklabel -w ${VND} rdroot
+# newfs -m 0 -o space -i 8192 -c 80 ${VND_RDEV} rdroot
+# 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} ${FS}
+
+DISKTYPE= rdroot
+NBLKS= 4096
# old format, minfree, opt, b/i trks, sects, cpg
-#NEWFSARGS= -t ffs -m 0 -o space -u 32 -c 16
+NEWFSARGS= -t ffs -m 0 -o space -u 32 -c 16
-${IMAGE}: do_prep do_mount do_files do_umount_copy do_unconfig
- mv -f ${IMAGE}.tmp ${IMAGE}
- if [ -e rd.pid ] ; then \
- kill `< rd.pid`; \
- rm rd.pid;\
- fi
+bsd.gz: bsd.rd
+ gzip -c9 bsd.rd > bsd.gz
-rdsetroot: ${TOP}/common/rdsetroot.c
- ${HOSTCC} -o rdsetroot ${TOP}/common/rdsetroot.c
-
-setroot: ${IMAGE} bsd
- rdsetroot bsd < ${IMAGE}
-
-bsd: ${KERNEL}
- cp ${KERNEL} bsd
-
-writetape:
- echo rewinding tape < /dev/rst0
- buffer -i /usr/mdec/stboot -o /dev/nrst0
- buffer -i /usr/mdec/bootst -o /dev/nrst0
- buffer -B -p75 -i bsd -o /dev/nrst0
- echo rewinding tape < /dev/rst0
-
-
-do_prep: ${CBIN} do_unconfig
- sh ${.CURDIR}/start_rdconfig.sh ${RDEV} ${NBLKS}
- disklabel -w ${RDEV} ${DISKTYPE}
-
-do_mount:
- -newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
- mount ${BDEV} ${MOUNT_POINT}
-
-do_umount_copy:
- @echo ""
- @df -i ${MOUNT_POINT}
- @echo ""
- -umount ${MOUNT_POINT}
- dd if=${CDEV} of=${IMAGE}.tmp bs=4b count=`expr ${NBLKS} / 4 `
+bsd.rd: ${IMAGE} bsd rdsetroot
+ cp bsd bsd.rd
+ ${.CURDIR}/${__objdir}/rdsetroot bsd.rd < ${IMAGE}
+
+bsd:
+ cd ${.CURDIR}/../../../sys/arch/mvme68k/conf && config MINIROOT
+ cd ${.CURDIR}/../../../sys/arch/mvme68k/compile/MINIROOT && \
+ make clean && make depend && make
+ cp ${.CURDIR}/../../../sys/arch/mvme68k/compile/MINIROOT/bsd bsd
-do_unconfig:
+${IMAGE}: ${CBIN} rd_setup do_files rd_teardown
+
+rd_setup: ${CBIN}
+ dd if=/dev/zero of=${REALIMAGE} bs=512 count=${NBLKS}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w ${VND} ${DISKTYPE}
+ newfs ${NEWFSARGS} ${VND_RDEV} ${DISKTYPE}
+ fsck ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
+
+rd_teardown:
+ @df -i ${MOUNT_POINT}
+ sync
+ cat /*bin/* > /dev/null
+ sync
-umount ${MOUNT_POINT}
- if [ -e rd.pid ] ; then \
- kill `< rd.pid`; \
- rm rd.pid; \
- fi
+ -vnconfig -u ${VND}
+ cp ${REALIMAGE} ${IMAGE}
+ rm ${REALIMAGE}
+rdsetroot: ${TOP}/common/rdsetroot.c
+ ${HOSTCC} -DDEBUG -o rdsetroot ${TOP}/common/rdsetroot.c
-.PRECIOUS: ${IMAGE}
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND}
+ -/bin/rm -f ${IMAGE}
+.PRECIOUS: ${IMAGE}
+install:
+ cp bsd.rd ${DESTDIR}/snapshot/bsd.rd