[OpenWrt-Devel] [PATCH] kernel: add option to root .config for /proc/config.gz

Daniel Santos daniel.santos at pobox.com
Sun Nov 4 18:17:08 EST 2018

Exports CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC to the kernel .config
based upon menu choices under Global build settings --> Kernel build
options.  For simplicity, /proc/config.gz support is assumed, but if
kernel_menuconfig has disabled CONFIG_PROC_FS it will be pruned in

Signed-off-by: Daniel Santos <daniel.santos at pobox.com>
 config/Config-kernel.in | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index f38cc792dd..b03eb929c9 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -20,6 +20,24 @@ config KERNEL_BUILD_DOMAIN
 	  returned by 'uname -a' on running systems.
 	  If not set, uses system hostname at build time.
+        bool
+        default n
+	bool "Kernel .config support"
+	default n
+	help
+	  This option enables the complete Linux kernel ".config" file
+	  contents to be saved in the kernel. It provides documentation
+	  of which kernel options are used in a running kernel or in an
+	  on-disk kernel.  This information can be extracted from the kernel
+	  image file with the script scripts/extract-ikconfig and used as
+	  input to rebuild the current kernel or to build another kernel.
+	  Unless PROC_FS is disabled, it will also be exported via
+	  /proc/config.gz.
 	bool "Enable support for printk"
 	default y

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list