完结:u-boot的配置与编译

This commit is contained in:
weidongshan
2023-05-22 14:06:45 +08:00
parent c8927987f8
commit 856f05749d
4 changed files with 32 additions and 0 deletions

View File

@@ -221,6 +221,8 @@ include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
前面生成了.config但是它不是最终版本的配置文件。
顶层Makefile会包含2个配置文件include/config/auto.conf、include/autoconf.mk。
u-boot中有非常多的配置文件
* .config来自单板的默认配置、Kconfig
@@ -688,6 +690,7 @@ u-boot-nodtb.bin: u-boot FORCE
```shell
dts/dt.dtb: checkdtc u-boot
# make -f $(srctree)/scripts/Makefile.build obj=dts dtbs
$(Q)$(MAKE) $(build)=dts dtbs
```
@@ -814,6 +817,35 @@ make
### 5.4.1 配置过程总结
顶层Makefile会包含2个配置文件include/config/auto.conf、include/autoconf.mk。
u-boot中有非常多的配置文件
* .config来自单板的默认配置、Kconfig
* include/config/auto.conf来自.config去掉了很多注释
* u-boot.cfg它的内容跟头文件类似来自
* .config
* 头文件include/common.h又包含了"#include <config.h>"config.h内容如下:
```c
/* Automatically generated - do not edit */
#define CONFIG_BOARDDIR board/st/stm32mp1
#include <config_defaults.h>
#include <config_uncmd_spl.h>
#include <configs/stm32mp1.h>
#include <asm/config.h>
#include <linux/kconfig.h>
#include <config_fallbacks.h>
```
* include/autoconf.mk来自u-boot.cfg但是移除include/config/auto.conf的内容以免重复
![](pic/13_u-boot_stm32mp157_cfg.png)
### 5.4.2 编译过程总结