From 9d86d69785ee06628c43c0a4f97e0142135df6af Mon Sep 17 00:00:00 2001 From: visa Date: Thu, 18 Jan 2018 14:04:04 +0000 Subject: [PATCH] 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@ --- distrib/octeon/ramdisk/install.md | 10 ++++++++-- 1 file 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 -- 2.20.1