提取在制作过程中编译的文件

时间:2019-03-04 23:15:58

标签: gnu-make u-boot

u-boot支持许多平台。并且有些文件具有相同的文件名。很难确定特定平台的制作过程中涉及哪个文件。如何获取在制作过程中使用的所有文件?

1 个答案:

答案 0 :(得分:0)

您可以:

  • 首先,为目标平台构建u-boot,
  • 然后查找编译过程中产生的所有目标文件。

例如,如果您的u-boot主makefile位于/opt/u-boot-2019.01中, 以下命令将为您提供所有已编译的目标文件:

cd /opt/u-boot-2019.01
find . -name "*.o"

然后,您可以将检索到的文件列表与目标板的配置文件的内容相关联,该文件通常位于configs子目录中。

在我的情况下,要显示的第一个目标文件是:

./scripts/kconfig/zconf.tab.o
./scripts/kconfig/conf.o
./scripts/dtc/srcpos.o
./scripts/dtc/dtc.o
./scripts/dtc/treesource.o
./scripts/dtc/util.o
./scripts/dtc/fstree.o
./scripts/dtc/checks.o
./scripts/dtc/flattree.o
./scripts/dtc/dtc-parser.tab.o
./scripts/dtc/livetree.o
./scripts/dtc/dtc-lexer.lex.o
./scripts/dtc/data.o
./arch/arm/cpu/built-in.o
./arch/arm/cpu/armv8/built-in.o
./arch/arm/cpu/armv8/cpu-dt.o
./arch/arm/cpu/armv8/cache_v8.o
./arch/arm/cpu/armv8/generic_timer.o
./arch/arm/cpu/armv8/exceptions.o
./arch/arm/cpu/armv8/lowlevel_init.o
./arch/arm/cpu/armv8/fwcall.o
./arch/arm/cpu/armv8/cpu.o
./arch/arm/cpu/armv8/start.o
./arch/arm/cpu/armv8/cache.o
./arch/arm/cpu/armv8/transition.o
./arch/arm/cpu/armv8/tlb.o
./arch/arm/mach-sunxi/built-in.o
./arch/arm/mach-sunxi/clock.o
./arch/arm/mach-sunxi/dram_helpers.o
./arch/arm/mach-sunxi/pinmux.o
./arch/arm/mach-sunxi/prcm.o
./arch/arm/mach-sunxi/board.o
./arch/arm/mach-sunxi/clock_sun6i.o
./arch/arm/mach-sunxi/cpu_info.o
./arch/arm/mach-sunxi/rsb.o

例如,文件./arch/arm/mach-sunxi/rsb.o在列表中这一事实意味着./arch/arm/mach-sunxi/rsb.c是在构建过程中编译的,并有助于生成最终的u-boot映像。