summaryrefslogtreecommitdiff
path: root/distrib/octeon/ramdisk
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2018-01-18 14:04:05 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2018-01-18 14:04:05 +0000
commitb8149ca9e9a9eb02e2af69ce0615f6e85346e5e9 (patch)
treefea29e4fa54623a854274aa865c84beebafbf1b7 /distrib/octeon/ramdisk
parenta584c6a0934ae1903bcd3ed10a1151bba4a60d06 (diff)
Make the installer use the multiprocessor kernel if there is more
than one core available. When bsd.mp is used, bsd.sp is not copied to the boot partition. Old installations might not have enough space for all bsd.mp, bsd.sp and bsd.rd. OK deraadt@, krw@, pirofti@
Diffstat (limited to 'distrib/octeon/ramdisk')
-rw-r--r--distrib/octeon/ramdisk/install.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/distrib/octeon/ramdisk/install.md b/distrib/octeon/ramdisk/install.md
index a93e9408b25..3702d668f52 100644
--- a/distrib/octeon/ramdisk/install.md
+++ b/distrib/octeon/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.18 2017/02/20 16:13:35 visa Exp $
+# $OpenBSD: install.md,v 1.19 2018/01/18 14:04:04 visa Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -32,12 +32,18 @@
#
MDDKDEVS='/^[sw]d[0-9] /s/ .*//p;/^octcf[0-9] /s/ .*//p'
+NCPU=$(sysctl -n hw.ncpufound)
md_installboot() {
local _disk=$1
+ local _kernel=/mnt/bsd
+
+ if [[ -f /mnt/bsd.mp ]] && ((NCPU > 1)); then
+ _kernel=/mnt/bsd.mp
+ fi
if mount -t msdos /dev/${_disk}i /mnt2 && \
- cp /mnt/bsd /mnt2/bsd && cp /mnt/bsd.rd /mnt2/bsd.rd; then
+ cp $_kernel /mnt2/bsd && cp /mnt/bsd.rd /mnt2/bsd.rd; then
umount /mnt2
return
fi