Forum Discussion
Altera_Forum
Honored Contributor
20 years agoI've tracked it down a bit more...mtd_char.c thinks this mtd is not writable.
/* You can't open it RW if it's not a writeable device */ if ((file->f_mode & 2) && !(mtd->flags & MTD_WRITEABLE)) { printk("Device not writable %x/%x\n", file->f_mode & 2, mtd->flags & MTD_WRITEABLE); put_mtd_device(mtd); return -EACCES; } With that printk added, I see the following:# ./mtd_debug.exe info /dev/mtd2 MTD_open Device not writable 2/0 open(): Permission denied I have _not_ included MTD_WRITEABLE in my partition definition, so there must be some other logic that's deciding this is the case. Partitions.h says writable partition be aligned: Note: writeable partitions require their size and offset be * erasesize aligned (e.g. use MTDPART_OFS_NEXTBLK). I'm asking for a 0x1000000 chunk at location 0x1000000. Seems like that shouldn't have any alignment issues...