While trying to open /dev/mtd2 for read/write access: Permission denied
Mats Kärrman
Mats.Karrman at tritech.se
Tue Apr 8 23:42:50 PDT 2014
What do you have in your device tree for these partitions?
// Mats
________________________________________
From: linux-mtd [linux-mtd-bounces at lists.infradead.org] on behalf of gpuguy [hf.basit at gmail.com]
Sent: Tuesday, April 08, 2014 8:14 AM
To: linux-mtd at lists.infradead.org
Subject: While trying to open /dev/mtd2 for read/write access: Permission denied
Looks like my MTD2,and MTD3 partitions are write protected. The OS is
booting from SD card on a ARM Cortex A 9 processor.
root at Xilinx-ZC702-2013_3:~# mount /dev/mmcblk0p1 /mnt/
root at Xilinx-ZC702-2013_3:~#
root at Xilinx-ZC702-2013_3:~# cd /mnt/flash/
root at Xilinx-ZC702-2013_3:/mnt/flash#
root at Xilinx-ZC702-2013_3:/mnt/flash# ls
BOOT.BIN image.ub rootfs.jffs2
root at Xilinx-ZC702-2013_3:/mnt/flash# flashcp -v image.ub /dev/mtd2
While trying to open /dev/mtd2 for read/write access: Permission denied
root at Xilinx-ZC702-2013_3:/mnt/flash#
Even I tried alternate:
root at Xilinx-ZC702-2013_3:/mnt/flash# flash_eraseall -j /dev/mtd2
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use
it
flash_erase: error!: /dev/mtd2
error 13 (Permission denied)
Here are additional info:
root at Xilinx-ZC702-2013_3:/mnt/flash# mtdinfo
Count of MTD devices: 4
Present MTD devices: mtd0, mtd1, mtd2, mtd3
Sysfs interface supported: yes
root at Xilinx-ZC702-2013_3:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00500000 00010000 "boot"
mtd1: 00020000 00010000 "bootenv"
mtd2: 001202c0 00010000 "image"
mtd3: 00500000 00010000 "jffs2"
Also:
root at Xilinx-ZC702-2013_3:/mnt/flash# mtd_debug info /dev/mtd3
mtd.type = MTD_NORFLASH
mtd.flags = MTD_BIT_WRITEABLE
mtd.size = 5242880 (5M)
mtd.erasesize = 65536 (64K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0
root at Xilinx-ZC702-2013_3:/mnt/flash# mtd_debug info /dev/mtd2
mtd.type = MTD_NORFLASH
mtd.flags = MTD_BIT_WRITEABLE
mtd.size = 1180352 (1M)
mtd.erasesize = 65536 (64K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0
root at Xilinx-ZC702-2013_3:/mnt/flash# mtd_debug info /dev/mtd1
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NORFLASH
mtd.size = 131072 (128K)
mtd.erasesize = 65536 (64K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0
root at Xilinx-ZC702-2013_3:/mnt/flash# mtd_debug info /dev/mtd0
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NORFLASH
mtd.size = 5242880 (5M)
mtd.erasesize = 65536 (64K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0
root at Xilinx-ZC702-2013_3:/mnt/flash#
How do I solve this issue?
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
More information about the linux-mtd
mailing list