Linux内核配置make x210ii_qt_defconfig做了什么?
执行make x210ii_qt_defconfi时进入根目录Makefile匹配%config目标,该目标的依赖关系链如下:
%config(1)
scripts_basic(1.1)outputmakefile(1.2)FORCE(1.3)
开始执行1.1,$(Q)$(MAKE) $(build)=scripts/basic 该句执行make -f scripts/Makefile.build 并且定义obj=scripts/basic;先包含scripts/basic/Makefile,默认执行要获得__build,其此时依赖关系链如下:
__build(2)
scripts/basic/fixdep(2.1) scripts/basic/docproc(2.2) scripts/basic/hash(2.3)
2.1,2.2,2.3由scripts/Makefile.host依据scripts/basic材料获得,2为空退出,回到1.2
又1.2 1.3为空则开始1 的命令,$(Q)mkdir -p include/linux include/config创建目录,$(Q)$(MAKE) $(build)=scripts/kconfig $@,该句执行make -f scripts/Makefile.build x210ii_qt_defconfig并且定义obj=scripts/kconfig ;先包含scripts/kconfig/Makefile,执行要获得目标x210ii_qt_defconfig则去匹配scripts/kconfig/Makefile下%_defconfig,该目标关系链如下:
%_defconfig(3)
scripts/kconfig/conf(3.1)
3.1 由scripts/Makefile.host根据scripts/kconfig里的材料获得,开始3的命令$(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig)即conf -D arch/arm/configs/x210ii_qt_defconfig ,这句将arch/arm/configs/x210ii_qt_defconfig复制到根目录下命名为.config
1的命令结束退出
总结:
执行make x210ii_qt_defconfig获得了.config