我用的是dm368
之前用的文件系统是jffs2格式的,现在想改成yaffs2格式的。原来想用uboot烧写,于是修改了uboot源码,但是下载不成功(我觉得是下载不成功),板子起不来,找不到文件系统。后改为用nandwrite写,是支持nandwrite的,现在的问题是写入jffs2的文件系统,板子可以起来,但是写yaffs2的文件系统,板子起不来。内核已经设置了支持yaffs2文件系统。
用的擦除及写入指令是:
flash_eraseall /dev/mtd3
nandwrite -p -s 0x20000 /dev/mtd3 rootfs.yaffs2
打印错误信息如下:
[ 1.130000] yaffs: dev is 32505860 name is "mtdblock4" rw
[ 1.140000] yaffs: passed flags ""
[ 2.220000] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 2.230000] mmc0: new high speed SDHC card at address 0007
[ 2.230000] mmcblk0: mmc0:0007 SD64G 58.2 GiB[ 2.240000] mmcblk0: p1
[ 14.630000] VFS: Mounted root (yaffs2 filesystem) on device 31:4.
[ 14.640000] Freeing init memory: 108K
[ 14.640000] Warning: unable to open an initial console.
[ 14.650000] Kernel panic – not syncing: No init found. Try passing init= option to kernel.
[ 14.660000] Backtrace:[ 14.660000] [<c00275f4>] (dump_backtrace+0x0/0x114) from [<c0223090>] (dump_stack+0x18/0x1c)
[ 14.670000] r7:00000000 r6:00000000 r5:00000000 r4:c0300fb0
[ 14.680000] [<c0223078>] (dump_stack+0x0/0x1c) from [<c02230e8>] (panic+0x54/0x12c)
[ 14.680000] [<c0223094>] (panic+0x0/0x12c) from [<c0023634>] (init_post+0xdc/0x104)
[ 14.690000] r3:00000000 r2:c20a8400 r1:c0329000 r0:c02923f3
[ 14.700000] [<c0023558>] (init_post+0x0/0x104) from [<c00084c0>] (kernel_init+0xe8/0x118)
[ 14.710000] r5:00000000 r4:c0300880
[ 14.710000] [<c00083d8>] (kernel_init+0x0/0x118) from [<c003bc98>] (do_exit+0x0/0x668)
[ 14.720000] r5:00000000 r4:00000000
经过多次的擦除和写入后,发现flash的坏块比之前多了好多,在网上查了,按照网上的设置屏蔽掉//.ecc_mode = NAND_ECC_NONE,无果,后又还原,
static struct davinci_nand_pdata davinci_nand_data = {
.mask_chipsel = 0,
.parts = davinci_nand_partitions,
.nr_parts = ARRAY_SIZE(davinci_nand_partitions),
.ecc_mode = NAND_ECC_HW,
//.ecc_mode = NAND_ECC_NONE,
.options = NAND_USE_FLASH_BBT,
.ecc_bits = 4,
};
还请TI的工程师给些建议,卡在这一周了,方法试了很多,可能是有些地方没设置好,还请给些建议。谢谢!
user4835762:
希望TI的工程师能给些建议,谢谢了
user4835762:
分区是经过重新计算的,从打印看分区没错,
Chris Meng:
回复 user4835762:
你好,
请参考论坛讨论:e2e.ti.com/…/7574
user4835762:
回复 Chris Meng:
谢谢