Kernel/IKCONFIG support

Configuration and usage of In-kernel Config (IKCONFIG) support for kernel beginners.

What is IKCONFIG
In-kernel .config support, also known as IKCONFIG, allows users to build a copy of the configuration the kernel was built with inside the kernel itself. This allows them to inspect the configuration of the kernel while it is running, without having to worry whether they changed or cleaned the source directory after it was built.

Why is it important?

This can assist users with debugging things like if a particular driver was compiled when the kernel was built, whether a networking option was enabled, or any other configuration option when they built the kernel, and is often asked for when looking for support on the forums or IRC channels.

Enabling IKCONFIG Support
Kernel .config support can be enabled either built in to the kernel, or as a module. If built in to the kernel, there will always be a file to read the configuration from. If preferred, it can be built as a module so that the configuration is only available when the user loads the module.

Accessing IKCONFIG
If users built IKCONFIG support as a module, then before they can use it they will need to load the module in to the kernel. This can be done by running the following command:

Users should now be able to see the file. This is a compressed copy of the entire kernel configuration at build time.

When users finish looking at the configuration, they can unload the module with:

The module should now have been unloaded and the file removed.

Reading IKCONFIG
is a compressed copy of the kernel configuration, which means that in order to read it, it needs to be decompressed. There are two ways to do that.

Quick queries
If users just need to check one or two options, then the easiest way to read the file is to grep it through the decompressor to find what they're looking for.

Full file
Alternatively, if users want a more in-depth look at the configuration of the running kernel, they will need to copy the compressed file from where it is and decompress it.

Optional: Load module on boot
If users built their kernel with IKCONFIG support as a module, and they want that module loaded when their system boots, they will need to add it to the list of auto-loaded modules for their system.