summaryrefslogtreecommitdiff
path: root/distrib/i386/iso
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/i386/iso
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/i386/iso')
-rw-r--r--distrib/i386/iso/Makefile29
1 files changed, 10 insertions, 19 deletions
diff --git a/distrib/i386/iso/Makefile b/distrib/i386/iso/Makefile
index 7f8aa8cd91f..13227fda7af 100644
--- a/distrib/i386/iso/Makefile
+++ b/distrib/i386/iso/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.15 2019/03/05 23:26:53 deraadt Exp $
+# $OpenBSD: Makefile,v 1.16 2019/04/28 14:48:10 deraadt Exp $
TOP= ${.CURDIR}/..
@@ -10,8 +10,6 @@ FS= install${REV}.fs
FSSIZE= 921600
FSTYPE= install360
-RAMDISK= RAMDISK_CD
-
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
@@ -26,27 +24,21 @@ BASE= ${RELDIR}/base${OSrev}.tgz ${RELDIR}/comp${OSrev}.tgz \
XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \
${RELXDIR}/xshare${OSrev}.tgz ${RELXDIR}/xserv${OSrev}.tgz
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-VND_CRDEV= /dev/r${VND}c
BOOT?= ${DESTDIR}/usr/mdec/boot
-PID!= echo $$$$
-REALIMAGE!= echo /var/tmp/image.${PID}
all: ${CDROM} ${FS}
${FS}: ${BASE} ${XBASE} bsd.gz
- dd if=/dev/zero of=${REALIMAGE} bs=512 count=${FSSIZE}
- vnconfig -v -c ${VND} ${REALIMAGE}
- fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr ${VND}
- disklabel -w ${VND} ${FSTYPE}
- newfs -m 0 -o space -i 524288 -c ${FSSIZE} ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
+ dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
+ vnconfig -v ${FS} > vnd
+ fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
+ disklabel -w `cat vnd` ${FSTYPE}
+ newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
+ mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${BOOT} ${MOUNT_POINT}/boot
strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot
dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512
- installboot -v -r ${MOUNT_POINT} ${VND_CRDEV} \
+ installboot -v -r ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/biosboot ${MOUNT_POINT}/boot
mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE}
mkdir -p ${MOUNT_POINT}/etc
@@ -63,9 +55,8 @@ ${FS}: ${BASE} ${XBASE} bsd.gz
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
- vnconfig -u ${VND}
- cp ${REALIMAGE} ${FS}
- rm ${REALIMAGE}
+ vnconfig -u `cat vnd`
+ rm -f vnd
${CDROM}: ${BASE} ${XBASE}
-rm -rf ${.OBJDIR}/cd-dir