Can anyone explain what the target "oldconfig" does exactly in the Linux kernel makefile? I see it referenced in some build documentation but never explained what it does exactly.
make oldconfig takes the current kernel configuration in the . config file, and updates it based on the new kernel release. To do this, it prints out all configuration questions, and provides an answer for them if the option is already handled in the configuration file.
The top Makefile is responsible for building two major products: vmlinux (the resident kernel image) and modules (any module files). It builds these goals by recursively descending into the subdirectories of the kernel source tree. The list of subdirectories which are visited depends upon the kernel configuration.
Running make mrproper or make distclean returns the kernel source tree to its unconfigured state. This means you loose your . config file. You will need to create a new . config file before compiling the kernel.
"make localmodconfig" Create a config based on current config and loaded modules (lsmod). Disables any module option that is not needed for the loaded modules. To create a localmodconfig for another machine, store the lsmod of that machine into a file and pass it in as a LSMOD parameter.
It reads the existing .config
file that was used for an old kernel and prompts the user for options in the current kernel source that are not found in the file. This is useful when taking an existing configuration and moving it to a new kernel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With