Skip to contentSkip to conversation

The romfs corruption problem after writing mtdblock!

DISCUSSION Kim Moung-Soo 1 participant 1 message May 16, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I'm using uClinux 2.4.22 on ARM board and have a problem with the romfs. My machine has 4 partitions on the NOR flash memory like below. mtdblock 1: boot loader
mtdblock 2: 2nd boot loader
mtdblock 3: kernel and root file system(romfs)
mtdblock 4: user data

Everything works fine until I write area of user data, mtdblock 4. After I write something on mtdblock4, romfs on mtdblock 3 corrupts sometimes.
The symptom is that some files have gone in the directory or content of file is wrong.
Even it happens I think the data in flash memory is okay because after it reboot every thing is in there.
I use open("/dev/mtdblock/4") and write() to access it directly. Can I use open(), write() function to access mtdblock 4?