Subject: Kernel config file
To: None <tech-kern@NetBSD.org>
From: Jared D.McNeill <jmcneill@invisible.ca>
List: tech-kern
Date: 06/17/2007 10:47:53
Heyas folks --

I've whipped up a proof of concept kernel config file loader for  
i386. I'm sure it could be extended to do pretty much anything, but  
for now all that is implemented is scripting of USERCONF. This lets  
you do things like disable ACPI without having to 'boot -c' every time.

The plist file loaded is kernelname.plist, and looks like this:

	$ cat /netbsd.plist
	<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"  
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
	<plist version="1.0">
	<dict>
	        <key>userconf</key>
	        <array>
	                <string>disable acpi</string>
	                <string>disable isapnp</string>
	                <string>disable mca</string>
	                <string>disable eisa</string>
	                <string>disable pcmcia</string>
	        </array>
	</dict>
	</plist>

This results in the following output at boot:

	userconf: loading settings from boot plist
	[488] acpi0 disabled
	[368] isapnp0 disabled
	[397] mca0 disabled
	[393] eisa0 disabled
	[394] eisa0 disabled
	[412] pcmcia* disabled
	[413] pcmcia* disabled
	[414] pcmcia* disabled

Thoughts? Comments? A patch is available here:

	http://www.invisible.ca/~jmcneill/netbsd/bootplist.patch

Cheers,
Jared