Use MI installboot instead of disklabel -B to install boot blocks.
authormiod <miod@openbsd.org>
Thu, 15 Oct 2015 19:28:31 +0000 (19:28 +0000)
committermiod <miod@openbsd.org>
Thu, 15 Oct 2015 19:28:31 +0000 (19:28 +0000)
ok krw@ deraadt@

distrib/vax/common/Makefile.inc
distrib/vax/common/list
distrib/vax/install.md
distrib/vax/iso/Makefile
distrib/vax/ramdisk/Makefile.inc
distrib/vax/ramdisk/list.local

index a7b953e..d05ddbd 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.inc,v 1.10 2013/11/09 22:35:40 miod Exp $
+#      $OpenBSD: Makefile.inc,v 1.11 2015/10/15 19:28:32 miod Exp $
 
 # TOP is assumed to be defined by Makefile including this one.
 
@@ -35,23 +35,17 @@ all: ${CBIN} bootroot
        umount -f ${MOUNT_POINT}
        vnconfig -u ${VND}
 
-bootroot: xxboot boot
+bootroot:
        dd if=/dev/zero of=${BOOTSYS} bs=512 count=8192
        vnconfig -v -c ${VND} ${BOOTSYS}
        disklabel -w ${VND} bootroot
        newfs -O 0 -m 0 -o space -i 8192 ${VND_RDEV}
-       dd if=xxboot of=${VND_RDEV} count=16
        mount ${VND_DEV} ${MOUNT_POINT}
-       cp boot ${MOUNT_POINT}
+       installboot -vr ${MOUNT_POINT} ${VND} \
+           ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot
        umount -f ${MOUNT_POINT}
        vnconfig -u ${VND}
 
-xxboot boot:
-       cd /usr/src/sys/arch/vax/boot;${MAKE}
-       cp /usr/src/sys/arch/vax/boot/xxboot/xxboot .
-       cp /usr/src/sys/arch/vax/boot/boot/boot .
-
-
 unconfig:
        -umount -f ${MOUNT_POINT}
        -vnconfig -u ${VND} ${IMAGE}
index 976caa3..4ec4913 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: list,v 1.40 2015/04/13 21:27:07 deraadt Exp $
+#      $OpenBSD: list,v 1.41 2015/10/15 19:28:32 miod Exp $
 
 SRCDIRS distrib/special
 SRCDIRS sys/arch/vax/stand
@@ -60,9 +60,6 @@ LINK  instbin                                 usr/sbin/pwd_mkdb
 COPY   ${DESTDIR}/dev/MAKEDEV                  dev/MAKEDEV
 SPECIAL        cd dev; sh MAKEDEV ramdisk
 
-# we need the contents of /usr/mdec (XXX)
-# COPY ${DESTDIR}/usr/mdec/*                   usr/mdec
-
 # various files that we need in /etc for the install
 COPY   ${DESTDIR}/etc/group                    etc/group
 COPY   ${CURDIR}/../../miniroot/master.passwd  etc/master.passwd
@@ -73,6 +70,5 @@ COPY  ${CURDIR}/../../miniroot/services       etc/services
 TERMCAP        vt100,vt220,dumb                        usr/share/misc/termcap
 
 COPY   ${DESTDIR}/bsd                          .
-COPY   ${DESTDIR}/boot                         .
 
 TZ
index 043860a..4b77e5f 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: install.md,v 1.45 2015/06/02 19:54:07 rpe Exp $
+#      $OpenBSD: install.md,v 1.46 2015/10/15 19:28:31 miod Exp $
 #      $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
 #
 #
@@ -39,9 +39,11 @@ MDCDDEVS='/^cd[0-9] /s/ .*//p;/^ra[0-9] .* RRD40$/s/ .*//p'
 MDMTDEVS='/^[ms]t[0-9][0-9]* /s/ .*//p'
 
 md_installboot() {
-       # Use cat to avoid holes created by cp(1)
-       cat /mnt/usr/mdec/boot > /mnt/boot
-       /sbin/disklabel -B $1
+       if ! installboot -r /mnt ${1}; then
+               echo "\nFailed to install bootblocks."
+               echo "You will not be able to boot OpenBSD from ${1}."
+               exit
+       fi
 }
 
 md_prep_disklabel() {
index 15c15fc..09696a1 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.15 2014/09/21 13:44:45 deraadt Exp $
+#      $OpenBSD: Makefile,v 1.16 2015/10/15 19:28:32 miod Exp $
 
 TOP=   ${.CURDIR}/..
 
@@ -23,20 +23,19 @@ DISKTYPE=   isoroot
 PID!=          echo $$$$
 ISOIMAGE!=     echo image.${PID}
 ISOSIZE=       798600  # 33*11*2200
-BOOT=          ${DESTDIR}/usr/mdec/boot
-BOOTXX=                ${DESTDIR}/usr/mdec/xxboot
 NEWFSOPTS=     -t ffs -m 0 -o space -f 1024 -b 8192 -i 8192 -s ${ISOSIZE}
 
 all: ${CDROM}
 
-${CDROM}: ${BASE} ${XBASE} ${BOOT} ${BOOTXX}
+${CDROM}: ${BASE} ${XBASE}
        -rm -f ${.OBJDIR}/image.*
        dd if=/dev/zero of=${ISOIMAGE} count=${ISOSIZE}
        vnconfig -v -c ${VND} ${ISOIMAGE}
        disklabel -w ${VND} ${DISKTYPE}
        newfs ${NEWFSOPTS} ${VND_RDEV}
        mount ${VND_DEV} ${MOUNT_POINT}
-       cp ${BOOT} ${MOUNT_POINT}/
+       installboot -vr ${MOUNT_POINT} ${VND} \
+           ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot
        cp ${RELDIR}/bsd.rd ${MOUNT_POINT}/bsd
        mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE}
 
@@ -47,7 +46,6 @@ ${CDROM}: ${BASE} ${XBASE} ${BOOT} ${BOOTXX}
            ${MOUNT_POINT}/${OSREV}/${MACHINE}/SHA256
        # XXX no SHA256.sig
 
-       disklabel -B -b ${BOOTXX} ${VND}
        @echo ""
        @df -i ${MOUNT_POINT}
        @echo ""
index c09f7a5..caa9884 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.inc,v 1.7 2007/06/17 00:28:21 deraadt Exp $
+#      $OpenBSD: Makefile.inc,v 1.8 2015/10/15 19:28:32 miod Exp $
 
 IMAGESIZE=             3072
 GZIPCMD?=              gzip
@@ -10,6 +10,5 @@ MAKEFLOPPY=           1
 #NEWFSOPTS_RD= -t ffs -m 0 -o space -f 1024 -i 16384 -s 8192
 HOSTCCFLAGS=           -DDEBUG -O0
 #HOSTCCFLAGS=          -DBROKEN_NMAGIC -DDEBUG
-BOOTXX=                        ${DESTDIR}/usr/mdec/sdboot
-INSTALLBOOT=           @true --                # totally incredible
 NEWFSOPTS_RD=          ${NEWFSOPTS} -i 4096 -s ${IMAGESIZE}
+BOOTXX=                        ${DESTDIR}/usr/mdec/xxboot
index f9cc17e..24ce9d1 100644 (file)
@@ -1,10 +1,11 @@
-#      $OpenBSD: list.local,v 1.3 2015/04/02 20:51:04 deraadt Exp $
+#      $OpenBSD: list.local,v 1.4 2015/10/15 19:28:32 miod Exp $
 #      $NetBSD: list,v 1.2.4.2 1996/06/26 19:25:00 pk Exp $
 
 # extras
 LINK   instbin                                 sbin/disklabel
 LINK   instbin                                 usr/bin/grep usr/bin/egrep usr/bin/fgrep
 LINK   instbin                                 usr/bin/more usr/bin/less
+LINK   instbin                                 usr/sbin/installboot
 
 SYMLINK        /tmp    var/tmp
 
@@ -12,13 +13,6 @@ SYMLINK      /tmp    var/tmp
 SCRIPT ${DESTDIR}/dev/MAKEDEV                  dev/MAKEDEV
 SPECIAL        cd dev; sh MAKEDEV ramdisk
 
-# for disklabel(8) -B
-COPY   ${DESTDIR}/usr/mdec/xxboot              usr/mdec/xxboot
-LINK   usr/mdec/xxboot                         usr/mdec/hpboot
-LINK   usr/mdec/xxboot                         usr/mdec/raboot
-LINK   usr/mdec/xxboot                         usr/mdec/rdboot
-LINK   usr/mdec/xxboot                         usr/mdec/sdboot
-
 # various files that we need in /etc for the install
 SYMLINK        /tmp/fstab.shadow                       etc/fstab
 SYMLINK        /tmp/resolv.conf.shadow                 etc/resolv.conf