I have done make menuconfig
for a board defconfig
and modified few configurations. When I select save, a new .config
was created in the Kernel top directory.
I want to create new defconfig
for this .config
file created.
Can I copy the .config
as a new defconfig
and copy to arch/arm/configs/
?
$ cp .config arch/arm/configs/board_new_defconfig
The platform's defconfig contains all of the Linux kconfig settings required to properly configure the kernel build (features, default system parameters, etc) for that platform. Defconfig files are typically stored in the kernel tree at arch/*/configs/ .
defconfig. Generates a new kernel configuration with the default answer being used for all options. The default values are taken from a file located in the arch/$ARCH/defconfig file, where $ARCH refers to the specific architecture for which the kernel is being built.
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.
make menuconfig is one of five similar tools that can configure Linux source, a necessary early step needed to compile the source code. make menuconfig , with a menu-driven user interface, allows the user to choose the features of Linux (and other options) that will be compiled.
I think you have to do just one command and use the created file as you want to.
% make savedefconfig % cp defconfig arch/arm/configs/my_cool_defconfig
(Pay attention to the filename template that is used for defconfig)
To get all possible targets just run
% make help
As noted by Adam Miller followed by Jeremy, users of Buildroot distribution can use wrappers for that purpose, i.e. (per Buildroot manual, section 8.1):
linux
barebox
bootloaderU-Boot
bootloadermake savedefconfig
minimizes the generated defconfig
skipping redundant configs that are implied by others.
For your platform, in a new defconfig file, yes. In fact this is the safest way to create a new defconfig. If you manually remove config entries from an existing config file to create a new one, you are likely to get dependency issues and during build, it might restart the kernel config and give you prompts for selecting individual config options.
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