OK6410A 开发板 (三) 4 u-boot-2021.01 boot 解析 SPL 编译链接部分

1. include/generated/asm-offsets.h 和 include/generated/asm-offsets.h的生成
CC      spl/./lib/asm-offsets.s
UPD     spl/./include/generated/generic-asm-offsets.h
CC      spl/./arch/arm/lib/asm-offsets.s
UPD     spl/./include/generated/asm-offsets.h
2. spl/arch/arm/mach-s3c64xx 		soc相关代码
3. spl/arch/arm/cpu					架构,微架构代码
4. arch/arm/cpu/arm1176/start.S 	reset符号在的文件	
5. spl/arch/arm/lib 				arm架构通用库
6. spl/board/samsung/ok6410a/ok6410a.c 板级相关代码
7. 板级库 spl/board/samsung/ok6410a/lowlevel_init.S spl/board/samsung/ok6410a/bl2_mmc_copy.c (链接脚本中指明了链接)
8. spl/common/spl 					spl 通用库1
9. spl/common/init 					spl 通用init
10.spl/lib 							spl 通用库2
10.spl/disk 						块驱动
11.spl/drivers/block 				块驱动
12.spl/drivers/serial 				串口驱动
13.spl/fs 							文件系统
14.spl/u-boot-spl.lds 				链接脚本的生成
15.spl/u-boot-spl 					根据链接脚本 链接 1-13(目录一般对应built-in.o) ,生成spl/u-boot-spl 
16.其他镜像相关文件 u-boot-spl-nodtb.bin/u-boot-spl.bin/u-boot-spl.sym

以上过程分成x种 
	1. include/generated/asm-offsets.h 的生成
	2. .o文件的生成
	3. built-in.o 的生成
	4. 链接脚本spl/u-boot-spl.lds的生成
	5. spl/u-boot-spl 的生成 
	6. 其他镜像相关文件的生成

过程分类

  • 1 include/generated/asm-offsets.h 和 include/generated/generic-asm-offsets.h 的生成

make -f ../scripts/Makefile.build obj=spl/.

  arm-linux-gnueabi-gcc -Wp,-MD,spl/./lib/.asm-offsets.s.d  -nostdinc -isystem /home/suws/ok6410/system-new/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/include -Ispl/include -Iinclude  -I../include  -I../arch/arm/include -include ../include/linux/kconfig.h  -I../. -Ispl/. -D__KERNEL__ -D__UBOOT__ -DCONFIG_SPL_BUILD -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE -Os -fno-stack-protector -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -g -fstack-usage -Wno-format-nonliteral -Wno-unused-but-set-variable -Werror=date-time -ffunction-sections -fdata-sections -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -ffunction-sections -fdata-sections -fno-common -ffixed-r9 -msoft-float -pipe -march=armv5t -D__LINUX_ARM_ARCH__=6  -I../arch/arm/mach-s3c64xx/include -DDO_DEPS_ONLY    -DKBUILD_BASENAME='"asm_offsets"'  -DKBUILD_MODNAME='"asm_offsets"'  -fverbose-asm -S -o spl/./lib/asm-offsets.s ../lib/asm-offsets.c

set -e; mkdir -p spl/./include/generated/; 	(set -e; echo "#ifndef __GENERIC_ASM_OFFSETS_H__"; echo "#define __GENERIC_ASM_OFFSETS_H__"; echo "/*"; echo " * DO NOT MODIFY."; echo " *"; echo " * This file was generated by Kbuild"; echo " */"; echo ""; sed -ne 	"s:[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\":\1:; /^->/{s:->#\(.*\):/* \1 */:; s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; echo ""; echo "#endif" ) < spl/./lib/asm-offsets.s > spl/./include/generated/generic-asm-offsets.h.tmp; if [ -r spl/./include/generated/generic-asm-offsets.h ] && cmp -s spl/./include/generated/generic-asm-offsets.h spl/./include/generated/generic-asm-offsets.h.tmp; then rm -f spl/./include/generated/generic-asm-offsets.h.tmp; else : '  UPD     spl/./include/generated/generic-asm-offsets.h'; mv -f spl/./include/generated/generic-asm-offsets.h.tmp spl/./include/generated/generic-asm-offsets.h; fi

  arm-linux-gnueabi-gcc -Wp,-MD,spl/./arch/arm/lib/.asm-offsets.s.d  -nostdinc -isystem /home/suws/ok6410/system-new/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/include -Ispl/include -Iinclude  -I../include  -I../arch/arm/include -include ../include/linux/kconfig.h  -I../. -Ispl/. -D__KERNEL__ -D__UBOOT__ -DCONFIG_SPL_BUILD -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE -Os -fno-stack-protector -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -g -fstack-usage -Wno-format-nonliteral -Wno-unused-but-set-variable -Werror=date-time -ffunction-sections -fdata-sections -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -ffunction-sections -fdata-sections -fno-common -ffixed-r9 -msoft-float -pipe -march=armv5t -D__LINUX_ARM_ARCH__=6  -I../arch/arm/mach-s3c64xx/include -DDO_DEPS_ONLY    -DKBUILD_BASENAME='"asm_offsets"'  -DKBUILD_MODNAME='"asm_offsets"'  -fverbose-asm -S -o spl/./arch/arm/lib/asm-offsets.s ../arch/arm/lib/asm-offsets.c

set -e; mkdir -p spl/./include/generated/; 	(set -e; echo "#ifndef __ASM_OFFSETS_H__"; echo "#define __ASM_OFFSETS_H__"; echo "/*"; echo " * DO NOT MODIFY."; echo " *"; echo " * This file was generated by Kbuild"; echo " */"; echo ""; sed -ne 	"s:[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\":\1:; /^->/{s:->#\(.*\):/* \1 */:; s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; echo ""; echo "#endif" ) < spl/./arch/arm/lib/asm-offsets.s > spl/./include/generated/asm-offsets.h.tmp; if [ -r spl/./include/generated/asm-offsets.h ] && cmp -s spl/./include/generated/asm-offsets.h spl/./include/generated/asm-offsets.h.tmp; then rm -f spl/./include/generated/asm-offsets.h.tmp; else : '  UPD     spl/./include/generated/asm-offsets.h'; mv -f spl/./include/generated/asm-offsets.h.tmp spl/./include/generated/asm-offsets.h; fi

两个文件生成过程类似,以 include/generated/asm-offsets.h 为例
arm-linux-gnueabi-gcc 
-Wp,-MD,spl/./lib/.asm-offsets.s.d
	// Pass comma-separated <options> on to the preprocessor.
	// -wp,-MD 会生成相应的依赖文件
	// 没有找到 lib/.asm-offsets.s.d,找到了 lib/.asm-offsets.s.cmd
-nostdinc
	// 使编译器不再系统默认的头文件目录(可通过 <arm->gcc -xc -E -v - 查找)里面找头文件, 一般和 -I 联合使用,明确限定头文件的位置
	// 命令得出的结果
	// /home/mmt/work/BiscuitOS/output/linux-5.10-arm32/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/include
	// /home/mmt/work/BiscuitOS/output/linux-5.10-arm32/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/include-fixed
	// /home/mmt/work/BiscuitOS/output/linux-5.10-arm32/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/../../../../arm-linux-gnueabi/include
	// /home/mmt/work/BiscuitOS/output/linux-5.10-arm32/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../arm-linux-gnueabi/libc/usr/include
-isystem /home/suws/ok6410/system-new/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/include 
	// -isystem dir
	// 在-I指定的所有目录之后,但在标准系统目录之前,在dir中搜索头文件。
	// 将其标记为系统目录,以便它得到与应用于标准系统目录相同的特殊处理。
	// 如果dir以=开头,那么=将被sysroot参数的值替换;请参阅–sysroot和-isysroot。
-Ispl/include  -Iinclude   -I../include   -I../arch/arm/include  -include ../include/linux/kconfig.h   -I../.  -Ispl/. 
	// 注意这些都是相对路径(相对于运行路径)
	// 此时命令运行在 output 目录下,运行路径就是 该output目录所在的全路径
	// 运行路径可通过 /proc/xxx/cwd  查到
-D__KERNEL__  -D__UBOOT__  -DCONFIG_SPL_BUILD 
	// 给预处理器preprocessor用的
	// 宏定义
-Wall 
	// 生成所有警告信息
	// -W 开头的所有选项都是 警告
-Wstrict-prototypes 
	// C and Objective-C-only Warning Options
	// 如果在未指定参数类型的情况下声明或定义函数,则发出警告。
	//(如果前面有指定参数类型的声明,则允许使用旧式函数定义而不发出警告。)
-Wno-format-security 
	// 此参数禁止以下功能
	// 如果指定了-Wformat,则在格式字符串需要无符号参数且参数有符号时也发出警告,反之亦然。
-fno-builtin 
	// Don't recognize built-in functions that do not begin with __builtin_ as prefix.
-ffreestanding 
	// 断言编译以独立环境为目标。
	// 这意味着-fno-builtin。
	// 一个独立的环境包括
		// 一个标准库可能不存在
		// 程序启动可能不一定在“main”的环境。
		// 最明显的例子是操作系统内核
		// 相当于 -fno-hosted
-std=gnu11 
	// 确定语言标准。
	// 语言标准有很多,有C99,C11,gnu11,gnu++14等
	// 此选项目前只在编译C或C++时被支持。
-fshort-wchar
	// 将“wchar_t”的基础类型重写为“short unsigned int”,而不是目标的默认类型。
	// 此选项对于构建在WINE下运行的程序非常有用。
	// 警告:-fshort-wchar开关导致GCC生成的代码与不使用该开关生成的代码二进制不兼容。
	// 使用它符合非默认应用程序二进制接口。
-fno-strict-aliasing 
	// -fno-strict-aliasing are passed through to the link stage and merged conservatively for conflicting translation units.  
	// 被传递到link阶段,并保守地合并冲突的翻译单元。
-fno-PIE
	// -fPIE
	// 这些选项类似于-fpic和-fPIC,但生成的位置无关代码只能链接到可执行文件中。
	// 通常在链接期间使用-pie GCC选项时使用这些选项。
	// -fpie和-fPIE都定义宏“__pie__”和“__PIE__”。
	// 宏的-fpie值为1,-fPIE值为2。
	// -fno-PIE
	// 应该是 ???
-Os
	// 大小优化。
	// -Os支持 不会增加代码大小的所有的 -O2优化。
	// 它还执行进一步的优化,以减少代码大小。
-fno-stack-protector 
	// Optimize the prologue of variadic argument functions with respect to usage of those arguments.
-fno-delete-null-pointer-checks
	// -fdelete-null-pointer-checks
	// Assume that programs cannot safely dereference null pointers, and that no code or data element resides there.  
	// This enables simple constant folding optimizations at all optimization levels.
	// -fno-delete-null-pointer-checks
	// disable this optimization for programs that depend on that behavior.  
-Wno-maybe-uninitialized 
	// -Wmaybe-uninitialized
	// 如果一个变量定义了,但是可能没被初始化,则警告
	// -Wno-maybe-uninitialized 
	// 不警告
-g 
	// 产生调试信息
-fstack-usage 
	// 使编译器根据每个函数输出程序的堆栈使用信息。
	// 使编译器根据每个函数输出程序的堆栈使用信息。
	// 转储文件名是通过在auxname后面附加.su来生成的。
	// auxname是根据输出文件的名称生成的
	// 如果显式指定并且它不是可执行文件,则它是源文件的基名称。
-Wno-format-nonliteral
	// -Wformat-nonliteral
	// 如果指定了-Wformat,那么如果格式字符串不是字符串文字,则也会发出警告,因此无法检查,除非format函数将其格式参数作为“va_list”。
	// -Wno-format-nonliteral
	// 不生成警告
-Wno-unused-but-set-variable
	// unused-but-set-variable 不警告
-Werror=date-time
	// 将指定的警告变成错误。
	// 把-Wdate-time 生成的警告变成错误
	// -Wdate-time
	// 当遇到宏“__TIME__”、“__DATE__”或“__TIMESTAMP__”时发出警告,因为它们可能会阻止按位相同的可重复编译。
-ffunction-sections 
-fdata-sections 
	// Place each function or data item into its own section in the output file if the target supports arbitrary sections.  
	// The name of the function or the name of the data item determines the section's name in the output file.  
	// Use these options on systems where the linker can perform optimizations to improve locality of reference in the instruction space.  
	// 大概是 使用 __attribute__((section("data_ptrs"))) 来 固定 变量 和 函数位置
-D__ARM__ 
-marm 
	// 在生成以ARM和Thumb状态执行的代码之间进行选择。
	// 大多数配置的默认值是生成在ARM状态下执行的代码
	// 但是通过使用--with mode=state configure选项配置GCC,可以更改默认值。
-mno-thumb-interwork 
	// -m-thumb-interwork
	// 生成支持在ARM和Thumb指令集之间调用的代码。
	// 如果没有这个选项,在v5之前的体系结构上,两个指令集就不能在一个程序中可靠地使用。
	// 默认值是-mno-thumb-interwork,因为在指定-m-thumb-interwork时会生成稍大的代码。
	// -mno-thumb-interwork 
	// 不生成 支持在ARM和Thumb指令集之间调用的代码
-mabi=aapcs-linux 
	// Generate code for the given ABI
-ffunction-sections 
-fdata-sections 
-fno-common 
	// 控制未初始化的全局变量的位置。
	// 指定编译器应该将未初始化的全局变量放在对象文件的数据部分,而不是将它们作为公共块生成。
-ffixed-r9 
	// -ffixed-reg
	// 将名为reg的寄存器视为固定寄存器;
	// 生成的代码不应该引用它(除了作为堆栈指针、帧指针或其他固定角色)。
	// reg必须是寄存器的名称。
	// 接受的寄存器名是特定于机器的,在机器描述宏文件中的 REGISTER_NAMES 宏中定义。
	// 此标志没有负数形式,因为它指定了三向选择。
-msoft-float 
	// 使用(不使用)硬件浮点指令进行浮点运算。
	// 当指定-msoft-float时,libgcc.a中的函数用于执行浮点运算。
	// 除非它们被模拟浮点运算的例程替换,或者以调用此类模拟例程的方式编译,否则这些例程将发出浮点运算。
	// 如果您是为没有浮点运算的Alpha编译,则必须确保构建库时不会调用它们。
	// 注意,没有浮点运算的Alpha实现需要有浮点寄存器。
-pipe 
	// 在编译的各个阶段之间使用管道而不是临时文件进行通信。
	// 在某些系统中,如果汇编器无法从管道中读取数据,那么这种方法就不起作用;但是GNU汇编器没有问题。
-march=armv5t 
	// 指定目标体系结构的名称,可以选择使用一个或多个功能修改器作为后缀。
-D__LINUX_ARM_ARCH__=6  
-I../arch/arm/mach-s3c64xx/include 
-DDO_DEPS_ONLY    
-DKBUILD_BASENAME='"asm_offsets"'  
-DKBUILD_MODNAME='"asm_offsets"'  
-fverbose-asm
// 在生成的汇编代码中添加额外的注释信息,使其更具可读性。
// 此选项通常仅适用于那些实际需要读取生成的汇编代码(可能是在调试编译器本身时)的用户。
-S 
// Stop after the stage of compilation proper; do not assemble.
-o spl/./lib/asm-offsets.s 
// Place output in file file.
../lib/asm-offsets.c
// infile


set -e; 
// 这句语句告诉bash如果任何语句的执行结果不是true则应该退出
mkdir -p spl/./include/generated/; 	
(
// 括号中的命令将会新开一个子shell顺序执行,所以括号中的变量不能够被脚本余下的部分使用。
// 括号中多个命令之间用分号隔开,最后一个命令可以没有分号,各命令和括号之间不必有空格
set -e; 
echo "#ifndef __ASM_OFFSETS_H__"; 
echo "#define __ASM_OFFSETS_H__"; 
echo "/*"; 
echo " * DO NOT MODIFY."; 
echo " *"; 
echo " * This file was generated by Kbuild"; 
echo " */"; 
echo ""; 
sed -ne 	"s:[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\":\1:; /^->/{s:->#\(.*\):/* \1 */:; s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; 
echo ""; 
echo "#endif" 
) 
< spl/./arch/arm/lib/asm-offsets.s > spl/./include/generated/asm-offsets.h.tmp; 
// 将输入重定向到 spl/./lib/asm-offsets.s
// 将输出重定向到 spl/./include/generated/asm-offsets.h.tmp
if [ -r spl/./include/generated/asm-offsets.h ] && 
cmp -s spl/./include/generated/asm-offsets.h spl/./include/generated/asm-offsets.h.tmp; 
	// -r 存在且可读 为真
	// cmp -s  相等 为真
then 
rm -f spl/./include/generated/asm-offsets.h.tmp; 
else 
: '  UPD     spl/./include/generated/asm-offsets.h'; 
mv -f spl/./include/generated/asm-offsets.h.tmp spl/./include/generated/asm-offsets.h; 
	// mv -f // do not prompt before overwriting
fi



  • 2 .o文件的生成(以spl/arch/arm/cpu/arm1176/start.o为例)
	arm-linux-gnueabi-gcc 
	-Wp,-MD,spl/arch/arm/cpu/arm1176/.start.o.d  
	-nostdinc 
	-isystem /home/suws/ok6410/system-new/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/include 
	-Ispl/include 
	-Iinclude  
	-I../include  
	-I../arch/arm/include 
	-include ../include/linux/kconfig.h 
	-D__KERNEL__ 
	-D__UBOOT__ 
	-DCONFIG_SPL_BUILD 
	-D__ASSEMBLY__ 
	-fno-PIE 
	-g 
	-D__ARM__ 
	-marm 
	-mno-thumb-interwork 
	-mabi=aapcs-linux 
	-ffunction-sections 
	-fdata-sections 
	-fno-common 
	-ffixed-r9 
	-msoft-float 
	-pipe 
	-march=armv5t 
	-D__LINUX_ARM_ARCH__=6  
	-I../arch/arm/mach-s3c64xx/include   
	-c -o spl/arch/arm/cpu/arm1176/start.o ../arch/arm/cpu/arm1176/start.S

  • 3 built-in.o 的生成(以spl/arch/arm/mach-s3c64xx/built-in.o为例)
	arm-linux-gnueabi-ld.bfd     
	-r 
	// 生成可重定位的输出---也就是说,生成一个输出文件,该文件可以作为ld的输入
	-o spl/arch/arm/mach-s3c64xx/built-in.o 
	// outputfile
	spl/arch/arm/mach-s3c64xx/timer.o 
	spl/arch/arm/mach-s3c64xx/clock.o 
	spl/arch/arm/mach-s3c64xx/cpu.o 
	spl/arch/arm/mach-s3c64xx/cpu_init.o
	// infile
  • 4 链接脚本spl/u-boot-spl.lds的生成
arm-linux-gnueabi-gcc 
-E 
	// Stop after the preprocessing stage;
-Wp,-MD,spl/.u-boot-spl.lds.d 
-D__KERNEL__ 
-D__UBOOT__  
-DCONFIG_SPL_BUILD  
-D__ARM__ 
-marm 
-mno-thumb-interwork  
-mabi=aapcs-linux  
-ffunction-sections 
-fdata-sections 
-fno-common 
-ffixed-r9  
-msoft-float    
-pipe 
-march=armv5t 
-D__LINUX_ARM_ARCH__=6  
-I../arch/arm/mach-s3c64xx/include 
-Ispl/include 
-Iinclude  
-I../include  
-I../arch/arm/include 
-include ../include/linux/kconfig.h  
// 等价于在文件中第一行添加 #include "../include/linux/kconfig.h"
-nostdinc 
-isystem /home/suws/ok6410/system-new/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.4.1/include 
-include ../include/u-boot/u-boot.lds.h 
-include ./include/config.h 
-DCPUDIR=arch/arm/cpu/arm1176  
-DIMAGE_TEXT_BASE=0x0C000000 
-ansi
	// In C mode, this is equivalent to -std=c90. In C++ mode, it is equivalent to -std=c++98
-D__ASSEMBLY__ 
-x assembler-with-cpp
	// Specify the source language: C, C++, Objective-C, or assembly.
-std=c99 
-P 
// 禁止在预处理器的输出中生成linemarkers
// 当在非C代码的程序上运行预处理器时,这可能很有用,因为输出文件可能作为一个程序的输入,而这个程序不处理 linemarkers
-o spl/u-boot-spl.lds 
// output
../board/samsung/ok6410a/u-boot-spl.lds
// infile
  • 5 spl/u-boot-spl 的生成
	arm-linux-gnueabi-ld.bfd  
   	-T u-boot-spl.lds  
   	// 使用scriptfile作为链接器脚本。
	// 此脚本将替换ld的默认链接器脚本(而不是添加到其中),因此commandfile必须指定描述输出文件所需的所有内容。
	// 如果当前目录中不存在scriptfile,则“ld”会在前面任何-L选项指定的目录中查找它。
	// 多个-T选项累积。
	// 可用 arm-linux-gnueabi-ld -verbose 查看 默认链接脚本
   	--gc-sections 
   		// 启用未使用输入节的垃圾回收。 
   	-Bstatic 
   		// 不要链接到共享库。
   	--gc-sections 
   	--no-dynamic-linker
		// 在生成可执行文件时,忽略在加载时使用动态链接器的请求。
		// 这只对包含动态重定位的ELF可执行文件有意义,通常需要能够处理这些重定位的入口点代码。 
   	-Ttext 0x0C000000
   		// Locate a section(.Text) in the output file at the absolute address(0x0C000000) given by org.  
   		// 等价于 --section-start=.text=0x0C000000
   	arch/arm/cpu/arm1176/start.o 
   	--start-group 
   		// 重复搜索指定的存档,直到没有创建新的未定义引用。
   		arch/arm/mach-s3c64xx/built-in.o 
		arch/arm/cpu/arm1176/built-in.o 
		arch/arm/cpu/built-in.o 
		arch/arm/lib/built-in.o 
		board/samsung/ok6410a/built-in.o 
		board/samsung/common/built-in.o 
		common/spl/built-in.o 
		common/init/built-in.o 
		lib/built-in.o 
		disk/built-in.o 
		drivers/built-in.o 
		dts/built-in.o 
		fs/built-in.o  
	--end-group 
	arch/arm/lib/eabi_compat.o
	arch/arm/lib/lib.a 
	-Map u-boot-spl.map 
	// Print a link map to the file mapfile.
	-o u-boot-spl
  • 6 其他镜像相关文件的生成
arm-linux-gnueabi-objcopy  
	-j .text 
		// 仅将指定的节从输入文件复制到输出文件。
	-j .secure_text 
	-j .secure_data 
	-j .rodata 
	-j .hash 
	-j .data 
	-j .got 
	-j .got.plt 
	-j .u_boot_list 
	-j .rel.dyn 
	-j .binman_sym_table 
	-j .text_rest 
	-j .dtb.init.rodata  
	-O binary  
		// generate a raw binary file
	spl/u-boot-spl 
		// infile
	spl/u-boot-spl-nodtb.bin
		// outputfile

cp spl/u-boot-spl-nodtb.bin spl/u-boot-spl.bin

arm-linux-gnueabi-objdump 
-t 
	// Print the symbol table entries of the file.
spl/u-boot-spl > spl/u-boot-spl.sym

编译的目录

arch/arm/cpu/arm1176
arch/arm/cpu/arm1176/../arm11
arch/arm/lib
arch/arm/mach-s3c64xx
board/samsung/ok6410a
common/init
common/spl
disk
drivers/block
drivers/serial
fs
include/generated
lib

猜你喜欢

转载自blog.csdn.net/u011011827/article/details/115005466