mirror of
				https://e.coding.net/weidongshan/01_all_series_quickstart.git
				synced 2025-11-04 13:05:59 +08:00 
			
		
		
		
	完结:u-boot的配置与编译
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								09_u-boot完全分析与移植/doc_pic/05.4_编译uboot的过程分析.tif
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								09_u-boot完全分析与移植/doc_pic/05.4_编译uboot的过程分析.tif
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								09_u-boot完全分析与移植/doc_pic/05.5_配置编译u-boot大总结.tif
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								09_u-boot完全分析与移植/doc_pic/05.5_配置编译u-boot大总结.tif
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -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的内容以免重复
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
### 5.4.2 编译过程总结
 | 
			
		||||
 
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user