Linux kernel 如何为NAND闪存创建生产映像?

Linux kernel 如何为NAND闪存创建生产映像?,linux-kernel,hardware,embedded-linux,Linux Kernel,Hardware,Embedded Linux,我正试图创建一个生产图像,可以在工厂与闪存程序员闪存。我使用的是Micron 51MB nand闪存 我发现我迄今为止采取的方法存在问题 1) 用所有分区引导开发板 i、 e 当我在一个空的闪光灯上闪烁这个金色的闪光灯时,我首先从RAM运行u-boot,然后 tftp golden_flash nand erase all nand write 0x82000000 golden_flash 这是行不通的 一开机,我就 mtd->read(0x1fc38 bytes from 0x6

我正试图创建一个生产图像,可以在工厂与闪存程序员闪存。我使用的是Micron 51MB nand闪存

我发现我迄今为止采取的方法存在问题

1) 用所有分区引导开发板

i、 e

当我在一个空的闪光灯上闪烁这个金色的闪光灯时,我首先从RAM运行u-boot,然后

tftp golden_flash

nand erase all

nand write 0x82000000 golden_flash
这是行不通的

一开机,我就

mtd->read(0x1fc38 bytes from 0x60a03c8) returned ECC error

mtd->read(0xa7b0 bytes from 0x60b5850) returned ECC error

Empty flash at 0x060b584c ends at 0x060b6000

jffs2_scan_eraseblock(): Node at 0x060b618c {0x1985, 0xe022, 0x000000a7) has invalid CRC 0x5c3d15cb (calculated 0x5b9110fd)

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x060b6190: 0x00a7 instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x060b6194: 0x15cb instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x060b6198: 0x2e5b instead

mtd->read(0x59c bytes from 0x13eba64) returned ECC error

mtd->read(0x44 bytes from 0x13ec800) returned ECC error

mtd->read(0x7bc bytes from 0x13ec844) returned ECC error

mtd->read(0x558 bytes from 0x13ebaa8) returned ECC error

mtd->read(0x44 bytes from 0x13ec844) returned ECC error

mtd->read(0x514 bytes from 0x13ebaec) returned ECC error

mtd->read(0x44 bytes from 0x13ec888) returned ECC error
我从u-boot中闪现了图像


有没有更好的方法来创建生产映像或正确的方法来创建NAND闪存的生产映像?

正如前面的评论员所说,由于设备之间的坏块计数和位置不一致,您将遇到坏块问题。但是如果跳过转储上的坏块,mtd0-mtd3中的任何坏块都将导致分区边界不匹配。nand write命令可能没有利用分区布局的知识,因此制造中设备前四个分区中的坏块也会导致未对准。我认为最好的选择是分别刷新五个分区。

请参阅。我认为你应该使用
-ob
而不是
-no
nanddump
。这将忽略转储中的坏块,并包括ecc。我不是100%确定u型靴是否会闪烁。我猜它跳过了坏块,所以底层文件系统最好是可重新定位的。谢谢。选项-b-o-f的工作方式与您描述的相同。
mtd->read(0x1fc38 bytes from 0x60a03c8) returned ECC error

mtd->read(0xa7b0 bytes from 0x60b5850) returned ECC error

Empty flash at 0x060b584c ends at 0x060b6000

jffs2_scan_eraseblock(): Node at 0x060b618c {0x1985, 0xe022, 0x000000a7) has invalid CRC 0x5c3d15cb (calculated 0x5b9110fd)

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x060b6190: 0x00a7 instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x060b6194: 0x15cb instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x060b6198: 0x2e5b instead

mtd->read(0x59c bytes from 0x13eba64) returned ECC error

mtd->read(0x44 bytes from 0x13ec800) returned ECC error

mtd->read(0x7bc bytes from 0x13ec844) returned ECC error

mtd->read(0x558 bytes from 0x13ebaa8) returned ECC error

mtd->read(0x44 bytes from 0x13ec844) returned ECC error

mtd->read(0x514 bytes from 0x13ebaec) returned ECC error

mtd->read(0x44 bytes from 0x13ec888) returned ECC error