kernel/uboot关于defconfig的几个问题?
一,defconfig与.config是什么关系?
.config不是defconfig的拷贝,defconfig仅仅保存与默认配置不同的选项。配置阶段综合KCONFIG文件与defconfig,有冲突时以defconfig为准。
二,defconfig中的#CONFIG_XXX is not set有具体含义吗?
defconfig中的语法:
CONFIG_<optionName>=y CONFIG_<optionName>=m CONFIG_<optionName>=n --- 表示 CONFIG_<optionName>为no,但是这种用法很少,一般都使用 is not set # CONFIG_<optionName> is not set --- 表示 CONFIG_<optionName>为no
三,保存defconfig的方法?
make savedefconfig
四,其它命令?
see changes from one .config
to another one:
$ scripts/diffconfig .config_old .config_new
五,include/generated/autoconf.h
配置完成后(无论是defconfig还是menuconfig),会生成autoconf.h,供C文件包含,以判断某个CONFIG是否支持。
.config是为Makefile服务的。
1. 要修改在arch/arm/configs下的文件xxx_defconfig
2. make xxx_defconfig 会生成.config文件。
3. make menuconfig 修改配置后保存
4. make savedefconfig 生成defconfgi文件
5. cp defconfig arch/arm/configs/xxx_defconfig 保存
这样保存的defconfig文件,配置最小化