summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
Diffstat (limited to 'distrib')
-rw-r--r--distrib/loongson/ramdisk/install.md20
-rw-r--r--distrib/loongson/ramdisk/list3
-rw-r--r--distrib/macppc/ramdisk/install.md16
-rw-r--r--distrib/macppc/ramdisk/list3
-rw-r--r--distrib/octeon/ramdisk/install.md16
-rw-r--r--distrib/octeon/ramdisk/list3
-rw-r--r--distrib/special/installboot/Makefile12
7 files changed, 27 insertions, 46 deletions
diff --git a/distrib/loongson/ramdisk/install.md b/distrib/loongson/ramdisk/install.md
index ab8f254e106..48185267d35 100644
--- a/distrib/loongson/ramdisk/install.md
+++ b/distrib/loongson/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.27 2017/01/22 23:43:54 rpe Exp $
+# $OpenBSD: install.md,v 1.28 2020/06/27 15:35:27 deraadt Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -32,21 +32,11 @@
#
md_installboot() {
- local _disk=$1
-
- # Use cat below to avoid holes created by cp(1)
- if mount -t ext2fs /dev/${_disk}i /mnt2 &&
- mkdir -p /mnt2/boot &&
- cat /mnt/usr/mdec/boot > /mnt2/boot/boot &&
- { [[ $(sysctl -n hw.product) != Gdium ]] ||
- cp /mnt/bsd /mnt2/boot/bsd; }; then
- umount /mnt2
- return
+ if ! installboot -r /mnt ${1}; then
+ echo "\nFailed to install bootblocks."
+ echo "You will not be able to boot OpenBSD from ${1}."
+ exit
fi
-
- echo "Failed to install bootblocks."
- echo "You will not be able to boot OpenBSD from $_disk."
- exit
}
md_prep_fdisk() {
diff --git a/distrib/loongson/ramdisk/list b/distrib/loongson/ramdisk/list
index 744ec387529..a3922bbc08b 100644
--- a/distrib/loongson/ramdisk/list
+++ b/distrib/loongson/ramdisk/list
@@ -1,4 +1,4 @@
-# $OpenBSD: list,v 1.34 2019/06/07 14:39:57 deraadt Exp $
+# $OpenBSD: list,v 1.35 2020/06/27 15:35:27 deraadt Exp $
SRCDIRS distrib/special
@@ -62,6 +62,7 @@ LINK instbin usr/bin/sed
LINK instbin usr/bin/signify
LINK instbin usr/bin/tee
LINK instbin usr/sbin/chroot
+LINK instbin usr/sbin/installboot
LINK instbin usr/sbin/pwd_mkdb
ARGVLINK ksh -sh
SPECIAL rm bin/md5
diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md
index a23199712fe..48b7e72c9d6 100644
--- a/distrib/macppc/ramdisk/install.md
+++ b/distrib/macppc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.72 2017/12/01 18:13:48 stsp Exp $
+# $OpenBSD: install.md,v 1.73 2020/06/27 15:35:29 deraadt Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -36,16 +36,10 @@ MDXDM=y
NCPU=$(sysctl -n hw.ncpufound)
md_installboot() {
- local _disk=$1
-
- # If there is an MSDOS partition on the boot disk, copy ofwboot
- # into it.
- if disk_has $_disk mbr openbsd; then
- if mount /dev/${_disk}i /mnt2 >/dev/null 2>&1; then
- # Use cat to avoid holes created by cp(1)
- cat /mnt/usr/mdec/ofwboot > /mnt2/ofwboot
- umount /mnt2
- fi
+ if ! installboot -r /mnt ${1}; then
+ echo "\nFailed to install bootblocks."
+ echo "You will not be able to boot OpenBSD from ${1}."
+ exit
fi
}
diff --git a/distrib/macppc/ramdisk/list b/distrib/macppc/ramdisk/list
index 72e7c40cb47..4757e6e59c5 100644
--- a/distrib/macppc/ramdisk/list
+++ b/distrib/macppc/ramdisk/list
@@ -1,4 +1,4 @@
-# $OpenBSD: list,v 1.72 2019/06/07 14:39:57 deraadt Exp $
+# $OpenBSD: list,v 1.73 2020/06/27 15:35:29 deraadt Exp $
SRCDIRS distrib/special
@@ -60,6 +60,7 @@ LINK instbin usr/bin/sed
LINK instbin usr/bin/signify
LINK instbin usr/bin/tee
LINK instbin usr/sbin/chroot
+LINK instbin usr/sbin/installboot
LINK instbin usr/sbin/pwd_mkdb
ARGVLINK ksh -sh
SPECIAL rm bin/md5
diff --git a/distrib/octeon/ramdisk/install.md b/distrib/octeon/ramdisk/install.md
index dce66a9902e..cda3c5d3a2b 100644
--- a/distrib/octeon/ramdisk/install.md
+++ b/distrib/octeon/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.21 2020/06/24 03:54:02 deraadt Exp $
+# $OpenBSD: install.md,v 1.22 2020/06/27 15:35:29 deraadt Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -35,17 +35,11 @@ MDDKDEVS='/^[sw]d[0-9] /s/ .*//p;/^octcf[0-9] /s/ .*//p'
NCPU=$(sysctl -n hw.ncpufound)
md_installboot() {
- local _disk=$1
-
- if mount -t msdos /dev/${_disk}i /mnt2 && \
- cp /mnt/usr/mdec/boot /mnt2/boot; then
- umount /mnt2
- return
+ if ! installboot -r /mnt ${1}; then
+ echo "\nFailed to install bootblocks."
+ echo "You will not be able to boot OpenBSD from ${1}."
+ exit
fi
-
- echo "Failed to install bootblocks."
- echo "You will not be able to boot OpenBSD from $_disk."
- exit
}
md_prep_fdisk() {
diff --git a/distrib/octeon/ramdisk/list b/distrib/octeon/ramdisk/list
index f2b5f48821c..f7cd15c9cfe 100644
--- a/distrib/octeon/ramdisk/list
+++ b/distrib/octeon/ramdisk/list
@@ -1,4 +1,4 @@
-# $OpenBSD: list,v 1.27 2019/06/07 14:39:57 deraadt Exp $
+# $OpenBSD: list,v 1.28 2020/06/27 15:35:29 deraadt Exp $
SRCDIRS distrib/special
@@ -59,6 +59,7 @@ LINK instbin usr/bin/sed
LINK instbin usr/bin/signify
LINK instbin usr/bin/tee
LINK instbin usr/sbin/chroot
+LINK instbin usr/sbin/installboot
LINK instbin usr/sbin/pwd_mkdb
ARGVLINK ksh -sh
SPECIAL rm bin/md5
diff --git a/distrib/special/installboot/Makefile b/distrib/special/installboot/Makefile
index 95977cc845d..2f518355cc3 100644
--- a/distrib/special/installboot/Makefile
+++ b/distrib/special/installboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2019/05/11 07:18:15 deraadt Exp $
+# $OpenBSD: Makefile,v 1.12 2020/06/27 15:35:29 deraadt Exp $
.PATH: ${.CURDIR}/../../../usr.sbin/installboot
@@ -21,11 +21,11 @@ SRCS += i386_softraid.c
.endif
.if ${MACHINE} == "arm64"
-SRCS += stubs.c
+SRCS += armv7_installboot.c
.endif
.if ${MACHINE} == "armv7"
-SRCS += stubs.c
+SRCS += armv7_installboot.c
.endif
.if ${MACHINE} == "hppa"
@@ -46,7 +46,7 @@ SRCS += landisk_installboot.c
.endif
.if ${MACHINE} == "loongson"
-SRCS += stubs.c
+SRCS += octeon_installboot.c
.endif
.if ${MACHINE} == "luna88k"
@@ -54,11 +54,11 @@ SRCS += stubs.c
.endif
.if ${MACHINE} == "macppc"
-SRCS += stubs.c
+SRCS += macppc_installboot.c
.endif
.if ${MACHINE} == "octeon"
-SRCS += stubs.c
+SRCS += octeon_installboot.c
.endif
.if ${MACHINE} == "sgi"