uboot Makefile 分析
来源:互联网 发布:xy苹果助手mac版 编辑:程序博客网 时间:2024/05/17 06:21
uboot Makefile 分析
配置过程
3329 hi3531a_config: unconfig3330 @$(MKCONFIG) $(@:_config=) arm hi3531a hi3531a NULL hi3531a//hi3531a_config依赖 unconfig 553 unconfig: 554 @rm -f $(obj)include/config.h $(obj)include/config.mk \ 555 $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ 556 $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep 执行完 unconfig 之后 执行源码顶层目录下的 mkconfig ,参数为 hi3531a arm hi3531a hi3531a NULL hi3531a mkconfig是一个脚本文件 会做以下几件事情 链接一个arch/arm/include/asm/arch-hi3531a到在arch/arm/include/asm/下的arch 链接一个arch/arm/include/asm/proc-armv 到在arch/arm/include/asm/下的proc 链接arch/arm/include/asm 到include/asm 在include目录下创建一个文件config.mk 在include目录下创建一个文件config.h
编译过程
1//首先找到第一个目标 344 # Always append ALL so that arch config.mk's can add custom ones 345 ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND) 346 347 all: $(ALL)2//首先会include include/config.mk 153 # load ARCH, BOARD, and CPU configuration 154 include $(obj)include/config.mk 155 export ARCH CPU BOARD VENDOR SOC3//然后根据 include/config.h 生成 CONFIG文件(autoconf.mk) //第一个是生成include/autoconf.mk的依赖文件 //第二个是根据include/config.h的文件内容,利用tools/scripts/define2mk.sed脚本将所有的CONFIG提取到autoconf.mk文件中 508 # 509 # Auto-generate the autoconf.mk file (which is included by all makefiles) 510 # 511 # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. 512 # the dep file is only include in this top level makefile to determine when 513 # to regenerate the autoconf.mk file. 514 $(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h 515 @$(XECHO) Generating $@ ; \ 516 set -e ; \ 517 : Generate the dependancies ; \ 518 $(CC) -x c -DDO_DEPS_ONLY -M $(HOSTCFLAGS) $(CPPFLAGS) \ 519 -MQ $(obj)include/autoconf.mk include/common.h > $@ 520 521 $(obj)include/autoconf.mk: $(obj)include/config.h 522 @$(XECHO) Generating $@ ; \ 523 set -e ; \ 524 : Extract the config macros ; \ 525 $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \ 526 sed -n -f tools/scripts/define2mk.sed > $@.tmp && \ 527 mv $@.tmp $@4/include include/autoconf.mk5/切到相应目录下make,并打包成.a文件6/根据连接文件u-boot.lds链接.a文件
uboot Makefile
版本:u-boot-2010.06
Makefile下载
参考资料
GNU ARM汇编–(十七)u-boot的makefile和mkconfig解读
阅读全文
0 0
- Uboot 之Makefile 分析
- Uboot的Makefile分析
- uboot之Makefile分析
- uboot makefile 分析 转
- uboot makefile 分析
- uboot Makefile 分析
- uboot makefile分析
- uboot makefile 分析 转
- Uboot 之Makefile 分析
- uboot-Makefile分析
- uboot之Makefile分析
- uboot的 MakeFile分析
- uboot之Makefile分析
- uboot Makefile源码分析
- Uboot 之Makefile 分析
- uboot makefile 分析 转
- uboot 学习 Makefile分析
- uboot makefile分析
- stm32f103zet6时钟
- Redmine的安装、总结和心得
- https原理
- 谈谈final, finally, finalize的区别
- 学习习近平总书记系列重要讲话精神
- uboot Makefile 分析
- c#连接mysql
- java编译期和运行期优化
- TeamViewer无法连接对方/正在初始化问题
- redis去重方案优化
- linux下目录结构
- 解决SpringMvc限定请求方法POST推送数据出现的中文乱码问题
- CoffeeScript和Sass提高Web开发效率
- linux RPM包安装、更新、删除等操作命令简明总结