# Build kernel help



## damfreebsd (Jan 4, 2017)

Here is my system hardware, what should i disable in the kernel configuration file?


```
dmesg
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016
    root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
VT(vga): resolution 640x480
CPU: AMD FX(tm)-8320 Eight-Core Processor            (4113.98-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x600f20  Family=0x15  Model=0x2  Stepping=0
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x3e98320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x1ebbfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,TCE,NodeId,TBM,Topology,PCXC,PNXC>
  Structured Extended Features=0x8<BMI1>
  SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=65536
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)
avail memory = 8138080256 (7761 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <ALASKA A M I>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
random: unblocking device.
ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20160527/tbfadt-679)
ioapic0 <Version 2.1> irqs 0-23 on motherboard
ioapic1 <Version 2.1> irqs 24-55 on motherboard
random: entropy device external interface
kbd1 at kbdmux0
netmap: loaded module
module_register_init: MOD_LOAD (vesa, 0xffffffff8101c970, 0) error 19
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  367.44  Wed Aug 17 22:05:09 PDT 2016
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <ALASKA A M I> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
cpu4: <ACPI CPU> on acpi0
cpu5: <ACPI CPU> on acpi0
cpu6: <ACPI CPU> on acpi0
cpu7: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 350
Event timer "HPET1" frequency 14318180 Hz quality 350
Event timer "HPET2" frequency 14318180 Hz quality 350
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_ec0: <Embedded Controller: GPE 0xa> port 0x62,0x66 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 52 at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xe000-0xe07f mem 0xfc000000-0xfdffffff,0xd0000000-0xd7ffffff,0xd8000000-0xdbffffff irq 24 at device 0.0 on pci1
nvidia0: <GeForce GTX 560 Ti> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: Boot video device
hdac0: <NVIDIA GF110 HDA Controller> mem 0xfe080000-0xfe083fff irq 25 at device 0.1 on pci1
pcib2: <ACPI PCI-PCI bridge> irq 52 at device 4.0 on pci0
pci2: <ACPI PCI bus> on pcib2
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0xd000-0xd0ff mem 0xdc104000-0xdc104fff,0xdc100000-0xdc103fff irq 44 at device 0.0 on pci2
re0: Using 1 MSI-X message
re0: Chip rev. 0x48000000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Using defaults for TSO: 65518/35/2048
re0: Ethernet address: 60:a4:4c:64:41:9d
re0: netmap queues/slots: TX 1/256, RX 1/256
pcib3: <ACPI PCI-PCI bridge> irq 52 at device 5.0 on pci0
pci3: <ACPI PCI bus> on pcib3
xhci0: <ASMedia ASM1042 USB 3.0 controller> mem 0xfe300000-0xfe307fff irq 46 at device 0.0 on pci3
xhci0: 32 bytes context size, 32-bit DMA
xhci0: Unable to map MSI-X table
usbus0 on xhci0
pcib4: <ACPI PCI-PCI bridge> irq 53 at device 6.0 on pci0
pci4: <ACPI PCI bus> on pcib4
ahci0: <ASMedia ASM1061 AHCI SATA controller> port 0xc050-0xc057,0xc040-0xc043,0xc030-0xc037,0xc020-0xc023,0xc000-0xc01f mem 0xfe200000-0xfe2001ff irq 51 at device 0.0 on pci4
ahci0: AHCI v1.20 with 2 6Gbps ports, Port Multiplier supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
pcib5: <ACPI PCI-PCI bridge> irq 53 at device 7.0 on pci0
pci5: <ACPI PCI bus> on pcib5
xhci1: <ASMedia ASM1042 USB 3.0 controller> mem 0xfe100000-0xfe107fff irq 50 at device 0.0 on pci5
xhci1: 32 bytes context size, 32-bit DMA
xhci1: Unable to map MSI-X table
usbus1 on xhci1
ahci1: <AMD SB7x0/SB8x0/SB9x0 AHCI SATA controller> port 0xf040-0xf047,0xf030-0xf033,0xf020-0xf027,0xf010-0xf013,0xf000-0xf00f mem 0xfe40b000-0xfe40b3ff irq 19 at device 17.0 on pci0
ahci1: AHCI v1.20 with 3 6Gbps ports, Port Multiplier supported
ahci1: quirks=0x22000<ATI_PMP_BUG,1MSI>
ahcich3: <AHCI channel> at channel 1 on ahci1
ahcich4: <AHCI channel> at channel 2 on ahci1
ahcich6: <AHCI channel> at channel 4 on ahci1
ohci0: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe40a000-0xfe40afff irq 18 at device 18.0 on pci0
usbus2 on ohci0
ehci0: <AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller> mem 0xfe409000-0xfe4090ff irq 17 at device 18.2 on pci0
usbus3: EHCI version 1.0
usbus3 on ehci0
ohci1: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe408000-0xfe408fff irq 20 at device 19.0 on pci0
usbus4 on ohci1
ehci1: <AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller> mem 0xfe407000-0xfe4070ff irq 21 at device 19.2 on pci0
usbus5: EHCI version 1.0
usbus5 on ehci1
hdac1: <ATI SB600 HDA Controller> mem 0xfe400000-0xfe403fff irq 16 at device 20.2 on pci0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
pcib6: <ACPI PCI-PCI bridge> at device 20.4 on pci0
pci6: <ACPI PCI bus> on pcib6
ohci2: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe406000-0xfe406fff irq 18 at device 20.5 on pci0
usbus6 on ohci2
ohci3: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe405000-0xfe405fff irq 22 at device 22.0 on pci0
usbus7 on ohci3
ehci2: <AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller> mem 0xfe404000-0xfe4040ff irq 23 at device 22.2 on pci0
usbus8: EHCI version 1.0
usbus8 on ehci2
acpi_button0: <Power Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
ppc0: cannot reserve I/O port range
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
usbus0: 5.0Gbps Super Speed USB v3.0
Timecounters tick every 1.000 msec
nvme cam probe device init
hdacc0: <NVIDIA (0x0016) HDA CODEC> at cad 0 on hdac0
hdaa0: <NVIDIA (0x0016) Audio Function Group> at nid 1 on hdacc0
pcm0: <NVIDIA (0x0016) (HDMI/DP 8ch)> at nid 5 on hdaa0
hdacc1: <NVIDIA (0x0016) HDA CODEC> at cad 1 on hdac0
hdaa1: <NVIDIA (0x0016) Audio Function Group> at nid 1 on hdacc1
pcm1: <NVIDIA (0x0016) (HDMI/DP 8ch)> at nid 5 on hdaa1
hdacc2: <NVIDIA (0x0016) HDA CODEC> at cad 2 on hdac0
hdaa2: <NVIDIA (0x0016) Audio Function Group> at nid 1 on hdacc2
pcm2: <NVIDIA (0x0016) (HDMI/DP 8ch)> at nid 5 on hdaa2
hdacc3: <NVIDIA (0x0016) HDA CODEC> at cad 3 on hdac0
hdaa3: <NVIDIA (0x0016) Audio Function Group> at nid 1 on hdacc3
pcm3: <NVIDIA (0x0016) (HDMI/DP 8ch)> at nid 5 on hdaa3
hdacc4: <Realtek ALC892 HDA CODEC> at cad 0 on hdac1
hdaa4: <Realtek ALC892 Audio Function Group> at nid 1 on hdacc4
pcm4: <Realtek ALC892 (Rear Analog 7.1/2.0)> at nid 20,22,21,23 and 24,26 on hdaa4
pcm5: <Realtek ALC892 (Front Analog)> at nid 27 and 25 on hdaa4
pcm6: <Realtek ALC892 (Rear Digital)> at nid 30 on hdaa4
pcm7: <Realtek ALC892 (Onboard Digital)> at nid 17 on hdaa4
usbus1: 5.0Gbps Super Speed USB v3.0
ugen0.1: <0x1b21> at usbus0
uhub0: <0x1b21 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen1.1: <0x1b21> at usbus1
uhub1: <0x1b21 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 480Mbps High Speed USB v2.0
ugen2.1: <ATI> at usbus2
uhub2: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <ATI> at usbus3
uhub3: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
usbus4: 12Mbps Full Speed USB v1.0
usbus5: 480Mbps High Speed USB v2.0
ugen4.1: <ATI> at usbus4
uhub4: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen5.1: <ATI> at usbus5
uhub5: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus5
usbus6: 12Mbps Full Speed USB v1.0
usbus7: 12Mbps Full Speed USB v1.0
ugen6.1: <ATI> at usbus6
uhub6: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus6
ugen7.1: <ATI> at usbus7
uhub7: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus7
usbus8: 480Mbps High Speed USB v2.0
ugen8.1: <ATI> at usbus8
uhub8: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus8
uhub1: 4 ports with 4 removable, self powered
uhub0: 4 ports with 4 removable, self powered
uhub2: 5 ports with 5 removable, self powered
uhub6: 2 ports with 2 removable, self powered
uhub4: 5 ports with 5 removable, self powered
ada0 at ahcich3 bus 0 scbus2 target 0 lun 0
uhub7: 4 ports with 4 removable, self powered
ada0: <Hitachi HDE721010SLA330 ST6OA3BF> ATA8-ACS SATA 2.x device
ada0: Serial Number MS3U5Y9K
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 953869MB (1953525168 512 byte sectors)
ada1 at ahcich4 bus 0 scbus3 target 0 lun 0
ada1: <WDC WD3200AAJS-56B4A0 01.03A01> ATA8-ACS SATA 2.x device
ada1: Serial Number WD-WCAT1D807073
cd0 at ahcich6 bus 0 scbus4 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GH24NS90 IN00> Removable CD-ROM SCSI device
cd0: Serial Number KA5BCR90418
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: 0MB (1 0 byte sectors)
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 305245MB (625142448 512 byte sectors)
SMP: AP CPU #1 Launched!
SMP: AP CPU #7 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #4 Launched!
SMP: AP CPU #2 Launched!
SMP: AP CPU #6 Launched!
SMP: AP CPU #5 Launched!
Timecounter "TSC-low" frequency 2056989482 Hz quality 1000
Trying to mount root from ufs:/dev/ada1p2 [rw]...
ugen1.2: <Logitech> at usbus1
ukbd0: <Logitech Gaming Mouse G502, class 0/0, rev 2.00/88.02, addr 1> on usbus1
kbd2 at ukbd0
uhub8: 4 ports with 4 removable, self powered
uhub3: 5 ports with 5 removable, self powered
uhub5: 5 ports with 5 removable, self powered
re0: link state changed to DOWN
re0: link state changed to UP
ums0: <Logitech Gaming Mouse G502, class 0/0, rev 2.00/88.02, addr 1> on usbus1
ums0: 16 buttons and [XYZT] coordinates ID=0
nvidia-modeset: Allocated GPU:0 (GPU-b1f8169d-8821-7ff8-233a-f805cb8c2530) @ PCI:0000:01:00.0
```


----------



## damfreebsd (Jan 4, 2017)

Here is the configuration file what should i disable?


```
cpu             HAMMER
ident           GENERIC

makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug symbols
makeoptions     WITH_CTF=1              # Run ctfconvert(1) for DTrace support

options         SCHED_ULE               # ULE scheduler
options         PREEMPTION              # Enable kernel thread preemption
options         INET                    # InterNETworking
options         INET6                   # IPv6 communications protocols
options         IPSEC                   # IP (v4/v6) security
options         TCP_OFFLOAD             # TCP offload
options         SCTP                    # Stream Control Transmission Protocol
options         FFS                     # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_ACL                 # Support for access control lists
options         UFS_DIRHASH             # Improve performance on big directories
options         UFS_GJOURNAL            # Enable gjournal-based UFS journaling
options         QUOTA                   # Enable disk quotas for UFS
options         MD_ROOT                 # MD is a potential root device
options         NFSCL                   # Network Filesystem Client
options         NFSD                    # Network Filesystem Server
options         NFSLOCKD                # Network Lock Manager
options         NFS_ROOT                # NFS usable as /, requires NFSCL
options         MSDOSFS                 # MSDOS Filesystem
options         CD9660                  # ISO 9660 Filesystem
options         PROCFS                  # Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         GEOM_PART_GPT           # GUID Partition Tables.
options         GEOM_RAID               # Soft RAID functionality.
options         GEOM_LABEL              # Provides labelization
options         COMPAT_FREEBSD32        # Compatible with i386 binaries
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
options         COMPAT_FREEBSD5         # Compatible with FreeBSD5
options         COMPAT_FREEBSD6         # Compatible with FreeBSD6
options         COMPAT_FREEBSD7         # Compatible with FreeBSD7
options         COMPAT_FREEBSD9         # Compatible with FreeBSD9
options         COMPAT_FREEBSD10        # Compatible with FreeBSD10
options         SCSI_DELAY=5000         # Delay (in ms) before probing SCSI
options         KTRACE                  # ktrace(1) support
options         STACK                   # stack(9) support
options         SYSVSHM                 # SYSV-style shared memory
options         SYSVMSG                 # SYSV-style message queues
options         SYSVSEM                 # SYSV-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options         PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         HWPMC_HOOKS             # Necessary kernel hooks for hwpmc(4)
options         AUDIT                   # Security event auditing
options         CAPABILITY_MODE         # Capsicum capability mode
options         CAPABILITIES            # Capsicum capabilities
options         MAC                     # TrustedBSD MAC Framework
options         KDTRACE_FRAME           # Ensure frames are compiled in
options         KDTRACE_HOOKS           # Kernel DTrace hooks
options         DDB_CTF                 # Kernel ELF linker loads CTF data
options         INCLUDE_CONFIG_FILE     # Include this file in kernel
options         RACCT                   # Resource accounting framework
options         RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options         RCTL                    # Resource limits

# Debugging support.  Always need this:
options         KDB                     # Enable kernel debugger support.
options         KDB_TRACE               # Print a stack trace for a panic.

# Make an SMP-capable kernel by default
options         SMP                     # Symmetric MultiProcessor Kernel
options         DEVICE_NUMA             # I/O Device Affinity
options         KDTRACE_FRAME           # Ensure frames are compiled in
options         KDTRACE_HOOKS           # Kernel DTrace hooks
options         DDB_CTF                 # Kernel ELF linker loads CTF data
options         INCLUDE_CONFIG_FILE     # Include this file in kernel
options         RACCT                   # Resource accounting framework
options         RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options         RCTL                    # Resource limits

# Debugging support.  Always need this:
options         KDB                     # Enable kernel debugger support.
options         KDB_TRACE               # Print a stack trace for a panic.

# Make an SMP-capable kernel by default
options         SMP                     # Symmetric MultiProcessor Kernel
options         DEVICE_NUMA             # I/O Device Affinity

# CPU frequency control
device          cpufreq

# Bus support.
device          acpi
options         ACPI_DMAR
device          pci
options         PCI_HP                  # PCI-Express native HotPlug
options         PCI_IOV                 # PCI SR-IOV support

# Floppy drives
device          fdc

# ATA controllers
device          ahci                    # AHCI-compatible SATA controllers
device          ata                     # Legacy ATA/SATA controllers
device          mvs                     # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
device          siis                    # SiliconImage SiI3124/SiI3132/SiI3531 SATA

# SCSI Controllers
device          ahc                     # AHA2940 and onboard AIC7xxx devices
options         AHC_REG_PRETTY_PRINT    # Print register bitfields in debug
                                        # output.  Adds ~128k to driver.
device          ahd                     # AHA39320/29320 and onboard AIC79xx devices
options         AHD_REG_PRETTY_PRINT    # Print register bitfields in debug
                                        # output.  Adds ~215k to driver.
device          esp                     # AMD Am53C974 (Tekram DC-390(T))
device          hptiop                  # Highpoint RocketRaid 3xxx series
device          isp                     # Qlogic family
#device         ispfw                   # Firmware for QLogic HBAs- normally a module
device          mpt                     # LSI-Logic MPT-Fusion
device          mps                     # LSI-Logic MPT-Fusion 2
device          mpr                     # LSI-Logic MPT-Fusion 3
#device         ncr                     # NCR/Symbios Logic
device          sym                     # NCR/Symbios Logic (newer chipsets + those of `ncr')
device          trm                     # Tekram DC395U/UW/F DC315U adapters


device          ahc                     # AHA2940 and onboard AIC7xxx devices
options         AHC_REG_PRETTY_PRINT    # Print register bitfields in debug
                                        # output.  Adds ~128k to driver.
device          ahd                     # AHA39320/29320 and onboard AIC79xx devices
options         AHD_REG_PRETTY_PRINT    # Print register bitfields in debug
                                        # output.  Adds ~215k to driver.
device          esp                     # AMD Am53C974 (Tekram DC-390(T))
device          hptiop                  # Highpoint RocketRaid 3xxx series
device          isp                     # Qlogic family
#device         ispfw                   # Firmware for QLogic HBAs- normally a module
device          mpt                     # LSI-Logic MPT-Fusion
device          mps                     # LSI-Logic MPT-Fusion 2
device          mpr                     # LSI-Logic MPT-Fusion 3
#device         ncr                     # NCR/Symbios Logic
device          sym                     # NCR/Symbios Logic (newer chipsets + those of `ncr')
device          trm                     # Tekram DC395U/UW/F DC315U adapters

device          adv                     # Advansys SCSI adapters
device          adw                     # Advansys wide SCSI adapters
device          aic                     # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
device          bt                      # Buslogic/Mylex MultiMaster SCSI adapters
device          isci                    # Intel C600 SAS controller
```


----------



## damfreebsd (Jan 4, 2017)

```
# ATA/SCSI peripherals
device          scbus                   # SCSI bus (required for ATA/SCSI)
device          ch                      # SCSI media changers
device          da                      # Direct Access (disks)
device          sa                      # Sequential Access (tape etc)
device          cd                      # CD
device          pass                    # Passthrough device (direct ATA/SCSI access)
device          ses                     # Enclosure Services (SES and SAF-TE)
#device         ctl                     # CAM Target Layer

# RAID controllers interfaced to the SCSI subsystem
device          amr                     # AMI MegaRAID
device          arcmsr                  # Areca SATA II RAID
device          ciss                    # Compaq Smart RAID 5*
device          dpt                     # DPT Smartcache III, IV - See NOTES for options
device          hptmv                   # Highpoint RocketRAID 182x
device          hptnr                   # Highpoint DC7280, R750
device          hptrr                   # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
device          hpt27xx                 # Highpoint RocketRAID 27xx
device          iir                     # Intel Integrated RAID
device          ips                     # IBM (Adaptec) ServeRAID
device          mly                     # Mylex AcceleRAID/eXtremeRAID
device          twa                     # 3ware 9000 series PATA/SATA RAID
device          tws                     # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller

# RAID controllers
device          aac                     # Adaptec FSA RAID
device          aacp                    # SCSI passthrough for aac (requires CAM)
device          aacraid                 # Adaptec by PMC RAID
device          ida                     # Compaq Smart RAID
device          mfi                     # LSI MegaRAID SAS
device          mlx                     # Mylex DAC960 family
device          mrsas                   # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
device          pmspcv                  # PMC-Sierra SAS/SATA Controller driver
#XXX pointer/int warnings
#device         pst                     # Promise Supertrak SX6000
device          twe                     # 3ware ATA RAID

# NVM Express (NVMe) support
device          nvme                    # base NVMe driver
device          nvd                     # expose NVMe namespaces as disks, depends on nvme

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc                  # AT keyboard controller
device          atkbd                   # AT keyboard
device          psm                     # PS/2 mouse
device          kbdmux                  # keyboard multiplexer

device          vga                     # VGA video card driver
options         VESA                    # Add support for VESA BIOS Extensions (VBE)

device          splash                  # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device          sc
options         SC_PIXEL_MODE           # add support for the raster text mode

# vt is the new video console driver
device          vt
device          vt_vga
device          vt_efifb

device          agp                     # support several AGP chipsets
# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
device          cbb                     # cardbus (yenta) bridge
device          pccard                  # PC Card (16-bit) bus
device          cardbus                 # CardBus (32-bit) bus

# Serial (COM) ports
device          uart                    # Generic UART driver

# Parallel port
device          ppc
device          ppbus                   # Parallel port bus (required)
device          lpt                     # Printer
device          ppi                     # Parallel port interface device
#device         vpo                     # Requires scbus and da

device          puc                     # Multi I/O cards and multi-channel UARTs
device          cbb                     # cardbus (yenta) bridge
device          pccard                  # PC Card (16-bit) bus
device          cardbus                 # CardBus (32-bit) bus

# Serial (COM) ports
device          uart                    # Generic UART driver

# Parallel port
device          ppc
device          ppbus                   # Parallel port bus (required)
device          lpt                     # Printer
device          ppi                     # Parallel port interface device
#device         vpo                     # Requires scbus and da

device          puc                     # Multi I/O cards and multi-channel UARTs

# PCI Ethernet NICs.
device          bxe                     # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE
device          de                      # DEC/Intel DC21x4x (``Tulip'')
device          em                      # Intel PRO/1000 Gigabit Ethernet Family
device          igb                     # Intel PRO/1000 PCIE Server Gigabit Family
device          ix                      # Intel PRO/10GbE PCIE PF Ethernet
device          ixv                     # Intel PRO/10GbE PCIE VF Ethernet
device          ixl                     # Intel XL710 40Gbe PCIE Ethernet
device          ixlv                    # Intel XL710 40Gbe VF PCIE Ethernet
device          le                      # AMD Am7900 LANCE and Am79C9xx PCnet
device          ti                      # Alteon Networks Tigon I/II gigabit Ethernet
device          txp                     # 3Com 3cR990 (``Typhoon'')
device          vx                      # 3Com 3c590, 3c595 (``Vortex'')
```


----------



## damfreebsd (Jan 4, 2017)

```
# 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          ae                      # Attansic/Atheros L2 FastEthernet
device          de                      # DEC/Intel DC21x4x (``Tulip'')
device          em                      # Intel PRO/1000 Gigabit Ethernet Family
device          igb                     # Intel PRO/1000 PCIE Server Gigabit Family
device          ix                      # Intel PRO/10GbE PCIE PF Ethernet
device          ixv                     # Intel PRO/10GbE PCIE VF Ethernet
device          ixl                     # Intel XL710 40Gbe PCIE Ethernet
device          ixlv                    # Intel XL710 40Gbe VF PCIE Ethernet
device          le                      # AMD Am7900 LANCE and Am79C9xx PCnet
device          ti                      # Alteon Networks Tigon I/II gigabit Ethernet
device          txp                     # 3Com 3cR990 (``Typhoon'')
device          vx                      # 3Com 3c590, 3c595 (``Vortex'')

# 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          ae                      # Attansic/Atheros L2 FastEthernet
device          age                     # Attansic/Atheros L1 Gigabit Ethernet
device          alc                     # Atheros AR8131/AR8132 Ethernet
device          ale                     # Atheros AR8121/AR8113/AR8114 Ethernet
device          bce                     # Broadcom BCM5706/BCM5708 Gigabit Ethernet
device          bfe                     # Broadcom BCM440x 10/100 Ethernet
device          bge                     # Broadcom BCM570xx Gigabit Ethernet
device          cas                     # Sun Cassini/Cassini+ and NS DP83065 Saturn
device          dc                      # DEC/Intel 21143 and various workalikes
device          et                      # Agere ET1310 10/100/Gigabit Ethernet
device          fxp                     # Intel EtherExpress PRO/100B (82557, 82558)
device          gem                     # Sun GEM/Sun ERI/Apple GMAC
device          hme                     # Sun HME (Happy Meal Ethernet)
device          jme                     # JMicron JMC250 Gigabit/JMC260 Fast Ethernet
device          lge                     # Level 1 LXT1001 gigabit Ethernet
device          msk                     # Marvell/SysKonnect Yukon II Gigabit Ethernet
device          nfe                     # nVidia nForce MCP on-board Ethernet
device          nge                     # NatSemi DP83820 gigabit Ethernet
device          pcn                     # AMD Am79C97x PCI 10/100 (precedence over 'le')
device          ale                     # Atheros AR8121/AR8113/AR8114 Ethernet
device          bce                     # Broadcom BCM5706/BCM5708 Gigabit Ethernet
device          bfe                     # Broadcom BCM440x 10/100 Ethernet
device          bge                     # Broadcom BCM570xx Gigabit Ethernet
device          cas                     # Sun Cassini/Cassini+ and NS DP83065 Saturn
device          dc                      # DEC/Intel 21143 and various workalikes
device          et                      # Agere ET1310 10/100/Gigabit Ethernet
device          fxp                     # Intel EtherExpress PRO/100B (82557, 82558)
device          gem                     # Sun GEM/Sun ERI/Apple GMAC
device          hme                     # Sun HME (Happy Meal Ethernet)
device          jme                     # JMicron JMC250 Gigabit/JMC260 Fast Ethernet
device          lge                     # Level 1 LXT1001 gigabit Ethernet
device          msk                     # Marvell/SysKonnect Yukon II Gigabit Ethernet
device          nfe                     # nVidia nForce MCP on-board Ethernet
device          nge                     # NatSemi DP83820 gigabit Ethernet
device          pcn                     # AMD Am79C97x PCI 10/100 (precedence over 'le')
device          re                      # RealTek 8139C+/8169/8169S/8110S
device          rl                      # RealTek 8129/8139
device          sf                      # Adaptec AIC-6915 (``Starfire'')
device          sge                     # Silicon Integrated Systems SiS190/191
device          sis                     # Silicon Integrated Systems SiS 900/SiS 7016
device          sk                      # SysKonnect SK-984x & SK-982x gigabit Ethernet
device          ste                     # Sundance ST201 (D-Link DFE-550TX)
device          stge                    # Sundance/Tamarack TC9021 gigabit Ethernet
device          tl                      # Texas Instruments ThunderLAN
device          tx                      # SMC EtherPower II (83c170 ``EPIC'')
device          vge                     # VIA VT612x gigabit Ethernet
device          vr                      # VIA Rhine, Rhine II
device          wb                      # Winbond W89C840F
device          xl                      # 3Com 3c90x (``Boomerang'', ``Cyclone'')

# Wireless NIC cards
device          wlan                    # 802.11 support
options         IEEE80211_DEBUG         # enable debug msgs
device          sf                      # Adaptec AIC-6915 (``Starfire'')
device          sge                     # Silicon Integrated Systems SiS190/191
device          sis                     # Silicon Integrated Systems SiS 900/SiS 7016
device          sk                      # SysKonnect SK-984x & SK-982x gigabit Ethernet
device          ste                     # Sundance ST201 (D-Link DFE-550TX)
device          stge                    # Sundance/Tamarack TC9021 gigabit Ethernet
device          tl                      # Texas Instruments ThunderLAN
device          tx                      # SMC EtherPower II (83c170 ``EPIC'')
device          vge                     # VIA VT612x gigabit Ethernet
device          vr                      # VIA Rhine, Rhine II
device          wb                      # Winbond W89C840F
device          xl                      # 3Com 3c90x (``Boomerang'', ``Cyclone'')

# Wireless NIC cards
device          wlan                    # 802.11 support
options         IEEE80211_DEBUG         # enable debug msgs
options         IEEE80211_AMPDU_AGE     # age frames in AMPDU reorder q's
options         IEEE80211_SUPPORT_MESH  # enable 802.11s draft support
device          wlan_wep                # 802.11 WEP support
device          wlan_ccmp               # 802.11 CCMP support
device          wlan_tkip               # 802.11 TKIP support
device          wlan_amrr               # AMRR transmit rate control algorithm
device          an                      # Aironet 4500/4800 802.11 wireless NICs.
device          ath                     # Atheros NICs
device          ath_pci                 # Atheros pci/cardbus glue
device          ath_hal                 # pci/cardbus chip support
options         AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
options         AH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation
options         ATH_ENABLE_11N          # Enable 802.11n support for AR5416 and later
device          ath_rate_sample         # SampleRate tx rate control for ath
#device         bwi                     # Broadcom BCM430x/BCM431x wireless NICs.
#device         bwn                     # Broadcom BCM43xx wireless NICs.
device          ipw                     # Intel 2100 wireless NICs.
device          iwi                     # Intel 2200BG/2225BG/2915ABG wireless NICs.
device          wlan_wep                # 802.11 WEP support
device          wlan_ccmp               # 802.11 CCMP support
device          wlan_tkip               # 802.11 TKIP support
device          wlan_amrr               # AMRR transmit rate control algorithm
device          an                      # Aironet 4500/4800 802.11 wireless NICs.
device          ath                     # Atheros NICs
device          ath_pci                 # Atheros pci/cardbus glue
device          ath_hal                 # pci/cardbus chip support
options         AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
options         AH_AR5416_INTERRUPT_MITIGATION # AR5416 interrupt mitigation
options         ATH_ENABLE_11N          # Enable 802.11n support for AR5416 and later
device          ath_rate_sample         # SampleRate tx rate control for ath
#device         bwi                     # Broadcom BCM430x/BCM431x wireless NICs.
#device         bwn                     # Broadcom BCM43xx wireless NICs.
device          ipw                     # Intel 2100 wireless NICs.
device          iwi                     # Intel 2200BG/2225BG/2915ABG wireless NICs.
device          iwn                     # Intel 4965/1000/5000/6000 wireless NICs.
device          malo                    # Marvell Libertas wireless NICs.
device          mwl                     # Marvell 88W8363 802.11n wireless NICs.
device          ral                     # Ralink Technology RT2500 wireless NICs.
device          wi                      # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
device          wpi                     # Intel 3945ABG wireless NICs.

# Pseudo devices.
device          loop                    # Network loopback
device          random                  # Entropy device
device          padlock_rng             # VIA Padlock RNG
device          rdrand_rng              # Intel Bull Mountain RNG
device          ether                   # Ethernet support
device          vlan                    # 802.1Q VLAN support
device          tun                     # Packet tunnel.
device          md                      # Memory "disks"
device          gif                     # IPv6 and IPv4 tunneling
device          firmware                # firmware assist module
device          mwl                     # Marvell 88W8363 802.11n wireless NICs.
device          ral                     # Ralink Technology RT2500 wireless NICs.
device          wi                      # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
device          wpi                     # Intel 3945ABG wireless NICs.

# Pseudo devices.
device          loop                    # Network loopback
device          random                  # Entropy device
device          padlock_rng             # VIA Padlock RNG
device          rdrand_rng              # Intel Bull Mountain RNG
device          ether                   # Ethernet support
device          vlan                    # 802.1Q VLAN support
device          tun                     # Packet tunnel.
device          md                      # Memory "disks"
device          gif                     # IPv6 and IPv4 tunneling
device          firmware                # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device          bpf                     # Berkeley packet filter

# USB support
options         USB_DEBUG               # enable debug msgs
device          uhci                    # UHCI PCI->USB interface
device          ohci                    # OHCI PCI->USB interface
device          ehci                    # EHCI PCI->USB interface (USB 2.0)
device          xhci                    # XHCI PCI->USB interface (USB 3.0)
device          usb                     # USB Bus (required)
device          ukbd                    # Keyboard
device          umass                   # Disks/Mass storage - Requires scbus and da

# Sound support
device          sound                   # Generic sound driver (required)
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device          bpf                     # Berkeley packet filter

# USB support
options         USB_DEBUG               # enable debug msgs
device          uhci                    # UHCI PCI->USB interface
device          ohci                    # OHCI PCI->USB interface
device          ehci                    # EHCI PCI->USB interface (USB 2.0)
device          xhci                    # XHCI PCI->USB interface (USB 3.0)
device          usb                     # USB Bus (required)
device          ukbd                    # Keyboard
device          umass                   # Disks/Mass storage - Requires scbus and da

# Sound support
device          sound                   # Generic sound driver (required)
device          snd_cmi                 # CMedia CMI8338/CMI8738
device          snd_csa                 # Crystal Semiconductor CS461x/428x
device          snd_emu10kx             # Creative SoundBlaster Live! and Audigy
device          snd_es137x              # Ensoniq AudioPCI ES137x
device          snd_hda                 # Intel High Definition Audio
device          snd_ich                 # Intel, NVidia and other ICH AC'97 Audio
device          snd_via8233             # VIA VT8233x Audio

# MMC/SD
device          mmc                     # MMC/SD bus
device          mmcsd                   # MMC/SD memory card
device          sdhci                   # Generic PCI SD Host Controller

# VirtIO support
device          virtio                  # Generic VirtIO bus (required)
device          virtio_pci              # VirtIO PCI device
device          vtnet                   # VirtIO Ethernet device
device          virtio_blk              # VirtIO Block device
device          snd_emu10kx             # Creative SoundBlaster Live! and Audigy
device          snd_es137x              # Ensoniq AudioPCI ES137x
device          snd_hda                 # Intel High Definition Audio
device          snd_ich                 # Intel, NVidia and other ICH AC'97 Audio
device          snd_via8233             # VIA VT8233x Audio

# MMC/SD
device          mmc                     # MMC/SD bus
device          mmcsd                   # MMC/SD memory card
device          sdhci                   # Generic PCI SD Host Controller

# VirtIO support
device          virtio                  # Generic VirtIO bus (required)
device          virtio_pci              # VirtIO PCI device
device          vtnet                   # VirtIO Ethernet device
device          virtio_blk              # VirtIO Block device
device          virtio_scsi             # VirtIO SCSI device
device          virtio_balloon          # VirtIO Memory Balloon device

# HyperV drivers and enhancement support
device          hyperv                  # HyperV drivers

# Xen HVM Guest Optimizations
# NOTE: XENHVM depends on xenpci.  They must be added or removed together.
options         XENHVM                  # Xen HVM kernel infrastructure
device          xenpci                  # Xen HVM Hypervisor services driver

# VMware support
device          vmx                     # VMware VMXNET3 Ethernet

# Netmap provides direct access to TX/RX rings on supported NICs
device          netmap                  # netmap(4) support

# The crypto framework is required by IPSEC
# HyperV drivers and enhancement support
device          hyperv                  # HyperV drivers

# Xen HVM Guest Optimizations
# NOTE: XENHVM depends on xenpci.  They must be added or removed together.
options         XENHVM                  # Xen HVM kernel infrastructure
device          xenpci                  # Xen HVM Hypervisor services driver

# VMware support
device          vmx                     # VMware VMXNET3 Ethernet

# Netmap provides direct access to TX/RX rings on supported NICs
device          netmap                  # netmap(4) support

# The crypto framework is required by IPSEC
device          crypto                  # Required by IPSEC
```


----------



## Phishfry (Jan 4, 2017)

If you have to ask you should not disable a single thing.

Not trying to be a jerk there but I am assuming you want to slim down your kernel?

The handbook is quite accurate for a custom kernel. Read all of Chapter 8.
https://www.freebsd.org/doc/handbook/kernelconfig-config.html
See:Warning

Maybe you need to state your problem clearly so we can help.


----------



## Phishfry (Jan 4, 2017)

So if you are building from scratch with no FreeBSD background I would stick with the GENERIC kernel settings.

"When in doubt, just leave support in the kernel."


----------



## ShelLuser (Jan 4, 2017)

An tip can be to check the `dmesg` output. As you might have noticed FreeBSD uses the same naming scheme for the hardware and its drivers. For example, from my /var/run/dmesg.boot output:


```
bge0: enabling MBOX workaround for AMD-8131 PCI-X Bridge
bge0: CHIP ID 0x00001002; ASIC REV 0x01; CHIP REV 0x10; PCI on PCI-X 66 MHz; 32bit
```
As such I know that this line in the GENERIC kernel configuration is probably important to keep around:


```
device          bge                     # Broadcom BCM570xx Gigabit Ethernet
```
Same applies to most of the rest. The only caveat can be when one driver relies on the other, but that's most often well documented. Some random examples (from GENERIC, same as above):


```
options         NFS_ROOT                # NFS usable as /, requires NFSCL
options         PROCFS                  # Process filesystem (requires PSEUDOFS)
device          umass                   # Disks/Mass storage - Requires scbus and da
```
and so on...

A fair warning though..  If this is a server then I'd definitely recommend _against_ tampering like this. Unless we're talking VPS there's no telling what might happen in the future. For example: what would happen if I removed all other ethernet drivers from my GENERIC kernel, then my bge for some reason starts to malfunction and in order to get things back up ASAP I decide to throw in a RealTek until that time when I can get something better. Uh, oh: I removed the re and rl drivers. So I guess now I'll be looking at recompiling the kernel before I can get my server back up.

Needless to say, but that's not a very good situation to be in. Food for thought?


----------



## damfreebsd (Jan 6, 2017)

Thanks, I did read chapter 8, but what I need is to understand some of the options in the configuration file, I compiled the kernel with lots of less options for example in the PCI Ethernet NICs that use the common MII bus controller code I only keep the Realtek device that I need. After installing the new build kernel I booted but it consume the same amount of ram, nothing change, I did something wrong?


----------



## Phishfry (Jan 6, 2017)

I believe a slim kernel would be best used for system hardening, versus ram or disk considerations.

Most users of this forum are adding entries for added hardware support, not mucking with the underpinnings. Sure I don't need a floppy disk controller support in the kernel -but what is the penalty?
Not much. Factor in the pain of keeping a custom kernel when update time comes.


----------



## xtaz (Jan 6, 2017)

ShelLuser said:


> A fair warning though..  If this is a server then I'd definitely recommend _against_ tampering like this. Unless we're talking VPS there's no telling what might happen in the future. For example: what would happen if I removed all other ethernet drivers from my GENERIC kernel, then my bge for some reason starts to malfunction and in order to get things back up ASAP I decide to throw in a RealTek until that time when I can get something better. Uh, oh: I removed the re and rl drivers. So I guess now I'll be looking at recompiling the kernel before I can get my server back up.
> 
> Needless to say, but that's not a very good situation to be in. Food for thought?



In that situation you can easily load a kernel module by doing something like `kldload if_re`. In fact I think this will automatically happen if you tried to use the interface. Easy way to see what modules are available for loading is just to `ls /boot/kernel/*.ko`.


----------



## SirDice (Jan 6, 2017)

As this is a -RELEASE version I recommend just sticking to the GENERIC kernel. A custom kernel is going to cause issues with freebsd-update(8). So to keep things simple and easy to maintain just stick to the GENERIC kernel. There's very little to gain by running a custom kernel.


----------

