ZHCAG72 September 2026
R5 SPL首先从ROM中读取启动信息,启动信息是一些基本的芯片属性;接着初始化R5F核本身,查找并初始化串口,以便于输出一些启动log,加载 System firmware,最后初始化DDR。具体代码详见链接,代码也可以通过安装LINUX SDK获得。
在LINUX SDK中,通过编译U-boot可以编译获得R5 SPL对应的镜像文件tiboot3.bin。TI的U-Boot使用设备树作为启动的最小硬件描述,确保基础外设可用,使用am62ax_evm_r5_defconfig进行配置,采用Binman作为固件镜像的打包工具,Binman通过设备树统一配置管理,k3-am62a-sk-binman.dtsi描述tiboot3镜像布局,Binman按照镜像布局打包镜像,将多个组件集合在一个或少数几个文件中。修改R5 SPL时要注意对应的设备树和defconfig。
Binman按照对应的设备树打包完的tiboot3.bin镜像文件如下图所示,整个包有一个X.509证书作为包头,其下有对应的R5 u-boot-spl.bin作为实际的R5 SPL代码,除此以外,包中还有sys-firmware(又名TIFS),TIFS被加载到片内SMS子系统中M4F_0小核。包中还包含了最小的设备树,用于描述启动所需的最小设备配置。
图 2-4 tiboot3镜像打包在编译时,设置环境变量BINMAN_VERBOSE=3以及BINMAN_DEBUG=1可以看到对应Binman打包镜像的过程,以下Binman log中显示的打包项与设备树中描述的一致。
Pack completed after 1 pass(es)
Writing image to './custMpk.pem'
Wrote 0xcab bytes
Pack completed after 1 pass(es)
Writing image to './ti-degenerate-key.pem'
Wrote 0x21a bytes
Pack completed after 1 pass(es)
Writing image to './board-cfg.bin'
Wrote 0x1d bytes
Pack completed after 1 pass(es)
Writing image to './pm-cfg.bin'
Wrote 0x2 bytes
Pack completed after 1 pass(es)
Writing image to './rm-cfg.bin'
Wrote 0x596 bytes
Pack completed after 1 pass(es)
Writing image to './sec-cfg.bin'
Wrote 0x15d bytes
Pack completed after 1 pass(es)
Writing image to './combined-tifs-cfg.bin'
Wrote 0x674 bytes
Pack completed after 1 pass(es)
Writing image to './combined-dm-cfg.bin'
Wrote 0x5aa bytes
Pack completed after 1 pass(es)
Writing image to './combined-sysfw-cfg.bin'
Wrote 0x734 bytes
Pack completed after 1 pass(es)
Writing image to './tiboot3-am62ax-hs-evm.bin'
Wrote 0x50981 bytes
Pack completed after 1 pass(es)
Writing image to './tiboot3-am62ax-hs-fs-evm.bin'
Wrote 0x50981 bytes
Pack completed after 1 pass(es)
Writing image to './tiboot3-am62ax-gp-evm.bin'
Wrote 0x4ff64 bytes
在启动过程中,R5 SPL对应log如下:
[2025-08-05 19:53:27.057] U-Boot SPL 2024.04-ti-g29d0c23d67ee (Nov 29 2024 - 11:41:54 +0000)
[2025-08-05 19:53:27.057] SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.8--v10.01.08 (Fiery Fox)')
[2025-08-05 19:53:27.120] SPL initial stack usage: 13568 bytes
[2025-08-05 19:53:27.120] Trying to boot from MMC2
[2025-08-05 19:53:27.265] Authentication passed
[2025-08-05 19:53:27.265] Authentication passed
[2025-08-05 19:53:27.281] Authentication passed
[2025-08-05 19:53:27.409] Authentication passed
[2025-08-05 19:53:27.409] Authentication passed
[2025-08-05 19:53:27.425] Starting ATF on ARM64 core...
R5 SPL流程耗时短,这部分的耗时主要来自于从启动介质往SOC内部RAM的数据搬运以及一些资源的初始化。资源初始化的部分几乎不可省略,因此提高这部分的启动速度关键在于使用快速的启动介质。