This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

将ubi文件烧写到NAND flash后开发板起不来,报错为securedb.key.bin not found! ubifsload - load file from an UBIFS filesystem



ubifs文件是从mcsdk_3_01_04_07中将拷贝到boot文件夹下。按照MCSDK UG Chapter Exploring文档中进行操作生成ubi文件,如下:

cd <release_folder>/mcsdk_linux_<version>/images

mkdir boot

cp uImage-keystone-evm.bin boot/

cp uImage-k2hk-evm.dtb boot/

cp skern-keystone-evm.bin boot/

export PATH=<release_folder>/mcsdk_linux_<version>/bin:$PATH

mkfs.ubifs -r boot -F -o keystone-evm-boot.ubifs -m 2048 -e 126976 -c 41

cp keystone-evm-boot.ubifs images/

cd images/

ubinize -o keystone-evm-ubifs.ubi -m 2048 -p 128KiB -s 2048 -O 2048 ubinize.cfg

ubinize.cfg文件编辑如下:

[boot]
mode=ubi
image=keystone-evm-boot.ubifs
vol_type=dynamic
vol_id=0
vol_name=boot
vol_size=10MiB

[securedbv0]
mode=ubi
image=securedbv0.ubifs.img
vol_id=1
vol_type=dynamic
vol_size=5MiB
vol_name=securedbv0
[securedbv1]
mode=ubi
image=securedbv1.ubifs.img
vol_id=2
vol_type=dynamic
vol_size=5MiB
vol_name=securedbv1

其中securedbv0.ubifs.img与securedbv1.ubifs.img是通过mcsdk_3_01_04_07中image/securedb文件夹下拷贝生成的

最后将keystone-evm-ubifs.ubi烧到nand flash后boot打印错误信息:

boot 
Unmounting UBIFS volume boot!
UBI: mtd1 is detached from ubi0
Creating 1 MTD partitions on "nand0":
0x000000180000-0x000020000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=2"
UBI: MTD device size: 510 MiB
UBI: number of good PEBs: 4080
UBI: number of bad PEBs: 4
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 3953
UBI: total number of reserved PEBs: 127
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 1/0
UBIFS: mounted UBI device 0, volume 0, name "boot"
UBIFS: mounted read-only
UBIFS: file system size: 4571136 bytes (4464 KiB, 4 MiB, 36 LEBs)
UBIFS: journal size: 1142785 bytes (1116 KiB, 1 MiB, 8 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root: 0 bytes (0 KiB)
securedb.key.bin not found!
ubifsload - load file from an UBIFS filesystem

Usage:
ubifsload <addr> <filename> [bytes]
- load file 'filename' to address 'addr'

将系统文件添加进去重新烧写,还是出现同样的问题。