summaryrefslogtreecommitdiff
path: root/distrib/luna88k
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-28 14:48:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-28 14:48:12 +0000
commit1c24a7b4a2202b4c466248a03b661fcf6c40e35e (patch)
tree2214f1f048822bc64f69b522c02a32f6e17d0c80 /distrib/luna88k
parentbaeb4d23783efa1dd62e7c43c3296b8e6fad6a0d (diff)
Use new vnconfig vnd-auto-allocate mode. Resolve some variation between
architectures, and start removing some crazy junk that has collected over the years. Being tested on all architectures... ok various people.
Diffstat (limited to 'distrib/luna88k')
-rw-r--r--distrib/luna88k/miniroot/Makefile30
1 files changed, 16 insertions, 14 deletions
diff --git a/distrib/luna88k/miniroot/Makefile b/distrib/luna88k/miniroot/Makefile
index 791a8b85cf7..d8fc9db6a17 100644
--- a/distrib/luna88k/miniroot/Makefile
+++ b/distrib/luna88k/miniroot/Makefile
@@ -1,10 +1,11 @@
-# $OpenBSD: Makefile,v 1.2 2014/03/18 14:35:01 aoyama Exp $
+# $OpenBSD: Makefile,v 1.3 2019/04/28 14:48:10 deraadt Exp $
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
-TARGET=miniroot${REV}.fs
+TARGET= miniroot${REV}.fs
+MOUNT_POINT= /mnt
.ifndef DESTDIR
all ${TARGET}:
@@ -17,28 +18,29 @@ all: ${TARGET}
${TARGET}: vn_up install_files showit vn_down
vn_up: blank_filesystem
- vnconfig vnd0 ${TARGET}
- disklabel -w vnd0 miniroot
- newfs -m 0 -f 1024 -b 8192 /dev/rvnd0a
- mount /dev/vnd0a /mnt
+ vnconfig -v ${TARGET} > vnd
+ disklabel -w `cat vnd` miniroot
+ newfs -m 0 -f 1024 -b 8192 /dev/r`cat vnd`a
+ mount /dev/`cat vnd`a ${MOUNT_POINT}
showit:
- df -ki /mnt
+ df -ki ${MOUNT_POINT}
vn_down:
- -umount /mnt
- -vnconfig -u vnd0
+ umount ${MOUNT_POINT}
+ vnconfig -u `cat vnd`
+ rm -f vnd
install_files: bsd.rd boot
bsd.rd:
install -c -m 555 -o root -g wheel \
- ${.OBJDIR}/../ramdisk/bsd.rd /mnt/bsd
+ ${.OBJDIR}/../ramdisk/bsd.rd ${MOUNT_POINT}/bsd
boot:
install -c -m 555 -o root -g wheel \
- ${DESTDIR}/usr/mdec/boot /mnt/boot
- ln /mnt/boot /mnt/vmunix
+ ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
+ ln ${MOUNT_POINT}/boot ${MOUNT_POINT}/vmunix
blank_filesystem:
dd if=/dev/zero of=${TARGET} bs=32k count=128 # 4MB
@@ -46,8 +48,8 @@ blank_filesystem:
.endif
unconfig:
- -umount -f /mnt
- -vnconfig -u /dev/vnd0a
+ -umount -f ${MOUNT_POINT}
+ -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd
.ifdef RELEASEDIR
install: