summaryrefslogtreecommitdiff
path: root/distrib/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/amd64')
-rw-r--r--distrib/amd64/iso/Makefile37
-rw-r--r--distrib/amd64/ramdiskA/Makefile.inc36
-rw-r--r--distrib/amd64/ramdisk_cd/Makefile.inc45
3 files changed, 44 insertions, 74 deletions
diff --git a/distrib/amd64/iso/Makefile b/distrib/amd64/iso/Makefile
index 57216582bd0..fb97a523fb7 100644
--- a/distrib/amd64/iso/Makefile
+++ b/distrib/amd64/iso/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.22 2019/03/05 23:26:53 deraadt Exp $
+# $OpenBSD: Makefile,v 1.23 2019/04/28 14:48:09 deraadt Exp $
TOP= ${.CURDIR}/..
@@ -10,8 +10,6 @@ FS= install${REV}.fs
FSSIZE= 921536
FSTYPE= install360
-RAMDISK= RAMDISK_CD
-
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
@@ -26,16 +24,8 @@ 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
-VND_IDEV= /dev/${VND}i
-VND_IRDEV= /dev/r${VND}i
BOOT?= ${DESTDIR}/usr/mdec/boot
EFIBOOT?= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI
-PID!= echo $$$$
-REALIMAGE!= echo /var/tmp/image.${PID}
MSDOSSIZE= 960
TOTALSIZE!= expr ${FSSIZE} + ${MSDOSSIZE}
TEMPLATE= ${.CURDIR}/template
@@ -43,26 +33,26 @@ TEMPLATE= ${.CURDIR}/template
all: ${CDROM} ${FS}
${FS}: ${BASE} ${XBASE} bsd.gz
- dd if=/dev/zero of=${REALIMAGE} bs=512 count=${TOTALSIZE}
- vnconfig -v -c ${VND} ${REALIMAGE}
- fdisk -yi -l ${FSSIZE} -b ${MSDOSSIZE} -f ${DESTDIR}/usr/mdec/mbr ${VND}
+ dd if=/dev/zero of=${FS} bs=512 count=${TOTALSIZE}
+ vnconfig -v ${FS} > vnd
+ fdisk -yi -l ${FSSIZE} -b ${MSDOSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
.ifdef TEMPLATE
- disklabel -wAT ${TEMPLATE} ${VND}
- newfs -t msdos ${VND_IRDEV}
- mount ${VND_IDEV} ${MOUNT_POINT}
+ disklabel -wAT ${TEMPLATE} `cat vnd`
+ newfs -t msdos /dev/r`cat vnd`i
+ mount /dev/`cat vnd`i ${MOUNT_POINT}
mkdir -p ${MOUNT_POINT}/efi/boot
cp ${EFIBOOT} ${MOUNT_POINT}/efi/boot
umount ${MOUNT_POINT}
.else
- disklabel -w ${VND} ${FSTYPE}
+ disklabel -w `cat vnd` ${FSTYPE}
.endif
- newfs -m 0 -o space -i 524288 -c ${FSSIZE} ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
+ 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 ${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
@@ -79,9 +69,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
diff --git a/distrib/amd64/ramdiskA/Makefile.inc b/distrib/amd64/ramdiskA/Makefile.inc
index fdb9e5341e0..282d9122f83 100644
--- a/distrib/amd64/ramdiskA/Makefile.inc
+++ b/distrib/amd64/ramdiskA/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.9 2019/04/14 14:07:07 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.10 2019/04/28 14:48:10 deraadt Exp $
TOP= ${.CURDIR}/..
@@ -10,14 +10,6 @@ MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
FS?= floppy${REV}.fs
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-VND_CRDEV= /dev/r${VND}c
-VND_IDEV= /dev/${VND}i
-VND_IRDEV= /dev/r${VND}i
-PID!= echo $$$$
-REALIMAGE!= echo /var/tmp/image.${PID}
BOOT?= ${DESTDIR}/usr/mdec/boot
EFIBOOT?= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI
FLOPPYSIZE?= 2880
@@ -26,38 +18,36 @@ FLOPPYTYPE?= floppy3
all: ${FS}
${FS}: bsd.gz
- dd if=/dev/zero of=${REALIMAGE} bs=512 count=${FLOPPYSIZE}
- vnconfig -v -c ${VND} ${REALIMAGE}
+ dd if=/dev/zero of=${FS} bs=512 count=${FLOPPYSIZE}
+ vnconfig -v ${FS} > vnd
.ifdef TEMPLATE
- disklabel -wAT ${TEMPLATE} ${VND}
- newfs -t msdos ${VND_IRDEV}
- mount ${VND_IDEV} ${MOUNT_POINT}
+ disklabel -wAT ${TEMPLATE} `cat vnd`
+ newfs -t msdos /dev/r`cat vnd`i
+ mount /dev/`cat vnd`i ${MOUNT_POINT}
mkdir -p ${MOUNT_POINT}/efi/boot
cp ${EFIBOOT} ${MOUNT_POINT}/efi/boot
umount ${MOUNT_POINT}
.else
- disklabel -w ${VND} ${FLOPPYTYPE}
+ disklabel -w `cat vnd` ${FLOPPYTYPE}
.endif
- newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
+ newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} /dev/r`cat vnd`a
+ mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${BOOT} ${.OBJDIR}/boot
strip ${.OBJDIR}/boot
strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot
- installboot -v -r ${MOUNT_POINT} ${VND_CRDEV} \
+ installboot -v -r ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot
dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
- vnconfig -u ${VND}
- cp ${REALIMAGE} ${FS}
- rm ${REALIMAGE}
+ vnconfig -u `cat vnd`
+ rm -f vnd
unconfig:
-umount -f ${MOUNT_POINT}
- -vnconfig -u ${VND}
-
+ -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd
DISKTYPE= rdroot
MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096
diff --git a/distrib/amd64/ramdisk_cd/Makefile.inc b/distrib/amd64/ramdisk_cd/Makefile.inc
index bd78f227ece..d2d6b0be6b5 100644
--- a/distrib/amd64/ramdisk_cd/Makefile.inc
+++ b/distrib/amd64/ramdisk_cd/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.9 2019/04/14 14:07:07 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.10 2019/04/28 14:48:10 deraadt Exp $
TOP= ${.CURDIR}/..
@@ -10,14 +10,6 @@ MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
FS?= miniroot${REV}.fs
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-VND_CRDEV= /dev/r${VND}c
-VND_IDEV= /dev/${VND}i
-VND_IRDEV= /dev/r${VND}i
-PID!= echo $$$$
-REALIMAGE!= echo /var/tmp/image.${PID}
BOOT?= ${DESTDIR}/usr/mdec/boot
EFIBOOT?= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI
FLOPPYSIZE?= 2880
@@ -26,41 +18,39 @@ FLOPPYTYPE?= floppy3
all: ${FS}
${FS}: bsd.gz
- dd if=/dev/zero of=${REALIMAGE} bs=512 count=${FLOPPYSIZE}
- vnconfig -v -c ${VND} ${REALIMAGE}
+ dd if=/dev/zero of=${FS} bs=512 count=${FLOPPYSIZE}
+ vnconfig -v ${FS} > vnd
.ifdef LBA
- fdisk -yi -l ${FLOPPYSIZE} -b 960 -f ${DESTDIR}/usr/mdec/mbr ${VND}
+ fdisk -yi -l ${FLOPPYSIZE} -b 960 -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
.endif
.ifdef TEMPLATE
- disklabel -wAT ${TEMPLATE} ${VND}
- newfs -t msdos ${VND_IRDEV}
- mount ${VND_IDEV} ${MOUNT_POINT}
+ disklabel -wAT ${TEMPLATE} `cat vnd`
+ newfs -t msdos /dev/r`cat vnd`i
+ mount /dev/`cat vnd`i ${MOUNT_POINT}
mkdir -p ${MOUNT_POINT}/efi/boot
cp ${EFIBOOT} ${MOUNT_POINT}/efi/boot
umount ${MOUNT_POINT}
.else
- disklabel -w ${VND} ${FLOPPYTYPE}
+ disklabel -w `cat vnd` ${FLOPPYTYPE}
.endif
- newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
+ newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} /dev/r`cat vnd`a
+ mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${BOOT} ${.OBJDIR}/boot
strip ${.OBJDIR}/boot
strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot
- installboot -v -r ${MOUNT_POINT} ${VND_CRDEV} \
+ installboot -v -r ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot
dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
- vnconfig -u ${VND}
- cp ${REALIMAGE} ${FS}
- rm ${REALIMAGE}
+ vnconfig -u `cat vnd`
+ rm -f vnd
unconfig:
-umount -f ${MOUNT_POINT}
- -vnconfig -u ${VND}
-
+ -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd
DISKTYPE?= rdroot
MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096
@@ -89,9 +79,10 @@ mr.fs: instbin
sh ${UTILS}/runlist.sh ${LISTS}
rm $@.d/instbin
makefs ${MAKEFSARGS_RD} $@ $@.d
- vnconfig -v -c ${VND} mr.fs
- df -i /dev/${VND}a
- vnconfig -u ${VND}
+ vnconfig -v mr.fs > vnd
+ df -i /dev/`cat vnd`a
+ vnconfig -u `cat vnd`
+ rm -f vnd
.ifdef RELEASEDIR
install: