Trimming the OpenBSD kernel
I've been building a few OpenBSD custom kernels lately and I've noticed that you can really strip it down a bit.
Ok, here's size of the GENERIC kernel that is installed by default:
[root@fw:/]$ du -sh bsd.GENERIC 5.1M bsd.GENERIC
The GENERIC kernel comes loaded with a lot of stuff, including
PCMCIA/USB/SCSI/Audio/Radio etc. In the first kernel I compiled I didn't remove
much, mainly SCSI and audio support. This was the result:
[root@fw:/]$ du -sh bsd.old 4.3M bsd.old
I wanted to remove even more drivers from it so I stripped it down ever further. This was the result of the second kernel:
[root@fw:/FW]$ du -sh /bsd 2.9M /bsd
As you can see, I managed to remove 2.2M from the GENERIC kernel.
Final config
Here is my final config file:
# $OpenBSD: GENERIC,v 1.431 2005/08/16 16:40:48 deraadt Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
#
# For further information on hardware support for this architecture, see
# the intro(4) man page. For further information about kernel options
# for this architecture, see the options(4) man page. For an explanation
# of each device driver in this file see the section 4 man page for the
# device.
machine i386
include "../../../conf/GENERIC"
maxusers 32 # estimated number of users
#option I386_CPU # CPU classes; at least one is REQUIRED
#option I486_CPU
#option I586_CPU
option I686_CPU
#option GPL_MATH_EMULATE # floating point emulation.
option USER_PCICONF # user-space PCI configuration
#option VM86 # Virtual 8086 emulation
option USER_LDT # user-settable LDT; see i386_set_ldt(2)
option APERTURE # in-kernel aperture driver for XFree86
#option KGDB # Remote debugger support; exclusive of DDB
#option "KGDB_DEVNAME=\"pccom\"",KGDBADDR=0x2f8,KGDBRATE=9600
#option DUMMY_NOPS # speed hack; recommended
option COMPAT_SVR4 # binary compatibility with SVR4
option COMPAT_IBCS2 # binary compatibility with SCO and ISC
option COMPAT_LINUX # binary compatibility with Linux
option COMPAT_FREEBSD # binary compatibility with FreeBSD
option COMPAT_BSDOS # binary compatibility with BSD/OS
option COMPAT_AOUT # a.out binaries are emulated
#option NTFS # Experimental NTFS support
# or use root on nfs swap on nfs
config bsd swap generic
mainbus0 at root
cpu0 at mainbus?
bios0 at mainbus0
apm0 at bios0 flags 0x0000 # flags 0x0101 to force protocol version 1.1
pcibios0 at bios0 flags 0x0000 # use 0x30 for a total verbose
isa0 at mainbus0
isa0 at pcib?
isa0 at ichpcib?
isa0 at gscpcib?
eisa0 at mainbus0
pci* at mainbus0
#acpi0 at mainbus?
#acpitimer* at acpi?
#hpet* at acpi?
option ACPIVERBOSE
#option ACPI_ENABLE
option PCIVERBOSE
option EISAVERBOSE
#option USBVERBOSE
pchb* at pci? # PCI-Host bridges
ppb* at pci? # PCI-PCI bridges
pci* at ppb?
pci* at pchb?
pcib* at pci? # PCI-ISA bridge
ichpcib* at pci? # Intel ICHx/ICHx-M LPC bridges
gscpcib* at pci? # NS Geode SC1100 PCI-ISA bridge
gpio* at gscpcib?
# power management and other environmental stuff
#amdpm* at pci? # AMD768MPX
elansc* at pci? # AMD Elan SC520 System Controller
gpio* at elansc?
geodesc* at pci? # Geode SC1100/SCx200 IAOC
#piixpm* at pci? # Intel PIIX PM
#gscpm* at pci? # NS Geode SC1100 SMI/ACPI module
#ichwdt* at pci? # Intel 6300ESB ICH watchdog timer
# National Semiconductor LM7[89] and compatible hardware monitors
lm0 at isa? port 0x290
#lm1 at isa? port 0x280
#lm2 at isa? port 0x310
nsclpcsio* at isa? port 0x2e # NS PC87366 LPC Super I/O
nsclpcsio* at isa? port 0x4e
gpio* at nsclpcsio?
gscsio* at isa? port 0x2e # NS Geode SC1100 Super I/O
gscsio* at isa? port 0x15c
iic0 at gscsio? # ACCESS.bus 1
iic1 at gscsio? # ACCESS.bus 2
lmtemp0 at iic1 addr 0x48 # NS LM75/LM77 temperature sensor
it0 at isa? port 0x290 # IT8705F, IT8712F and SiS970 hardware
# monitors
viaenv* at pci? # VIA VT82C686A hardware monitor
viasio* at isa? port 0x2e flags 0x0000 # VIA VT1211 LPC Super I/O
viasio* at isa? port 0x4e flags 0x0000
aps0 at isa? port 0x1600 # ThinkPad Active Protection System
# ISA PCMCIA controllers
#option PCMCIAVERBOSE
#pcic0 at isa? port 0x3e0 iomem 0xd0000 iosiz 0x10000
#pcic1 at isa? port 0x3e2 iomem 0xe0000 iosiz 0x4000
#pcic2 at isa? port 0x3e4 iomem 0xe0000 iosiz 0x4000
#tcic0 at isa? disable port 0x240 iomem 0xd0000 iosiz 0x10000
# ISA Plug-and-Play PCMCIA controllers
#option DEBUG_ISAPNP
#pcic* at isapnp?
# PCI PCMCIA controllers
pcic* at pci?
# PCMCIA bus support
pcmcia* at pcic?
#pcmcia* at tcic?
# CardBus bus support
cardbus* at cardslot?
#pcmcia* at cardslot?
cbb* at pci?
cardslot* at cbb?
# USB Controllers
#ehci* at pci? # Enhanced Host Controller
#ehci* at cardbus? # Enhanced Host Controller
#uhci* at pci? # Universal Host Controller (Intel)
#ohci* at pci? # Open Host Controller
#ohci* at cardbus? # Open Host Controller
# USB bus support
#usb* at ehci?
#usb* at uhci?
#usb* at ohci?
# USB devices
#uhub* at usb? # USB Hubs
#uhub* at uhub? # USB Hubs
#umodem* at uhub? # USB Modems/Serial
#ucom* at umodem?
#uvisor* at uhub? # Handspring Visor
#ucom* at uvisor?
#uvscom* at uhub? # SUNTAC Slipper U VS-10U serial
#ucom* at uvscom?
#ubsa* at uhub? # Belkin serial adapter
#ucom* at ubsa?
#uftdi* at uhub? # FTDI FT8U100AX serial adapter
#ucom* at uftdi?
#uplcom* at uhub? # I/O DATA USB-RSAQ2 serial adapter
#ucom* at uplcom?
#umct* at uhub? # MCT USB-RS232 serial adapter
#ucom* at umct?
#uipaq* at uhub? # iPAQ serial adapter
#ucom* at uipaq?
#uaudio* at uhub? # USB Audio
#audio* at uaudio?
#umidi* at uhub? # USB MIDI
#midi* at umidi?
#ulpt* at uhub? # USB Printers
#umass* at uhub? # USB Mass Storage devices
#scsibus* at umass?
#atapiscsi* at umass?
#uhidev* at uhub? # Human Interface Devices
#ums* at uhidev? # USB mouse
#wsmouse* at ums? mux 0
#ukbd* at uhidev? # USB keyboard
#wskbd* at ukbd? mux 1
#uhid* at uhidev? # USB generic HID support
#aue* at uhub? # ADMtek AN986 Pegasus Ethernet
#atu* at uhub? # Atmel AT76c50x based 802.11b
#axe* at uhub? # ASIX Electronics AX88172 USB Ethernet
#cue* at uhub? # CATC USB-EL1201A based Ethernet
#kue* at uhub? # Kawasaki KL5KUSB101B based Ethernet
#cdce* at uhub? # CDC Ethernet
#upl* at uhub? # Prolific PL2301/PL2302 host-to-host `network'
#udav* at uhub? # Davicom DM9601 based Ethernet
#url* at uhub? # Realtek RTL8150L based adapters
#wi* at uhub? # WaveLAN IEEE 802.11DS
#urio* at uhub? # Diamond Multimedia Rio 500
#uscanner* at uhub? # USB Scanners
#usscanner* at uhub? # USB SCSI scanners, e.g., HP5300
#scsibus* at usscanner?
#uyap* at uhub? # Y@P firmware loader
#udsbr* at uhub? # D-Link DSB-R100 radio
#radio* at udsbr? # USB radio
#ubt* at uhub? # USB Bluetooth
#ugen* at uhub? # USB Generic driver
#ural* at uhub? # Ralink RT2500
#option NATM
#ueagle* at uhub? # Analog Devices Eagle ADSL
puc* at pci? # PCI "universal" communication device
npx0 at isa? port 0xf0 irq 13 # math coprocessor
isadma0 at isa?
isapnp0 at isa?
option WSDISPLAY_COMPAT_USL # VT handling
option WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
option WSDISPLAY_DEFAULTSCREENS=6
option WSDISPLAY_COMPAT_PCVT # emulate some ioctls
pckbc0 at isa? # PC keyboard controller
pckbd* at pckbc? # PC keyboard
pms* at pckbc? # PS/2 mouse for wsmouse
pmsi* at pckbc? # PS/2 "Intelli"mouse for wsmouse
vga0 at isa?
option PCIAGP
vga* at pci?
pcdisplay0 at isa? # CGA, MDA, EGA, HGA
wsdisplay* at vga?
wsdisplay* at pcdisplay?
wskbd* at pckbd? mux 1
wsmouse* at pms? mux 0
wsmouse* at pmsi? mux 0
pcppi0 at isa?
sysbeep0 at pcppi?
pccom0 at isa? port 0x3f8 irq 4 # standard PC serial ports
pccom1 at isa? port 0x2f8 irq 3
pccom2 at isa? port 0x3e8 irq 5
#pccom3 at isa? port 0x2e8 irq 9 # (conflicts with some video cards)
ast0 at isa? port 0x1a0 irq 5 # AST 4-port serial card
#ast1 at isa? port 0x2a0 irq 6 # 2nd AST 4-port serial card
pccom* at ast?
#boca0 at isa? port 0x100 irq 5 # BOCA 8-port serial cards
#pccom* at boca?
#addcom0 at isa? port 0x108 irq 5 # Addonics FlexPort
#pccom* at addcom?
#rtfps0 at isa? port 0x1230 irq 10 # RT 4-port serial cards
#pccom* at rtfps?
#hsq0 at isa? port 0x140 irq 10 # Hostess 4-port serial card
#pccom* at hsq?
#pccom* at pcmcia? # PCMCIA modems/serial ports
#pccom* at isapnp?
#pccom* at puc?
#pccom* at cardbus?
# option for using CD1400 handshaking for incoming data
# requires a special cable that exchanges the RTS and DTR lines
# options CY_HW_RTS
cy0 at isa? iomem 0xd4000 irq 12 # ISA cyclom serial card
cy* at pci? # PCI cyclom serial card
#cz* at pci? # Cyclades-Z multi-port serial boards
lpt0 at isa? port 0x378 irq 7 # standard PC parallel ports
lpt1 at isa? port 0x278
lpt2 at isa? port 0x3bc
lpt* at puc?
lms0 at isa? port 0x23c irq 5 # Logitech bus mouse
lms1 at isa? port 0x238 irq 5
mms0 at isa? port 0x23c irq 5 # Microsoft InPort mouse
mms1 at isa? port 0x238 irq 5
wsmouse* at lms? mux 0
wsmouse* at mms? mux 0
#bha0 at isa? port 0x330 # BusLogic [57]4X SCSI controllers
#bha1 at isa? disable port 0x334 # BusLogic [57]4X SCSI controllers
#bha2 at isa? disable
#bha* at pci?
#bha* at eisa? # XXX eisa still runs in isa-compat
#scsibus* at bha?
#aha0 at isa? port 0x330 # Adaptec 154[02] SCSI controllers
#aha1 at isa? port 0x334 # Adaptec 154[02] SCSI controllers
#aha* at isapnp?
#scsibus* at aha?
#ahb* at eisa? # Adaptec 174[024] SCSI controllers
#scsibus* at ahb?
#ahc0 at isa? # Adaptec 284x SCSI controllers
#ahc* at eisa? # Adaptec 274x, aic7770 SCSI controllers
#ahc* at pci? # Adaptec 2940/3940/78?? SCSI controllers
#scsibus* at ahc?
#ahd* at pci? # Adaptec 79?? SCSI controllers
#scsibus* at ahd?
#mpt* at pci? # LSI Fusion-MPT SCSI/Fibre
#scsibus* at mpt?
#dpt* at pci? # DPT SmartCache/SmartRAID PCI
#dpt* at eisa? # DPT SmartCache/SmartRAID EISA
#scsibus* at dpt?
#gdt* at pci? # ICP Vortex GDT RAID controllers
#scsibus* at gdt?
#twe* at pci? # 3ware Escalade RAID controllers
#scsibus* at twe?
#aac* at pci? # Adaptec FSA RAID controllers
#scsibus* at aac?
#ami* at pci? # AMI MegaRAID controllers
#scsibus* at ami?
#cac* at pci? # Compaq Smart ARRAY [234]* RAID controllers
#cac* at eisa?
#scsibus* at cac?
#ciss* at pci? # Compaq Smart ARRAY [56]* RAID controllers
#scsibus* at ciss?
#iha* at pci? # Initio Ultra/UltraWide SCSI controllers
#scsibus* at iha?
#isp* at pci? # Qlogic ISP [12]0x0 SCSI/FibreChannel
#scsibus* at isp?
#aic0 at isa? port 0x340 irq 11 # Adaptec 152[02] SCSI controllers
#aic* at pcmcia? # PCMCIA based aic SCSI controllers
#aic* at isapnp? # isapnp configured aic SCSI controllers
#scsibus* at aic?
#esp* at pcmcia? # PCMCIA based NCR 53C9X SCSI
#scsibus* at esp?
#siop* at pci? # NCR 538XX SCSI controllers(new)
#scsibus* at siop?
#adv* at pci? # AdvanSys 1200A/B and ULTRA SCSI
#scsibus* at adv?
#adw* at pci? # AdvanSys ULTRA WIDE SCSI
#scsibus* at adw?
#pcscp* at pci? # AMD 53c974 PCscsi-PCI SCSI
#scsibus* at pcscp?
#sea0 at isa? disable iomem 0xc8000 irq 5 # Seagate ST0[12] SCSI controllers
#scsibus* at sea?
#trm* at pci? # Tekram DC-3x5U SCSI Controllers
#scsibus* at trm?
#uha0 at isa? port 0x330 # UltraStor [13]4f SCSI controllers
#uha1 at isa? disable port 0x334 # UltraStor [13]4f SCSI controllers
#uha* at eisa? # UltraStor 24f SCSI controllers
#scsibus* at uha?
#wds0 at isa? disable port 0x350 irq 15 drq 6 # WD7000 and TMC-7000 controllers
#wds1 at isa? port 0x358 irq 11 drq 5
#scsibus* at wds?
#sd* at scsibus? # SCSI disk drives
#st* at scsibus? # SCSI tape drives
#cd* at scsibus? # SCSI CD-ROM drives
#ch* at scsibus? # SCSI autochangers
#ss* at scsibus? # SCSI scanners
#safte* at scsibus? # SCSI accessed fault-tolerant enclosures
#ses* at scsibus? # SCSI enclosure services
#uk* at scsibus? # unknown SCSI
fdc0 at isa? port 0x3f0 irq 6 drq 2 # standard PC floppy controllers
#fdc1 at isa? port 0x370
fd* at fdc? flags 0x00
#mcd0 at isa? port 0x300 irq 10 # Mitsumi CD-ROM drives
# IDE controllers
pciide* at pci? flags 0x0000
wdc0 at isa? port 0x1f0 irq 14 flags 0x00
wdc1 at isa? port 0x170 irq 15 flags 0x00
#wdc* at pcmcia?
wdc* at isapnp?
# IDE hard drives
wd* at wdc? flags 0x0000
wd* at pciide? flags 0x0000
# ATAPI<->SCSI
#atapiscsi* at wdc?
#atapiscsi* at pciide?
#scsibus* at atapiscsi?
#wt0 at isa? port 0x308 irq 5 drq 1 # Archive and Wangtek QIC tape drives
# Networking devices
#we0 at isa? port 0x280 iomem 0xd0000 irq 9 # WD/SMC 80x3 ethernet
#we1 at isa? port 0x300 iomem 0xcc000 irq 10 #
#we2 at isa? port 0x280 iomem 0xd0000 irq 3 # WD/SMC 80x3 ethernet
#we* at isapnp?
#ec0 at isa? port 0x250 iomem 0xd8000 irq 9 # 3C503 ethernet
#ne0 at isa? port 0x240 irq 9 # NE[12]000 ethernet
#ne1 at isa? port 0x300 irq 10 # NE[12]000 ethernet
#ne2 at isa? port 0x280 irq 9 # NE[12]000 ethernet
#ne* at isapnp? # NE[12]000 PnP ethernet
#eg0 at isa? disable port 0x310 irq 5 # 3C505/Etherlink+ ethernet
#el0 at isa? disable port 0x300 irq 9 # 3C501 ethernet
#ep0 at isa? # 3C509 ethernet
#ep* at isapnp? # 3C509 PnP ethernet
#ep* at isa? # 3C509 ethernet
#ef* at isapnp? # 3C515 PnP ethernet
#ie0 at isa? port 0x360 iomem 0xd0000 irq 7 # StarLAN and 3C507
#ie1 at isa? port 0x300 irq 10 # EtherExpress
#lc0 at isa? port 0x200 # DEC EtherWorks
#lc1 at isa? port 0x280 # DEC EtherWorks
#le0 at isa? port 0x360 irq 15 drq 6 # IsoLan, NE2100, and DEPCA
#ex0 at isa? port 0x320 irq 5 # Intel EtherExpress PRO/10
#tr0 at isa? port 0xa20 iomem 0xd8000 # IBM TROPIC based Token-Ring
#tr1 at isa? port 0xa24 iomem 0xd0000 # IBM TROPIC based Token-Ring
#tr* at isa? # 3COM TROPIC based Token-Ring
#ep0 at eisa?
#ep* at eisa? # 3C579 ethernet
#fea* at eisa? # DEC DEFEA FDDI
#lmc* at pci? # Lan Media Corp SSI/T3/HSSI
#san* at pci? # Sangoma PCI AFT card
#le* at pci? # PCnet-PCI based ethernet
#le* at isapnp?
#pcn* at pci? # AMD PCnet-PCI Ethernet
#de* at pci? # DC21X4X-based ethernet
fxp* at pci? # EtherExpress 10/100B ethernet
fxp* at cardbus? # Intel PRO/100 ethernet
#ne* at pci? # NE2000-compat ethernet
#ep0 at pci? # 3C59x ethernet
#ep* at pci? # 3C59x ethernet
#ne* at pcmcia? # PCMCIA based NE2000 ethernet
#ep* at pcmcia? # PCMCIA based 3C5xx ethernet
#sm* at pcmcia? # PCMCIA based sm ethernet
#xe* at pcmcia? # Xircom ethernet
#fpa* at pci? # DEC DEFPA FDDI
xl* at pci? # 3C9xx ethernet
xl* at cardbus? # 3C575/3C656 ethernet
rl* at pci? # RealTek 81[23]9 ethernet
rl* at cardbus? # RealTek 81[23]9 ethernet
#mtd* at pci? # Myson MTD800/803/891
#epic* at pci? # SMC EPIC/100 ethernet
#tl* at pci? # Compaq Thunderlan ethernet
#vr* at pci? # VIA Rhine ethernet
#wb* at pci? # Winbond W89C840F ethernet
#sf* at pci? # Adaptec AIC-6915 ethernet
#sis* at pci? # SiS 900/7016 ethernet
#ste* at pci? # Sundance ST201 ethernet
dc* at pci? # 21143, "tulip" clone ethernet
dc* at cardbus? # 21143, "tulip" clone ethernet
#ti* at pci? # Alteon Tigon 1Gb ethernet
#skc* at pci? # SysKonnect GEnesis 984x
#sk* at skc? # each port of above
#em* at pci? # Intel Pro/1000 ethernet
#txp* at pci? # 3com 3CR990
#nge* at pci? # NS DP83820/DP83821 GigE
#bge* at pci? # Broadcom BCM570x (aka Tigon3)
#re* at pci? # Realtek 8169/8169S/8110S
#re* at cardbus? # Realtek 8169/8169S/8110S
#stge* at pci? # Sundance TC9021 GigE
#lge* at pci? # Level1 LXT1001 GigE
#hme* at pci? # Sun Happy Meal
#bce* at pci? # Broadcom BCM4401
#vge* at pci? # VIA VT612x
#musycc* at pci? # Conexant HDLC controller
#art* at musycc? # Accoom Artery E1/T1 cards
# Wireless network cards
#ath* at pci? # Atheros AR5k (802.11a/b/g)
#ath* at cardbus? # Atheros AR5k (802.11a/b/g)
#atw* at pci? # ADMtek ADM8211 (802.11)
#atw* at cardbus? # ADMtek ADM8211 (802.11)
#wi* at pci? # WaveLAN IEEE 802.11DS
#wi* at pcmcia? # WaveLAN IEEE 802.11DS
#awi* at pcmcia? # Bay Networks IEEE 802.11FH
#an* at pci? # Aironet IEEE 802.11DS
#an* at isapnp? # Aironet IEEE 802.11DS
#an* at pcmcia? # Aironet IEEE 802.11DS
#cnw* at pcmcia? # Xircom Netwave
#ray* at pcmcia? # Raylink Aviator2.4/Pro 802.11FH
#ipw* at pci? # Intel PRO/Wireless 2100
#iwi* at pci? # Intel PRO/Wireless 2200BG/2915ABG
#ral* at pci? # Ralink RT2500
#ral* at cardbus? # Ralink RT2500
#rtw* at pci? # Realtek 8180
#rtw* at cardbus? # Realtek 8180
# Media Independent Interface (mii) drivers
exphy* at mii? # 3Com internal PHYs
inphy* at mii? # Intel 82555 PHYs
iophy* at mii? # Intel 82553 PHYs
icsphy* at mii? # ICS 1890 PHYs
lxtphy* at mii? # Level1 LXT970 PHYs
nsphy* at mii? # NS and compatible PHYs
nsphyter* at mii? # NS and compatible PHYs
qsphy* at mii? # Quality Semi QS6612 PHYs
luphy* at mii? # Lucent LU6612 PHY
sqphy* at mii? # Seeq 8x220 PHYs
rlphy* at mii? # RealTek 8139 internal PHYs
mtdphy* at mii? # Myson MTD972 PHYs
dcphy* at mii? # Digital Clone PHYs
acphy* at mii? # Altima AC101 PHYs
amphy* at mii? # AMD 79C873 PHYs
tqphy* at mii? # TDK 78Q212x PHYs
bmtphy* at mii? # Broadcom 10/100 PHYs
brgphy* at mii? # Broadcom Gigabit PHYs
eephy* at mii? # Marvell 88E1000 series PHY
xmphy* at mii? # XaQti XMAC-II PHYs
nsgphy* at mii? # NS gigabit PHYs
urlphy* at mii? # Realtek RTL8150L internal PHY
rgephy* at mii? # Realtek 8169S/8110S PHY
ciphy* at mii? # Cicada CS8201 10/100/1000 copper PHY
ukphy* at mii? # "unknown" PHYs
#pss0 at isa? port 0x220 irq 7 drq 6 # Personal Sound System
#sp0 at pss0 port 0x530 irq 10 drq 0 # sound port driver
#eap* at pci? # Ensoniq AudioPCI S5016
#eso* at pci? # ESS Solo-1 PCI AudioDrive
#sv* at pci? # S3 SonicVibes (S3 617)
#neo* at pci? # NeoMagic 256AV/ZX
#cmpci* at pci? # C-Media CMI8338/8738
#auich* at pci? flags 0x0000 # i82801 ICH AC'97 audio
#auixp* at pci? # ATI IXP AC'97 Audio
#autri* at pci? flags 0x0000 # Trident 4D WAVE
#auvia* at pci? # VIA VT82C686A
#clcs* at pci? # CS4280 CrystalClear audio
#clct* at pci? # CS4281 CrystalClear audio
#fms* at pci? # Forte Media FM801
#maestro* at pci? # ESS Maestro PCI
#esa* at pci? # ESS Maestro3 PCI
#yds* at pci? flags 0x0000 # Yamaha YMF Audio
#emu* at pci? # SB Live!
#sb0 at isa? port 0x220 irq 5 drq 1 # SoundBlaster
#sb* at isapnp?
#ess* at isapnp? # ESS Tech ES188[78], ES888
#wss0 at isa? port 0x530 irq 10 drq 0 # Windows Sound System
#wss* at isapnp?
#pas0 at isa? port 0x220 irq 7 drq 1 # ProAudio Spectrum
#gus0 at isa? port 0x220 irq 7 drq 1 drq2 6 # Gravis (drq2 is record drq)
#ym* at isapnp?
#mpu* at isapnp?
#mpu* at isa? port 0x300 # generic MPU, Yamaha SW60XG
#aria0 at isa? port 0x280 irq 10 drq 0 flags 0x1 # Prometheus Aria 16
# OPL[23] FM synthesizers
#opl0 at isa? port 0x388 # use only if not attached to sound card
#opl* at eso?
#opl* at sb?
#opl* at ess?
#opl* at yds?
# MIDI support
#midi* at pcppi? # MIDI interface to the PC speaker
#midi* at sb? # SB MPU401 port
#midi* at opl? # OPL FM synth
#midi* at ym?
#midi* at mpu?
#midi* at autri?
#midi* at eap?
spkr0 at pcppi? # PC speaker
# Audio Support
#audio* at sb?
#audio* at gus?
#audio* at pas?
#audio* at sp?
#audio* at ess?
#audio* at wss?
#audio* at ym?
#audio* at eap?
#audio* at eso?
#audio* at sv?
#audio* at neo?
#audio* at cmpci?
#audio* at clcs?
#audio* at clct?
#audio* at auich?
#audio* at auixp?
#audio* at autri?
#audio* at auvia?
#audio* at fms?
#audio* at maestro?
#audio* at esa?
#audio* at yds?
#audio* at emu?
#bktr0 at pci?
# FM-Radio devices
#gtp* at pci? # Gemtek/Guillemot Radio PCI Radio Card
#sfr0 at isa? port 0x384 # SoundForte RadioLink SF16-FMR FM Radio Card
#sf2r0 at isa? port 0x384 # SoundForte RadioLink SF16-FMR2 FM Radio Card
#az0 at isa? port 0x350 # Aztech/PackardBell FM Radio Card
#rt0 at isa? port 0x30c # AIMS Lab Radiotrack FM Radio Card
#rt* at isapnp?
#rtii0 at isa? port 0x30c # AIMS Lab Radiotrack II FM Radio Card
# FM-Radio support
#radio* at bktr?
#radio* at fms?
#radio* at gtp?
#radio* at sfr?
#radio* at sf2r?
#radio* at az?
#radio* at rt?
#radio* at rtii?
# Joystick driver. Probe is a little strange; add only if you have one.
#joy0 at isa? port 0x201
#joy* at isapnp?
#wdt0 at pci? # Ind Computer Source PCI-WDT50x driver
# crypto support
#hifn* at pci? # Hi/fn 7751 crypto card
#lofn* at pci? # Hi/fn 6500 crypto card
#nofn* at pci? # Hi/fn 7814/7851/7854 crypto card
#ubsec* at pci? # Bluesteel Networks 5xxx crypto card
#safe* at pci? # SafeNet SafeXcel 1141/1741
#ises* at pci? # Pijnenburg PCC-ISES
# I2O
iop* at pci? # I2O
ioprbs* at iop? # Random block storage
scsibus* at ioprbs?
pseudo-device pctr 1
pseudo-device mtrr 1 # Memory range attributes control
pseudo-device nvram 1
pseudo-device sequencer 1
#pseudo-device raid 4 # RAIDframe disk driver
pseudo-device bio 1 # ioctl multiplexing device
pseudo-device hotplug 1 # devices hot plugging
# mouse & keyboard multiplexor pseudo-devices
pseudo-device wsmux 2
pseudo-device crypto 1
Helper script
Here is a simple bash script to make the compiling easier:
#!/usr/local/bin/bash
# just a simple bash script for building a kernel on OpenBSD
# by martin.polden at c2i.net
#
# place your kernel config in /usr/src/sys/arch/${ARCH}/conf/
# run this script with the name of your config as the first argument
CONFIG="${1}";
ARCH=`uname -m`;
SYS=`uname -s`;
if [ $# = 0 ];
then
echo "usage: buildkernel config-file";
exit 3
elif [ $SYS != "OpenBSD" ];
then
echo "You're not running OpenBSD. Shame on you!";
exit 4
elif [ ! -e "/usr/src/sys/arch/${ARCH}/conf/${CONFIG}" ];
then
echo "Kernel config (${CONFIG}) does not exist in /usr/src/sys/arch/${ARCH}/conf/";
exit 5
else
mkdir /${CONFIG} && cd /${CONFIG};
cp /usr/src/sys/arch/${ARCH}/conf/${CONFIG} .;
config -s /usr/src/sys -b . ${CONFIG};
make clean && make depend && make;
cp /bsd /bsd.backup;
fi
echo "Your kernel (${CONFIG}) has been compiled in /${CONFIG}";
echo "Type 'cd /${CONFIG} && make install' to install your kernel";
echo "A backup of your old kernel has been created in /bsd.backup";
exit 0