3. 烧录说明¶
3.1. 使用前准备¶
2.4.2.3前述章节产生的烧录挡案。
FAT32格式的Micro SD卡。
3.2. 操作过程¶
将烧录档案(如下表)放到SD卡中。
将SD卡插入CVITEK EVB的SD卡槽中。
将平台重开机。
3.3. 操作实例¶
使用前确认文件
以SPINAND为例 |
以SPINOR为例 |
以EMMC为例 |
|---|---|---|
1.8M yoc.bin(双系统) 535K fip.bin 2.6M fw_payload_uboot.bin 4.0M ramboot.itb 2.6M boot.spinand 3M rootfs.spinand 1.9M cfg.spinand 1.9M system.spinand |
1.8M yoc.bin(双系统) 508K fip.bin 182K fip_spl.bin 2.49M fw_payload_uboot.bin 4.3M ramboot.itb 3.7M boot.spinor 3.18M rootfs.spinor 292B data.spinor |
1.8M yoc.bin(双系统) 486K fip.bin 2.5M fw_payload_uboot.bin 5.3M ramboot.itb 2.8M boot.emmc 6.7M rootfs.emmc 9.5M cfg.emmc 4.7M system.emmc |
注:上表中yoc.bin文件为双系统独有文件,仅在双系统环境下存在
插入SD卡,并将CV180X/CV181X平台接上电源后开机,自动启动烧录程序, DL flag 表示主IC侦测到目前SD Card中存在可以烧录的挡案。
In: serial
Out: serial
Err: serial
Net:
Warning: ethernet@4070000 (eth0) using random MAC address - 3a:6d:3f:aa:9e:d6
eth0: ethernet@4070000
Hit any key to stop autoboot: 0
## Resetting to default environment
Start SD downloading......
平台烧录完成时,可于UART端口看到以下信息,将平台断电,拔出SD卡,再重开机,即完成烧录过程。(log会针对每个分区,显示读取挡案,写入Flash所在)
## Resetting to default environment
Start SD downloading...
497664 bytes read in 25 ms (19 MiB/s)
spinor id = 1C 71 18
SF: Detected EN25QX128A with page size 256 Bytes, erase size 64 KiB, total 16 MiB
......
Header Version:1
2996612 bytes read in 137 ms (20.9 MiB/s)
device 0 offset 0x100000, size 0x2db944
0 bytes written, 2996548 bytes skipped in 0.125s, speed 23972384 B/s
sf update speed 22.196 MB/s
64 bytes read in 3 ms (20.5 KiB/s)
Header Version:1
......
Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
Valid environment: 1
OK
cv180x_c906#
3.4. 打包烧录器烧录镜像¶
pack_prog_img 是构建系统中用于打包镜像的通用函数,该镜像只支持烧录器烧录,支持多种存储类型(nand、nor、emmc)。
用法:
pack_prog_img [nandid]
# 其中 nandid = 0x{DID/MID} 为可选参数,仅在 storage 类型为 nand 时需要,具体值可查找datasheet或在板端dmesg中查找。
# 例如:nand: device found, Manufacturer ID: 0x0b, Chip ID: 0x35 ;则nandid = 0x350b
输出目录:
{SDK}/install/{board}/burnimages/
不同存储介质的输出文件如下:
NAND:输出文件与 {SDK}/install/{board}/rawimages/ 目录下的文件相同(仅fip_spl.bin特殊处理,fip.bin未拷贝),同时包含分区表信息文件 partition_info.txt
NOR :仅输出 Data.bin 文件
eMMC:输出 Data.bin 和 Boot.bin (包含fip.bin)两个文件
在其他 shell 脚本中调用示例:
source build/envsetup_soc.sh
defconfig cv1811c_wevb_0006a_spinand
pack_prog_img 0x95c8
3.5. 注意事项¶
请确认SD Card被正确格式化为FAT32格式。