u-boot-2014.10编译xxxx_defconfig

来源:互联网 发布:手机微杂志制作软件 编辑:程序博客网 时间:2024/05/09 15:11

编译xxxx_defconfig

在顶层Makefile中,有如下规则编译xxxx_defconfig。这和编译menuconfig的过程是一样的,请参考u-boot-2014.10编译menuconfig
<span style="font-family:Microsoft YaHei;">%config: scripts_basic outputmakefile FORCE+$(Q)$(CONFIG_SHELL) $(srctree)/scripts/multiconfig.sh $@</span>

在3个依赖编译完成后,会调用scripts/multiconfig.sh,参数为xxxx_defconfig。multiconfig.sh会调用do_board_defconfig --> run_make_config --> build

在build中会引入scripts/kconfig/Makefile,有如下规则:

<span style="font-family:Microsoft YaHei;">%_defconfig: $(obj)/conf$(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)</span>
这里要注意,我们送给顶层Makefile的目标是xxxx_defconfig,而在multiconfig.sh中,送给scripts/kconfig/Makefile的目标是.tmp_defconfig。为了编译xxxx_defconfig,我们调用了multiconfig.sh,而实际上,最终的输出时.tmp_defconfig --> .config,并没有真正生成xxxx_defconfig。上面的规则最终会输出这样的指令:

scripts/kconfig/conf --defconfig=arch/../configs/.tmp_defconfig Kconfig

我没有去读conf.c的源码,只是看了它的简单描述。

"  --defconfig <file>      New config with default defined in <file>\n"


0 0
原创粉丝点击