diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-28 14:48:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-28 14:48:12 +0000 |
commit | 1c24a7b4a2202b4c466248a03b661fcf6c40e35e (patch) | |
tree | 2214f1f048822bc64f69b522c02a32f6e17d0c80 /distrib/loongson | |
parent | baeb4d23783efa1dd62e7c43c3296b8e6fad6a0d (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/loongson')
-rw-r--r-- | distrib/loongson/miniroot/Makefile | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/distrib/loongson/miniroot/Makefile b/distrib/loongson/miniroot/Makefile index f20bb1c234b..cf655941d3e 100644 --- a/distrib/loongson/miniroot/Makefile +++ b/distrib/loongson/miniroot/Makefile @@ -6,19 +6,9 @@ IMAGE= miniroot${REV}.fs MOUNT_POINT= /mnt -VND?= vnd0 -VND_DEV= /dev/${VND}a -VND_CDEV= /dev/${VND}c -VND_IDEV= /dev/${VND}i -VND_RDEV= /dev/r${VND}a -VND_CRDEV= /dev/r${VND}c -VND_RIDEV= /dev/r${VND}i -PID!= echo $$$$ - DISKTYPE= miniroot NBLKS= 18432 - .ifndef DESTDIR all ${IMAGE}: @echo setenv DESTDIR before making a ramdisk! @@ -35,22 +25,21 @@ do_files: rd_setup: dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -c -t ${DISKTYPE} ${VND} ${IMAGE} - echo 'u\ne 0\n83\n\n63\n*\nw\nq\n' | fdisk -e ${VND} > /dev/null - echo 'w\ny\nq\n' | disklabel -E ${VND} > /dev/null - newfs_ext2fs ${VND_RIDEV} - fsck_ext2fs ${VND_RIDEV} - mount ${VND_IDEV} ${MOUNT_POINT} + vnconfig -v -t ${DISKTYPE} ${IMAGE} > vnd + echo 'u\ne 0\n83\n\n63\n*\nw\nq\n' | fdisk -e `cat vnd` > /dev/null + echo 'w\ny\nq\n' | disklabel -E `cat vnd` > /dev/null + newfs_ext2fs /dev/r`cat vnd`i + mount /dev/`cat vnd`i ${MOUNT_POINT} rd_teardown: @df -i ${MOUNT_POINT} -umount ${MOUNT_POINT} - -vnconfig -u ${VND} - + vnconfig -u `cat vnd` + rm -f vnd unconfig: -umount -f ${MOUNT_POINT} - -vnconfig -u ${VND} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .PRECIOUS: ${IMAGE} |