commit d86d4a8191372e243092137f1f1c33c380154398
parent 33d39f5f75df2b659a536768cfecce3b259ee73f
Author: sin <sin@2f30.org>
Date: Mon, 13 Feb 2017 11:06:45 +0000
Build SP kernel if ncpu is 1
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sysbuild b/sysbuild
@@ -7,9 +7,14 @@
# sysbuild k && reboot
# sysbuild w x f && reboot
+K=GENERIC.MP
+
+NCPU=$(sysctl -n hw.ncpufound)
+((NCPU == 1)) && K=GENERIC
+
upgradekernel() {
rm -rf /usr/obj/sys
- cd /usr/src/sys/arch/$(machine)/compile/GENERIC.MP
+ cd /usr/src/sys/arch/$(machine)/compile/$K
make obj
make config
make