Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2001 13:20:04 -0400
From:      Joel Dinel <jdinel@touchtunes.com>
To:        freebsd-questions@freebsd.org
Subject:   Optimizing a custom kernel
Message-ID:  <3AE06FC4.D91BE05D@touchtunes.com>

next in thread | raw e-mail | index | archive | help
I've been building custom kernels on 4.2-RELEASE for a little while now,
but I'm pretty sure I left behind a lot of stuff I could've removed. I'd
like to optimize my kernel as much as possible.

Here's the setup of the machine I'm building the kernel on :

CPU: Celeron (601.37-MHz 686-class CPU)
RAM: 128 MB
ad0: 14594MB <Maxtor 51536H2> [29651/16/63] at ata0-master UDMA66
acd0: CDROM <CREATIVE CD5233E> at ata1-master using WDMA2
pci1: <ATI Mach64-GZ graphics accelerator> at 0.0
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xe800-0xe87f mem
0xd8000000-0xd800
pcm0: <AudioPCI ES1371> port 0xec00-0xec3f irq 5 at device 18.0 on pci0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on
isa0
psm0: <PS/2 Mouse> irq 12 on atkbdc0

I don't need USB, and I don't have any ISA cards. I don't plan on using
anything connected to the serial port(s) or the parallel port. Here's my
kernel config file. I didn't remove any of the serial or parallel port
stuff yet. I did remove IPV6 entries, though.
#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# $FreeBSD: src/sys/i386/conf/DINJO,v 1.00 2001/04/19 16:37:07 dinjo Exp
$

machine         i386
cpu             I686_CPU
ident           DINJO   
maxusers        32

options         INET                    #InterNETworking
options         FFS                     #Berkeley Fast Filesystem
options         FFS_ROOT                #FFS usable as root device [keep
this!]
options         SOFTUPDATES             #Enable FFS soft updates support
options         MFS                     #Memory Filesystem
options         MD_ROOT                 #MD is a potential root device
options         NFS                     #Network Filesystem
options         MSDOSFS                 #MSDOS Filesystem
options         CD9660                  #ISO 9660 Filesystem
options         PROCFS                  #Process filesystem
options         COMPAT_43               #Compatible with BSD 4.3 [KEEP
THIS!]
options         UCONSOLE                #Allow users to grab the console
options         USERCONFIG              #boot -c editor
options         VISUAL_USERCONFIG       #visual boot -c editor
options         KTRACE                  #ktrace(1) support
options         SYSVSHM                 #SYSV-style shared memory
options         SYSVMSG                 #SYSV-style message queues
options         SYSVSEM                 #SYSV-style semaphores
options         P1003_1B                #Posix P1003_1B real-time
extensions
options         _KPOSIX_PRIORITY_SCHEDULING
options         ICMP_BANDLIM            #Rate limit bad replies
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev

device          isa
device          eisa
device          pci

# Floppy drives
device          fdc0    at isa? port IO_FD1 irq 6 drq 2
device          fd0     at fdc0 drive 0
device          fd1     at fdc0 drive 1

# ATA and ATAPI devices
device          ata0    at isa? port IO_WD1 irq 14
device          ata1    at isa? port IO_WD2 irq 15
device          ata
device          atadisk                 # ATA disk drives
device          atapicd                 # ATAPI CDROM drives
options         ATA_STATIC_ID           #Static device numbering
options         ATA_ENABLE_ATAPI_DMA    #Enable DMA on ATAPI devices

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc0 at isa? port IO_KBD
device          atkbd0  at atkbdc? irq 1 flags 0x1
device          psm0    at atkbdc? irq 12

device          vga0    at isa?

# splash screen/screen saver
pseudo-device   splash

# syscons is the default console driver, resembling an SCO console
device          sc0     at isa? flags 0x100

# Floating point support - do not disable.
device          npx0    at nexus? port IO_NPX irq 13

# Serial (COM) ports
device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
device          sio1    at isa? port IO_COM2 irq 3
device          sio2    at isa? disable port IO_COM3 irq 5
device          sio3    at isa? disable port IO_COM4 irq 9

# Parallel port
device          ppc0    at isa? irq 7
device          ppbus           # Parallel port bus (required)
device          lpt             # Printer
device          ppi             # Parallel port interface device

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these
NICs!
device          miibus          # MII bus support
device          xl              # 3Com 3c90x (``Boomerang'',
``Cyclone'')

# Pseudo devices - the number indicates how many units to allocated.
pseudo-device   loop            # Network loopback
pseudo-device   ether           # Ethernet support
pseudo-device   tun             # Packet tunnel.
pseudo-device   pty             # Pseudo-ttys (telnet etc)
pseudo-device   md              # Memory "disks"

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device   bpf             #Berkeley packet filter

# PCM support
device  pcm


What can I safely remove? 

-- 
Joel Dinel
TouchTunes Digital Jukebox, Inc.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AE06FC4.D91BE05D>