Chinaunix
标题:
挂载DATAFLASH后写入不进的问题,求高人指点
[打印本页]
作者:
一个小角色
时间:
2007-10-26 10:19
标题:
挂载DATAFLASH后写入不进的问题,求高人指点
内核启动信息:
。。。
physmap flash device: bank0, name:FLASH0, size:8388608bytes @ 0x10000000
Using command line partition definition
Creating 4 MTD partitions on "FLASH0":
0x00000000-0x00020000 : "boot"
0x00020000-0x00120000 : "kernel"
0x00120000-0x007f0000 : "fs"
0x007f0000-0x00800000 : "parameter"
init_physmap: chip probing count 1
。。。
at91_dataflash: Atmel AT45DB321B detected [spi0] (4325376 bytes)
Creating 1 MTD partitions on "Atmel AT45DB321B":
0x00000000-0x00420000 : "data"
。。。
挂载文件系统后:
/]$cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00010000 "boot"
mtd1: 00100000 00010000 "kernel"
mtd2: 006d0000 00010000 "fs"
mtd3: 00010000 00010000 "parameter"
mtd4: 00420000 00001080 "data"
/]$df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 6976 5008 1968 72% /
none 2048 0 2048 0% /tmp
挂载dataflash:
/]$mount -t jffs2 /dev/mtdblock4 /data
/]$df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 6976 5016 1960 72% /
none 2048 0 2048 0% /tmp
/dev/mtdblock4 4224 36 4188 1% /data
/]$mount
/dev/mtdblock2 on / type jffs2 (rw)
/proc on /proc type proc (rw)
none on /tmp type tmpfs (rw)
/dev/mtdblock4 on /data type jffs2 (rw)
一些操作:
/]$cp bin/su /data/ ##往DATAFLASH中写一些数据
Node totlen on flash (0xffffffff) != totlen in node ref (0x00000044)
...
...
Node totlen on flash (0xffffffff) != totlen in node ref (0x0000000c)
Node totlen on flash (0xffffffff) != totlen in node ref (0x0000000c)
Node CRC ffffffff != calculated CRC f09e7845 for node at 0015462c
/]$df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 6976 5016 1960 72% /
none 2048 0 2048 0% /tmp
/dev/mtdblock4 4224 1324 2900 31% /data
卸载后:
/]$umount data/
/]$df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 6976 5016 1960 72% /
none 2048 0 2048 0% /tmp
再挂载后:
/]$df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 6976 5016 1960 72% /
none 2048 0 2048 0% /tmp
/dev/mtdblock4 4224 28 4196 1% /data
##未有刚才写入的那个文件。
作者:
epegasus
时间:
2007-10-26 10:40
块大小设置对吗?
作者:
一个小角色
时间:
2007-10-26 11:11
是什么的块大小,能说清楚些么?
我的:
static struct mtd_partition static_partitions[] =
{
{
name: "data",
offset: 0,
size: MTDPART_SIZ_FULL,
//mask_flags: MTD_WRITEABLE /* read-only */
}
};
作者:
epegasus
时间:
2007-10-26 17:17
我指flash可擦除的块的大小
作者:
一个小角色
时间:
2007-10-27 10:19
问题已经解决了,我是在另外一个地方把SPI总线设置成IO口了。
作者:
wuhua0904
时间:
2011-04-20 15:11
如何解决的,我也碰到一样的问题了!
wuhua0904@126.com
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2