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.

AM335X UBI error: ubi_compare_lebs: unsupported on-flash UBI format

Other Parts Discussed in Thread: TPS65910

根据TI的一个教程制作的文件系统镜像,SDK7.0 ,用am335x_evm.dtb出现以下错误。

我们的nandflash

 page size:2048

blocksize:64x2048

block cout:1024

制作命令:

mkfs.ubifs –F -q -r /home/usr/fs -m 2048 -e 126976 -c 1023 -o ubifs.img

ubinize -o ubi.img -m 2048 -p 128KiB ubinize.cfg

 ubinize.cfg:

[ubifs]  

 mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=200MiB
    vol_type=dynamic
    vol_name=rootfs
    vol_flags=autoresize

[    1.686526] ONFI param page 0 valid
[    1.690202] ONFI flash detected
[    1.693590] NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (AMD/Spansion S34ML01G2), 128MiB, page size: 2048, OOB size: 64
[    1.705488] omap2-nand: detected x8 NAND flash
[    1.710158] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
[    1.715787] omap2-nand: using custom ecc layout
[    1.720825] 10 ofpart partitions found on MTD device omap2-nand.0
[    1.727261] Creating 10 MTD partitions on "omap2-nand.0":
[    1.732960] 0x000000000000-0x000000020000 : "NAND.SPL"
[    1.740353] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
[    1.748318] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
[    1.756248] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
[    1.764168] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
[    1.772371] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
[    1.780542] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
[    1.788262] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
[    1.796745] 0x000000200000-0x000000a00000 : "NAND.kernel"
[    1.810674] 0x000000a00000-0x000008000000 : "NAND.file-system"
[    1.918657] tps65910 0-002d: No interrupt support, no core IRQ
[    1.926121] tps65910 0-002d: Error in configuring external control EN1
[    1.933053] tps65910 0-002d: Failed to initialise ext control config
[    1.940151] vrtc: failed to enable
[    1.944083] tps65910 0-002d: failed to register tps65910-pmic regulator
[    1.951096] tps65910-pmic: probe of tps65910-pmic failed with error -121
[    1.958969] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.968477] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    1.975482] edma-dma-engine edma-dma-engine.0: allocated channel for 0:25
[    1.982731] edma-dma-engine edma-dma-engine.0: allocated channel for 0:24
[    1.989960] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
[    1.996904] edma-dma-engine edma-dma-engine.0: freeing channel for 24
[    2.003737] edma-dma-engine edma-dma-engine.0: freeing channel for 25
[    2.013803] omap_hwmod: gpio1: _wait_target_disable failed
[    2.019682] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
[    2.027365] cpu cpu0: cpu0 regulator not ready, retry
[    2.032741] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
[    2.041389] UBI: attaching mtd9 to ubi0
[    2.362894] UBI error: ubi_compare_lebs: unsupported on-flash UBI format
[    2.370176] UBI error: ubi_attach_mtd_dev: failed to attach mtd9, error -22
[    2.377595] UBI error: ubi_init: cannot attach mtd9

  • 是参考这个文档做的吗?特别是要注意里面的参数的设定。

    http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/59921.aspx

    另外,注意这个帖子里面楼下的答复:

    ,文档“Ubifs文件系统的制作和启动.pdf ”中选项 –F 写的有问题,应该是 -F

     

     

  • 是的,我们根据上面的帖子来做,帖子上有附我的nandflah参数和制作镜像命令,帮我看下是否正确。还有我用的uboot是sdk7.0中的,发现烧写sdk6.0sdk里面的文件系统镜像,起来后会提示ubi格式不支持,只有烧sdk7.0中的才可以,烧更高版本的sdk中的文件系统镜像也不行,我想知道下对于不同版本sdk你们的文件系统镜像制作方法都一样的吗。

  • 问题找到了原来是我烧文件系统的时候将分配给根文件系统的空间全部擦了,写入的时候是先把文件系统镜像加载到DDR上,然后写满刚才擦除的地方,但是问题来了,其实文件系统才35MB左右,而写入nandflash的数据却远远超过了35MB这样就会写入很多垃圾数据,而ubi driver会判断,如果从某个地方开始都是0xFF就会判断是空的否则会判断是垃圾数据,判断是坏的镜像。所以我的解决办法就是擦除35MB后的nandflash空间,即擦除垃圾数据。这样问题就彻底解决了