记录使用UBI遇到的一些问题,会补充。
1.UBI warning: ubi_scan: 35 PEBs are corrupted
corrupted PEBs are: 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 84 85 86
kernel中的注释是这样解释的:
/*
* Few corrupted PEBs are not a problem and may be just a result of
* unclean reboots. However, many of them may indicate some problems
* with the flash HW or driver. Print a warning in this case.
*/
有注释可知,出现这种打印的原因可能是不干净的断电(类似突然断电?),更多的是驱动的有问题。我想可能有这几种情况吧:
a. 制作ubi文件系统参数与flash参数不匹配(应该概率很小,如果不匹配,一般都直接失败,attach就会失败)
b. 驱动使用的ecc算法与nand所要求的不匹配?
c. 烧写工具烧录ubi文件系统有问题。
我这里的原因是uboot烧录ubi文件系统烧录的有问题,烧录ubi需要跳过全0xff的页,而这里没有跳过,造成ECC错误。