I have a new machine where I'd like to use IPMI. Of course, doing `config -e -f /bsd` will break KARL, so I tried to find a minimal way of supporting this. Done by introducing a new config file, /etc/kernel.conf, which gets applied to the kernel reorder_kernel builds and installs.
Paul 'WEiRD' de Weerd Index: reorder_kernel.sh =================================================================== RCS file: /home/OpenBSD/cvs/src/libexec/reorder_kernel/reorder_kernel.sh,v retrieving revision 1.9 diff -u -p -r1.9 reorder_kernel.sh --- reorder_kernel.sh 28 Sep 2019 17:30:07 -0000 1.9 +++ reorder_kernel.sh 24 Aug 2021 07:01:10 -0000 @@ -63,6 +63,7 @@ fi cd $KERNEL_DIR/$KERNEL make newbsd +[ -f /etc/kernel.conf ] && config -e -c /etc/kernel.conf -f bsd make newinstall sync Index: Makefile =================================================================== RCS file: /home/OpenBSD/cvs/src/libexec/reorder_kernel/Makefile,v retrieving revision 1.1 diff -u -p -r1.1 Makefile --- Makefile 21 Aug 2017 21:24:11 -0000 1.1 +++ Makefile 24 Aug 2021 07:23:38 -0000 @@ -1,6 +1,7 @@ # $OpenBSD: Makefile,v 1.1 2017/08/21 21:24:11 rpe Exp $ SCRIPT= reorder_kernel.sh +MAN= kernel.conf.5 realinstall: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ Index: kernel.conf.5 =================================================================== RCS file: kernel.conf.5 diff -N kernel.conf.5 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ kernel.conf.5 24 Aug 2021 07:23:07 -0000 @@ -0,0 +1,46 @@ +.\" $OpenBSD$ +.\" +.\" Copyright (c) 2021 Paul de Weerd <we...@weirdnet.nl> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: August 24 2021 $ +.Dt KERNEL.CONF 5 +.Os +.Sh NAME +.Nm kernel.conf +.Nd kernel configuration file +.Sh DESCRIPTION +The +.Nm +file contains configuration information for the kernel. +If present, it is used during system startup to configure the kernel +that will be running at the next boot. +It can be used to enable or disable specific devices in the kernel. +.Sh EXAMPLES +To enable the +.Xr ipmi 4 +driver, add the following line to +.Nm : +.Pp +.Dl enable ipmi +.Pp +See +.Xr config 8 +for more details on how to configure the kernel. +.Sh FILES +.Bl -tag -width /etc/kernel.conf -compact +.It Pa /etc/kernel.conf +Kernel configuration file. +.Sh SEE ALSO +.Xr config 8 -- >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+ +++++++++++>-]<.>++[<------------>-]<+.--------------.[-] http://www.weirdnet.nl/