Stuck

Devin Teske dteske at vicor.com
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
> 	options INCLUDE_CONFIG_FILE
> 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
	make

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).
--
Devin


> 
> Cheers,
> Julian
> -- 
> Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
> 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 freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

--
Cheers,
Devin Teske

-> CONTACT INFORMATION <-
Business Solutions Consultant II
FIS - fisglobal.com
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.teske at fisglobal.com

-> LEGAL DISCLAIMER <-
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.

-> END TRANSMISSION <-



More information about the freebsd-questions mailing list