Automatically answer defaults when doing 'make oldconfig' on a kernel tree
When building a new kernel based on a previous config, is there a way to automate the make oldconfig
process so that it sets new options to their default values?
Edit: What I mean is that when using a .config (from /boot/config-*
or /proc/config.gz
) on a newer kernel, the make oldconfig
process will ask wether or not you want to enable options that were not available in your older kernel. You can answer Y/n/m or press enter to accept default. I would like to accept defaults automatically with no user interaction.
Solution 1:
Use the command :
yes "" | make oldconfig
The 'yes' command repeatedly output a line with all specified string, or 'y' by default.
So, you can use it to simply "press enter", which will result in using the defaults value for the 'make oldconfig' command.
Solution 2:
make olddefconfig
is what you want. From the help (make help
in the kernel source dir)
olddefconfig - Same as silentoldconfig but sets new symbols to their default value