diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-02-15 04:27:20 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-02-15 04:27:20 +0000 |
commit | dac1e2449c3d5503940993308f9765cfb7efd1e0 (patch) | |
tree | c0d18f54968cd9529a71ae2191559e0dd03ff70e /distrib/mvme68k/ramdisk/Makefile | |
parent | 73570626f45431b6c5e537b1dea7d61cb83745ee (diff) |
Add new style of miniroot building. primarily based on the distrib/miniroot
code.
Diffstat (limited to 'distrib/mvme68k/ramdisk/Makefile')
-rw-r--r-- | distrib/mvme68k/ramdisk/Makefile | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/distrib/mvme68k/ramdisk/Makefile b/distrib/mvme68k/ramdisk/Makefile new file mode 100644 index 00000000000..1564c9c38aa --- /dev/null +++ b/distrib/mvme68k/ramdisk/Makefile @@ -0,0 +1,55 @@ +# $NetBSD: Makefile,v 1.1 1995/07/18 04:13:06 briggs Exp $ + +TOP= ${.CURDIR}/.. + +.include "${TOP}/Makefile.inc" +IMAGE= miniroot-${REV}.fs +CRUNCHCONF?= ${.CURDIR}/${CBIN}.conf +BASE=miniroot + +MOUNT_POINT= /mnt1 +BDEV= /dev/vnd0a +CDEV= /dev/rvnd0a +RDEV= /dev/vnd0c + +all: ${CBIN} ${IMAGE} + @echo "all done" + +.include "Makefile.inc" + +DISKTYPE= rdroot +NBLKS= 4096 +# old format, minfree, opt, b/i trks, sects, cpg +#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 + +do_prep: ${CBIN} do_unconfig + #sh ${.CURDIR}/start_rdconfig.sh ${CDEV} ${NBLKS} + dd if=/dev/zero of=${IMAGE} bs=1k count=2048 + vnconfig -cv ${RDEV} ${IMAGE} + disklabel -r -w ${RDEV} ${DISKTYPE} + +do_mount: + -newfs ${NEWFSARGS} -s ${NBLKS} ${BDEV} ${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 ` + +do_unconfig: + -umount ${MOUNT_POINT} + -vnconfig -u ${RDEV} + +.PRECIOUS: ${IMAGE} + + |