Skip to contentSkip to conversation

making jffs2 writes permanent

DISCUSSION Flint Cowden 1 participant 1 message Mar 3, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I was able to do the following:

eraseall /dev/mtd/0

This produced a long long list of ioctl messages, ending in the entire 64M block erased. The following session ensued:

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 04000000 00010000 "Physically mapped flash"
mtd1: 04000000 00010000 "my_jffs2"
mtd2: 00400000 00020000 "mtdram test device"
# mkdir /mnt
# mkdir /mnt/mydev
# mount -t jffs2 /dev/mtdblock/1 /mnt/mydev
mtdblock_open
ok
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
rootfs                    3990      3608       382  90% /
/dev/root                 3990      3608       382  90% /
/dev/mtdblock/1          65536       332     65204   1% /mnt/mydev

cd /
find > files.txt

# mv files.txt /mnt/mydev
Node totlen on flash (0xffffffff) != totlen in node ref (0x00000044)
Node totlen on flash (0xffffffff) != totlen in node ref (0x00000044)
Node totlen on flash (0xffffffff) != totlen in node ref (0x00000044)
#
# cd /mnt/mydev
# ls
files.txt

#date > /dev/mtd/1
MTD_open
MTD_ioctl
Invalid ioctl 402c7413 (MEMGETINFO = 40204d01)
MTD_write
MTD_close

# xxd /dev/mtd/1 | more
MTD_open
MTD_ioctl
Invalid ioctl 402c7413 (MEMGETINFO = 40204d01)
MTD_read
0000MTD_read
000:MTD_read
 ffff ffff ffff ffff ffff ffff ffff ffff  ................
0000010: ffff ffff ffff ffff ffff ffff ffff ffff  ................
0000020: ffff ffff ffff ffff ffff ffff ffff ffff  ................
0000030: ffff ffff ffff ffff ffff ffff ffff ffff  ................
0000040: ffff ffff ffff ffff ffff ffff ffff ffff  ................
0000050: ffff ffff ffff ffff ffff ffff ffff ffff  ................

--------------------------------------

Upon rebooting the system, the /mnt directory no longer exists. I can recreate it and remount the jffs2 device, but of course the directory is empty and the file files.txt that I copied in is now gone. I see no indication that the flash is seeing any physical writes at all. What am I missing?

Flint