u-boot Makefile 分析 -- 清除
[Author: Bo Shen <voice.shen@gmail.com>
[u-boot: 2014.01-rc1]
u-boot的Makefile中包括以下几个清除命令:unconfig, clean, tidy, clobber, mrproper, distclean。另外,涉及一个backup命令。
下面具体分析每一个清除所做的工作。
1. unconfig
766 unconfig:
767 @rm -f $(obj)include/config.h $(obj)include/config.mk \
768 $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
769 $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep \
770 $(obj)include/spl-autoconf.mk \
771 $(obj)include/tpl-autoconf.mk
unconfig就是对一些自动生成的文件进行删除。
2. clean
783 clean:
784 @rm -f $(obj)examples/standalone/82559_eeprom \
785 $(obj)examples/standalone/atmel_df_pow2 \
786 $(obj)examples/standalone/eepro100_eeprom \
787 $(obj)examples/standalone/hello_world \
788 $(obj)examples/standalone/interrupt \
789 $(obj)examples/standalone/mem_to_mem_idma2intr \
790 $(obj)examples/standalone/sched \
791 $(obj)examples/standalone/smc911{11,x}_eeprom \
792 $(obj)examples/standalone/test_burst \
793 $(obj)examples/standalone/timer
794 @rm -f $(obj)examples/api/demo{,.bin}
795 @rm -f $(obj)tools/bmp_logo $(obj)tools/easylogo/easylogo \
796 $(obj)tools/env/{fw_printenv,fw_setenv} \
797 $(obj)tools/envcrc \
798 $(obj)tools/gdb/{astest,gdbcont,gdbsend} \
799 $(obj)tools/gen_eth_addr $(obj)tools/img2srec \
800 $(obj)tools/mk{env,}image $(obj)tools/mpc86x_clk \
801 $(obj)tools/mk{$(BOARD),}spl \
802 $(obj)tools/mxsboot \
803 $(obj)tools/ncb $(obj)tools/ubsha1 \
804 $(obj)tools/kernel-doc/docproc \
805 $(obj)tools/proftool
806 @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \
807 $(obj)board/matrix_vision/*/bootscript.img \
808 $(obj)board/voiceblue/eeprom \
809 $(obj)u-boot.lds \
810 $(obj)arch/blackfin/cpu/init.{lds,elf}
811 @rm -f $(obj)include/bmp_logo.h
812 @rm -f $(obj)include/bmp_logo_data.h
813 @rm -f $(obj)lib/asm-offsets.s
814 @rm -f $(obj)include/generated/asm-offsets.h
815 @rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
816 @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
817 @$(MAKE) -s -C doc/DocBook/ cleandocs
818 @find $(OBJTREE) -type f \
819 \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \
820 -o -name '*.o' -o -name '*.a' -o -name '*.exe' \
821 -o -name '*.cfgtmp' \) -print \
822 | xargs rm -f
818~822: The find "-print"参数:man find后可查找到对此的解释如下:
--->8---
print the full file name on the standard output, followed by a newline. If you are piping the output of find into another program and there is the faintest possibility that the files which you are searching for might contain a newline, then you should seriously consider using the "-print0" option instead of "-print".
---8<---
3. tidy
825 tidy: clean
826 find $(OBJTREE) -type f \( -name '*.depend*' \) -print | xargs rm -f
tidy在clean的基础上,对depend文件进行删除。
4. clobber
828 clobber: tidy
829 @find $(OBJTREE) -type f \( -name '*.srec' \
830 -o -name '*.bin' -o -name u-boot.img \) \
831 -print0 | xargs -0 rm -f
832 @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \
833 $(obj)cscope.* $(obj)*.*~
834 @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y)
835 @rm -f $(obj)u-boot.kwb
836 @rm -f $(obj)u-boot.pbl
837 @rm -f $(obj)u-boot.imx
838 @rm -f $(obj)u-boot-with-spl.imx
839 @rm -f $(obj)u-boot-with-nand-spl.imx
840 @rm -f $(obj)u-boot.ubl
841 @rm -f $(obj)u-boot.ais
842 @rm -f $(obj)u-boot.dtb
843 @rm -f $(obj)u-boot.sb
844 @rm -f $(obj)u-boot.bd
845 @rm -f $(obj)u-boot.spr
846 @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map}
847 @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map}
848 @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map}
849 @rm -f $(obj)spl/u-boot-spl.lds
850 @rm -f $(obj)tpl/{u-boot-tpl,u-boot-tpl.bin,u-boot-tpl.map}
851 @rm -f $(obj)tpl/u-boot-spl.lds
852 @rm -f $(obj)MLO MLO.byteswap
853 @rm -f $(obj)SPL
854 @rm -f $(obj)tools/xway-swap-bytes
855 @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
856 @rm -fr $(obj)include/generated
857 @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
858 @rm -f $(obj)dts/*.tmp
859 @rm -f $(obj)spl/u-boot-spl{,-pad}.ais
clobber在tidy的基础上更进一步的进行删除操作。
829~831: The find "-print0"参数:man find后可查找到对此的解释如下:
--->8---
print the full file name on the standard output, followed by a null character (instead of the newline character that "-print" uses). This allows file names that contain newlines or other types of white space to be correctly interpreted by programs that process the find output. This option corresponds to the -0 option of xargs.
---8<---
5. mrproper/distclean
861 mrproper \
862 distclean: clobber unconfig
863 ifneq ($(OBJTREE),$(SRCTREE))
864 rm -rf $(obj)*
865 endif
mrproper与distclean进行的操作是一样的。在clobber与unconfig的基础上,看是否需要将obj目录删除。
6. backup.
867 backup:
868 F=`basename $(TOPDIR)` ; cd .. ; \
869 gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
将源代码打成一个gzip的tar包。
gtar命令可能没有:workaround --> ln -s /bin/tar /bin/gtar
u-boot Makefile 分析 -- 清除相关推荐
- USB摄像头驱动--LCD显示摄像头图像(附Makefile分析)
对于一个应用程序,最重要的是明白目的是什么:将摄像头的数据解析出来,按一帧一个图片的方式将数据传到LCD的Framebuffer中去(如果LCD没有自动将Framebuffer中的数据刷到LCD上还需 ...
- u-boot的Makefile分析
U-BOOT是一个LINUX下的工程,在编译之前必须已经安装对应体系结构的交叉编译环境,这里只针对ARM,编译器系列软件为arm-linux-*. U-BOOT的下载地址: http://source ...
- Linux内核移植之一:内核源码结构与Makefile分析
内容来自 韦东山<嵌入式Linux应用开发完全手册> 一.内核介绍 1.版本及其特点 Linux内核的版本号可以从源代码的顶层目录下的Makefile中看到,比如下面几行它们构成了Linu ...
- u-boot分析之makefile分析(二)
目录 u-boot(二)makefile 引入 目录结构(1.1.6) 配置文件 目标 配置具体的单板 编译阶段 过程 链接入口 配置链接地址 附录 附录A:mkconfig解析 附录B 链接脚本 u ...
- 操作系统课设--NACHOS试验环境准备、安装与MAKEFILE分析
山东大学操作系统课设lab1 实验一 NACHOS试验环境准备.安装与MAKEFILE分析(lab1) 实验环境: 分析记录: 1. 准备虚拟机下LINUX宿主操作系统环境 2. NACHOS实验代码 ...
- 浅谈:Spring Boot原理分析,切换内置web服务器,SpringBoot监听项目(使用springboot-admin),将springboot的项目打成war包
浅谈:Spring Boot原理分析(更多细节解释在代码注释中) 通过@EnableAutoConfiguration注解加载Springboot内置的自动初始化类(加载什么类是配置在spring.f ...
- uboot源码——主Makefile分析
以下内容源于朱有鹏嵌入式课程的学习,如有侵权,请告知删除. 一.配置编译初体验 1.uboot来源于官方(uboot官网下载),或者SoC官方(研发s5pv210芯片的公司推出的开发板,SMDKV21 ...
- 1.3 nuclei sdk Makefile分析
nuclei sdk Makefile分析 Make 命令 1. 根目录Makefile 2. 源码选择application/baremetal/helloworld Makefile如下 3. 分 ...
- 开发板与虚拟机组网、uboot源码makefile分析、uboot安全启动与非安全启动方式、uboot源码配置与编译流程、制作TF启动盘
开发板与虚拟机组网. 局面:开发板.PC(Ubuntu系统).网线直连PC:设置Ubuntu系统:1.设置桥接模式,桥接到PC的有线网卡上:2.手动配置IP V4的地址信息,注意和开发板保持在同一网段 ...
最新文章
- 2009-徘徊-开场白
- JDBC--代码实现增删改查、及SQL注入问题解决
- Mysql8 查询事务隔离级别
- idea设置文件多行显示
- 批量修改Service Order description的report
- delphi dll是否可用var参数_时间序列之向量自回归(VAR)学习重点
- 流言终结者- Flutter和RN谁才是更好的跨端开发方案?
- linux查看一小时之内的日志,linux – 在[timespan]内(例如最后一小时)查找日志文件中的条目...
- 20种小技巧,玩转Google Colab
- jmu-Java-07多线程-互斥访问 (5分)
- webpack对模块查找的优化
- el-table click事件多次触发_JavaScript从零开始——DOM事件编程(1)
- pytorch冻结模型
- Atitit 项目管理之沟通管理概论问题管理 艾提拉著 跨语言沟通 群组沟通 书面沟通 目录 1. 沟通方式	2 1.1. 书面沟通 vs 当面沟通	2 1.2. 群组沟通(公开沟通) vs
- dbutil 1.1.6
- 网络爬虫学习(十二)
- 信道编码与信源编码基本
- 神经网络控制学习笔记——神经网络背景1
- 看完这篇解决你99%的运维安全陋习,快别踩坑了!
- jacob转pdf linux,Java 使用jacob实现doc转pdf(附带其他方法分析)
热门文章
- mysql数据库实验查询_MySQL数据库表数据的查询操作实验
- 微信小程序多选框圆角修改
- win10计算机光驱启动怎么办,Win10系统禁用/开启光驱的详细步骤(图文)
- CSS精灵 background-position用法
- 【随笔】现实环境下的自我塑造
- C语言/C++/数据结构牛客网刷题20200302
- 瑞芯微RK3568开发板核心板和底板
- 一种新的脉冲同步电路(利用异步复位/置位)
- 牛客网Wannafly挑战赛4 C.割草机(模拟)
- 更改计算机管理员用户名和密码忘记了怎么办,忘记电脑管理员Administrator密码?使用新建账户能否恢复密码?...