主要文件有这些,另外修正下,vendor是再7KB位置并非3.5M之后,并且不需要单独配置.
序号1:MiniLoaderAll.bin - 可以理解成启动的一部分,这个部分闭源的,实际由4部分组成(471,472,LD0,LD1),不会开放,也没开源替代方案,大概可以理解成是固化在芯片内部的一样(虽然实际不是).这个东西在波特率是1500000.并不影响系统功能,不建议研究.(我其实也非常非常非常非常非常讨厌硬件厂商这都闭源)
注记:其中PX30的4个文件分别是:
- 471 = > px30_ddr_333MHz_v1.14.bin (闭源)
- 472 => px30_usbplug_v1.20.bin (部门代码类似U-Boot 汇编和C构成)
- LD0 => px30_ddr_333MHz_v1.14.bin (同471)
- LD1 => px30_miniloader_v1.20.bin (部分代码类似U-Boot 汇编和C构成)
大致输出如下:
DDR V1.14 20190925
LP3,2048MB,333MHz
bw col bk row cs dbw
32 10 8 15 2 32
cs1 row:15
OUT
Boot1 Release Time: Sep 24 2019 14:19:45, version: 1.20
chip_id:50583330_0,0
ChipType = 0x12, 472
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=14910MB
FwPartOffset=2000 , 2000
SdmmcInit=0 NOT PRESENT
StorageInit ok = 9273
SecureMode = 0
Secure read PBA: 0x4
Secure read PBA: 0x404
Secure read PBA: 0x804
Secure read PBA: 0xc04
Secure read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT part: 0, name: uboot, start:0x1000, size:0x2000
GPT part: 1, name: trust, start:0x3000, size:0x2000
GPT part: 2, name: misc, start:0x5000, size:0x2000
GPT part: 3, name: boot, start:0x7000, size:0x10000
GPT part: 4, name: recovery, start:0x17000, size:0x10000
GPT part: 5, name: backup, start:0x27000, size:0x10000
GPT part: 6, name: rootfs, start:0x37000, size:0x1ce7fdf
find part:uboot OK. first_lba:0x1000.
find part:trust OK. first_lba:0x3000.
LoadTrust Addr:0x3000
No find bl30.bin
Load uboot, ReadLba = 1000
Load OK, addr=0x200000, size=0xd2d5c
RunBL31 0x40000 @ 68403 us
INFO: Preloader serial: 2
NOTICE: BL31: v1.3(debug):ca3dd02
NOTICE: BL31: Built : 10:15:38, Sep 23 2019
NOTICE: BL31:Rockchip release version: v1.0
INFO: ARM GICv2 driver initialized
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 1
INFO: plat_rockchip_pmu_init: pd status f00e
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
I/TC: console use rk_atags param! console_data.base.pa=0xff160000
I/TC:
I/TC: Start rockchip platform init
I/TC: Rockchip release version: 1.1
I/TC: OP-TEE version: 3.3.0-173-g02f0e5be #191 Thu Aug 15 01:06:34 UTC 2019 aarch64
I/TC: Initialized
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
序号2:这个文件指示了内容该怎么放,分区如何安排,他也烧录到0地址?应该不是真的吧.不过实际就是这么写的.
序号3:U-Boot,有源码.
序号4:Arm Trusted镜像.
序号5:MISC内容,虽然没开源,但是里面就放字符串,MISC分区也不是必要的,不过如果你打算丢弃他就需要U-Boot修改代码.
序号6:内核五年级.
序号7:Recovery系统,用Buildroot构建的,不需要也可以丢掉,但是要改代码.
需要8:系统镜像,用rk-rootfs-build构建.
这里每一个分区都要4MB对齐(即0x1000为步进单位!),否则不能被索引到.有能力也可以考虑重写MiniLoader(我是没这个能耐了!).
如果你是少数的几个官方维护引导,也可以使用itb文件进行第一阶段引导.