Solved [SOLVED] /usr/src/sys/arch/conf/DEFAULTS

W'hats the purpose of the /usr/src/sys/ARCH/conf/DEFAULTS file? For instance, in the /usr/src/sys/amd64/conf directory there's:
DEFAULTS
GENERIC
GENERIC.hints
Makefile
NOTES
VT

If I build a kernel with make buildkernel, it will use the GENERIC configuration file. If I build a kernel with make buildkernel KERNCONF=VT, it will use the VT configuration file, which has an include line to pull in GENERIC. But then, when/how does DEFAULTS come in to play?

Is it specified somewhere, to include DEFAULTS? Or does the mechanism for building kernel simply know to always pull in DEFAULTS? Or, is DEFAULTS not included, and only there as a NOTES type file, to suggest options? The file has device and option for isa, mem, io, partitioning schemes, etc.

So, what happens if I build a custom kernel? Does FreeBSD just know to include whatever is in the DEFAULTS file regardless? Or do I need to include DEFAULTS file, or write in those devices and options somehow?

I'm not asking as part of a problem I'm trying to solve. Just trying to understand FreeBSD better and how the kernel configuration files work. I've read through the Handbook and man config but can't find a concise explanation of how DEFAULTS works.

Code:
/usr/src/sys/amd64/conf/DEFAULS 
#
# DEFAULTS -- Default kernel configuration file for FreeBSD/amd64
#
# $FreeBSD: stable/10/sys/amd64/conf/DEFAULTS 232619 2012-03-06 20:01:25Z attilio $

machine         amd64

# Bus support.
device          isa

# Pseudo devices.
device          mem             # Memory and kernel memory devices
device          io              # I/O device

# UART chips on this platform
device          uart_ns8250

# Default partitioning schemes
options         GEOM_PART_BSD
options         GEOM_PART_EBR
options         GEOM_PART_EBR_COMPAT
options         GEOM_PART_MBR

options         NEW_PCIB
 
Re: /usr/src/sys/arch/conf/DEFAULTS

DEFAULTS is automatically included into any kernel that you build via buildkernel. DO NOT EDIT THIS FILE! In fact, just ignore it. :) These are the settings that MUST be present in the kernel in order for that kernel to work on that architecture. If you break/delete/remove/alter this file, your kernel will also break.
 
Back
Top