Devin Teske dteske at
Tue Feb 15 18:08:35 UTC 2011

On Feb 15, 2011, at 4:25 AM, Julian H. Stacey wrote:

>> Where do 
>> I locate the kernel config file?
> Adding
> to
> 	/sys/i386/conf/GENERIC
> 	or /sys/amd64/conf/
> allows
> 	config -x /boot/kernel/kernel

NOTE: Slightly OT, but figured it was worth the post.

As a side-note, the config-file will be "cleaned up" before being embedded into the kernel. Meaning "config -x `sysctl -n kern.bootfile`" will rarely ever match the config that was used to generate the kernel in the first place.

Specifically, comments are removed, and if you've nested configs using the "include" statement, redundant and/or conflicting directives will be consolidated.

If you instead wish to embed the kernel config AS-IS, comments and structure remaining in-tact, you should instead:

	cd /sys/ARCH/conf
	config -C -g CONFIG

NOTE: `/sys' ought to be a symbolic link to `/usr/src/sys'
NOTE: ARCH is to be replaced with something like "i386", "amd64", etc.
NOTE: CONFIG is to be replaced with something like "GENERIC", "PAE", "MYCUSTOMKERNELCONFIG", etc.

Then one simply does the following to compile the kernel:

	cd ../../compile/CONFIG
	make depend

BUT... then again not everybody:
a. compiles their own custom kernels
b. uses a custom config
c. needs to be able to extract the config verbatim from the compiled kernel

YNMV (Your Needs May Vary).

> Cheers,
> Julian
> -- 
> Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich
> Mail plain text;  Not quoted-printable, Not HTML, Not base 64.
> Reply below text sections not at top, to avoid breaking cumulative context.
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

Devin Teske

Business Solutions Consultant II
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.teske at

This message  contains confidential  and proprietary  information
of the sender,  and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person  is strictly prohibited.  If you have  received this
message in error,  please notify  the e-mail sender  immediately,
and delete the original message without making a copy.


More information about the freebsd-questions mailing list