mtd permission denied
Hi all
i tried to flash_erase and other flash_* tools to my mtd device, the
return value is permission denied, but i am already root login. I have selected MTD_CHAR and MTD_BLOCK in kernel. Do i miss somethings?
My kernel version is 2.6.10, with cvs mtd patched.
Mike,Lee
Hi all
Also when i use jffs2 for data storage, i got these msg when
mounting mtd. i have tried to erase and unlock the mtd , i got similar msg.
Erase at 0x00080000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00070000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00060000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00050000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00040000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00030000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00020000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00010000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000f0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000e0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000d0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000c0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000b0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000a0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00090000 failed immediately: -EROFS. Is the sector locked?
~ # flash_eraseall /dev/mtd4flash_eraseall: /dev/mtd4: Permission denied
~ # flash_unlock /dev/mtd4
Could not open mtd device: /dev/mtd4
~ # mtd_debug info /dev/mtd4
mtd.type = MTD_NORFLASH
mtd.flags = MTD_ERASEABLE
mtd.size = 1048576 (1M)
mtd.erasesize = 65536 (64K)
mtd.oobblock = 0
mtd.oobsize = 0
mtd.ecctype = MTD_ECC_NONE
regions = 0
Thanks for helping
Mike,Lee
Quoted 15 lines · Mike Lee
Hi all
i tried toflash_eraseand other flash_* tools to my mtd device, the
return value is permission denied, but i am already root login. I have selectedMTD_CHARandMTD_BLOCKin kernel. Do i miss somethings?My kernel version is 2.6.10, with cvs mtd patched.
Mike,Lee
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 8 lines · Mike Lee
Hi all
i tried toflash_eraseand other flash_* tools to my mtd device, the
return value is permission denied, but i am already root login. I have selectedMTD_CHARandMTD_BLOCKin kernel. Do i miss somethings?My kernel version is 2.6.10, with cvs mtd patched.
Mike,Lee
This is spookey, I just got the exact same problem at the same time(!)
I'm trying to write data to my Dataflash device, but I get a "permission denied" error whenever I try to fopen the file "/dev/mtd/2" to write the data into it. I can read data from it with no problems.
I have tried "mtd_debug write" and "flashcp" and they return permission denied as well. Am I missing something?
I am using 2.4.27-vrs1 with cvs mtd patched.
/root # mtd_debug info /dev/mtd/2
mtd.type = MTD_NORFLASH
mtd.flags = MTD_ERASEABLE
mtd.size = 786432 (768K)
mtd.erasesize = 1056 (1K)
mtd.oobblock = 0
mtd.oobsize = 0
mtd.ecctype = MTD_ECC_NONE
regions = 0
regards,
Aras Vaichas
Quoted 9 lines · Aras Vaichas
Quoted 4 lines · Mike Lee
Hi all
i tried toflash_eraseand other flash_* tools to my mtd device, the
return value is permission denied, but i am already root login. I have selectedMTD_CHARandMTD_BLOCKin kernel. Do i miss somethings?This is spookey, I just got the exact same problem at the same time(!)
I'm trying to write data to my Dataflash device, but I get a "permission denied" error whenever I try to fopen the file "
/dev/mtd/2" to write the data into it. I can read data from it with no problems.
Sorry to answer my owns post ... but Mike gave me a hint as to what the problem was.
Mike had MTD_WRITEABLE set in the mask_flags for his partitions, so they were read-only.
My "permission denied" was caused because I'd left the default Dataflash partition settings in at91_dataflash.c from the MTD backporting work I did last year. The default settings don't honour erase block boundaries and thus the partitions were being mounted "read only". Silly me didn't look at dmesg ...
regards,
Aras