如何从 .config 创建 defconfig 文件? [英] How to create a defconfig file from a .config?
问题描述
我已经为板子 defconfig
完成了 make menuconfig
并修改了一些配置.当我选择保存时,在内核顶级目录中创建了一个新的 .config
.
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.
我想为这个创建的 .config
文件创建新的 defconfig
.
I want to create new defconfig
for this .config
file created.
我可以将 .config
复制为新的 defconfig
并复制到 arch/arm/configs/
吗?
Can I copy the .config
as a new defconfig
and copy to arch/arm/configs/
?
$ cp .config arch/arm/configs/board_new_defconfig
推荐答案
我认为你只需要执行一个命令,并根据需要使用创建的文件.
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
(注意文件名模板用于 defconfig)
要获得所有可能的目标,只需运行
To get all possible targets just run
% make help
正如 Adam Miller 和 Jeremy,Buildroot 发行版的用户可以为此目的使用包装器,即(根据 Buildroot 手册,第 8.1 节):
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-savedefconfig 用于
linux
- barebox-savedefconfig 用于
barebox
引导加载程序 - uboot-savedefconfig 用于
U-Boot
引导加载程序
- linux-savedefconfig for
linux
- barebox-savedefconfig for
barebox
bootloader - uboot-savedefconfig for
U-Boot
bootloader
make savedefconfig
最小化生成的 defconfig
跳过其他人暗示的冗余配置.
make savedefconfig
minimizes the generated defconfig
skipping redundant configs that are implied by others.
这篇关于如何从 .config 创建 defconfig 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!