那個(gè)網(wǎng)站可以做視頻app制作的企業(yè)網(wǎng)站建設(shè)方案模板
一. uboot 的 make xxx_deconfig配置
本文接上一篇文章的內(nèi)容。地址如下:uboot 頂層Makefile-make xxx_deconfig過程說明二_凌肖戰(zhàn)的博客-CSDN博客
本文繼續(xù)來學(xué)習(xí) uboot 源碼在執(zhí)行 make xxx_deconfig 這個(gè)配置過程中,頂層 Makefile有關(guān)的執(zhí)行思路。
uboot執(zhí)行配置過程時(shí),執(zhí)行了兩條關(guān)鍵命令。本文分析第二條命令:
make -f ./scripts/Makefile.build obj=scripts/kconfig xxx_defconfig
二. %config目標(biāo)對(duì)應(yīng)的命令
%config 目 標(biāo) 對(duì) 應(yīng) 的 命 令 為 :
make -f ./scripts/Makefile.build obj=scripts/kconfig xxx_defconfig
同上一篇文章類似分析。各個(gè)變量值如下:
src= scripts/kconfig
kbuild-dir = ./scripts/kconfig
kbuild-file = ./scripts/kconfig/Makefile
include ./scripts/kconfig/Makefile
可以看出, Makefilke.build 會(huì)讀取 scripts/kconfig/Makefile 中的內(nèi)容,此文件有如下所示內(nèi)
容:
113 %_defconfig: $(obj)/conf
114 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@
$(Kconfig)
115
116 # Added for U-Boot (backward compatibility)
117 %_config: %_defconfig
118 @:
目標(biāo) %_defconfig 剛好和我們輸入的 xxx_defconfig 匹配,所以,會(huì)執(zhí)行這條規(guī)則。
依賴為 $(obj)/conf ,展開后就是 scripts/kconfig/conf 。
接下來,就是檢查并生成依賴 scripts/kconfig/conf 。
conf 是主機(jī)軟件,到這里我們就不要糾結(jié) conf 是怎么編譯出來的, 像 conf 這種主機(jī)所使用的工具類軟件我們一般不關(guān)心它是如何編譯產(chǎn)生的。
得到 scripts/kconfig/conf 以后,就要執(zhí)行目標(biāo) %_defconfig 的命令:
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
其中,變量值為:
silent=-s 或?yàn)榭?SRCARCH=..
Kconfig=Kconfig
目標(biāo) %_defconfig 的命令,展開后:
@scripts/kconfig/conf --defconfig=arch/../configs/xxx_defconfig Kconfig
上述命令用到了 xxx_defconfig 文件,比如 mx6ull_alientek_nand_defconfig 。這里會(huì)將
mx6ull_alientek_emmc_defconfig 中的配置輸出到 .config 文件中,最終生成 uboot 根目錄下
的 .config 文件。
三.? uboot的make xxx_deconfig 總結(jié)
這個(gè)就是uboot配置命令 make xxx_defconfig 執(zhí)行流程,總體執(zhí)行思路如下:
至此,uboot配置命令 make xxx_defconfig對(duì)應(yīng),頂層Makefile大體思路 就分析完了,接下來就要分析一下 u-boot.bin 是怎么生成的了。