summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/config.8
diff options
context:
space:
mode:
authorwkoszek <wkoszek@FreeBSD.org>2007-05-12 19:38:18 +0000
committerwkoszek <wkoszek@FreeBSD.org>2007-05-12 19:38:18 +0000
commit2e673327ec1ac7c1b4a99f2bfe326756e0547067 (patch)
tree7df0bae947c0e7aa57e02e7373440d236848d9d0 /usr.sbin/config/config.8
parenta0d76ca625afcd4dd4e8a520e6855ba3b9bc2c96 (diff)
downloadFreeBSD-src-2e673327ec1ac7c1b4a99f2bfe326756e0547067.zip
FreeBSD-src-2e673327ec1ac7c1b4a99f2bfe326756e0547067.tar.gz
Improve INCLUDE_CONFIG_FILE support.
This change will let us to have full configuration of a running kernel available in sysctl: sysctl -b kern.conftxt The same configuration is also contained within the kernel image. It can be obtained with: config -x <kernelfile> Current functionality lets you to quickly recover kernel configuration, by simply redirecting output from commands presented above and starting kernel build procedure. "include" statements are also honored, which means options and devices from included files are also included. Please note that comments from configuration files are not preserved by default. In order to preserve them, you can use -C flag for config(8). This will bring configuration file and included files literally; however, redirection to a file no longer works directly. This commit was followed by discussion, that took place on freebsd-current@. For more details, look here: http://lists.freebsd.org/pipermail/freebsd-current/2007-March/069994.html http://lists.freebsd.org/pipermail/freebsd-current/2007-May/071844.html Development of this patch took place in Perforce, hierarchy: //depot/user/wkoszek/wkoszek_kconftxt/ Support from: freebsd-current@ (links above) Reviewed by: imp@ Approved by: imp@
Diffstat (limited to 'usr.sbin/config/config.8')
-rw-r--r--usr.sbin/config/config.842
1 files changed, 29 insertions, 13 deletions
diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8
index adffa12..01abc94 100644
--- a/usr.sbin/config/config.8
+++ b/usr.sbin/config/config.8
@@ -28,7 +28,7 @@
.\" @(#)config.8 8.2 (Berkeley) 4/19/94
.\" $FreeBSD$
.\"
-.Dd December 16, 2004
+.Dd May 8, 2007
.Dt CONFIG 8
.Os
.Sh NAME
@@ -36,9 +36,11 @@
.Nd build system configuration files
.Sh SYNOPSIS
.Nm
-.Op Fl Vgp
+.Op Fl CVgp
.Op Fl d Ar destdir
.Ar SYSTEM_NAME
+.Nm
+.Op Fl x Ar kernel
.Sh DESCRIPTION
.\" This is the old version of the
.\" .Nm
@@ -76,6 +78,11 @@ Available options and operands:
Print the
.Nm
version number.
+.It Fl C
+If the INCLUDE_CONFIG_FILE is present in a configuration file,
+kernel image will contain full configuration files included
+literally (preserving comments).
+This flag is kept for backward compatibility.
.It Fl d Ar destdir
Use
.Ar destdir
@@ -87,6 +94,12 @@ does not append
to the directory given.
.It Fl g
Configure a system for debugging.
+.It Fl x Ar kernel
+Print kernel configuration file embedded into a kernel
+file.
+This option makes sense only if
+.Cd "options INCLUDE_CONFIG_FILE"
+entry was present in your configuration file.
.It Fl p
Configure a system for profiling; for example,
.Xr kgmon 8
@@ -151,17 +164,6 @@ the problems in the configuration file should be corrected and
should be run again.
Attempts to compile a system that had configuration errors
are likely to fail.
-.Pp
-If the
-.Cd "options INCLUDE_CONFIG_FILE"
-is used in the configuration file the
-entire input file is embedded in the new kernel.
-This means that
-.Xr strings 1
-can be used to extract it from a kernel:
-to extract the configuration information, use the command
-.Pp
-.Dl "strings -n 3 kernel | sed -n 's/^___//p'"
.Sh DEBUG KERNELS
Traditional
.Bx
@@ -254,5 +256,19 @@ The
.Nm
utility appeared in
.Bx 4.1 .
+.Pp
+Before support for
+.Fl x
+was introduced,
+.Cd "options INCLUDE_CONFIG_FILE"
+included entire configuration file that used to be embedded in
+the new kernel.
+This meant that
+.Xr strings 1
+could be used to extract it from a kernel:
+to extract the configuration information, you had to use
+the command:
+.Pp
+.Dl "strings -n 3 kernel | sed -n 's/^___//p'"
.Sh BUGS
The line numbers reported in error messages are usually off by one.
OpenPOWER on IntegriCloud