Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

when writting to mtd0, Permission denied, unwritable? (2 replies)

$
0
0
My device is Pogo mobile. When I tried to upgrade its uboot, I got this error message.

Can't open /dev/mtd0: Permission denied

I read this post but it didn't help. https://forum.doozan.com/read.php?2,31358

Here are the related settings. Can anybody help me?

root@PogoMob:~# uname -a
Linux PogoMob 3.14.0-kirkwood-tld-1 #1 PREEMPT Tue Apr 1 22:54:58 PDT 2014 armv5tel GNU/Linux
 
cat /proc/cmdline
console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=10 mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112(root)

 cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 07b00000 00020000 "root"

root@PogoMob:~# dmesg | grep -i mtd
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=10 mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112(root)
[    9.792464] mtd: partition size too small (70)
[    9.805155] Creating 3 MTD partitions on "orion_nand":

 dmesg | grep -i mtd
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=10 mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112(root)
[    9.792464] mtd: partition size too small (70)
[    9.805155] Creating 3 MTD partitions on "orion_nand":
root@PogoMob:~# dmesg | grep -i 0x000
[    8.073712] pci 0000:00:00.0: reg 0x18: [mem 0x00000000-0x07ffffff]
[    9.693105] Bad eraseblock 13 at 0x0000001a0000
[    9.711792] Bad eraseblock 190 at 0x0000017c0000
[    9.738856] Bad eraseblock 470 at 0x000003ac0000
[    9.767051] Bad eraseblock 764 at 0x000005f80000
[    9.810293] 0x000000000000-0x000000100000 : "u-boot"
[    9.815784] 0x000000100000-0x000000500000 : "uImage"
[    9.821117] 0x000000500000-0x000008000000 : "root"

 cat /etc/fw_env.config
/dev/mtd0 0xc0000 0x20000 0x20000

 ls -l /dev/mtd*
crw------- 1 root root 90, 0 Dec 31 16:00 /dev/mtd0
crw------- 1 root root 90, 1 Dec 31 16:00 /dev/mtd0ro
crw------- 1 root root 90, 2 Dec 31 16:00 /dev/mtd1
crw------- 1 root root 90, 3 Dec 31 16:00 /dev/mtd1ro
crw------- 1 root root 90, 4 Dec 31 16:00 /dev/mtd2
crw------- 1 root root 90, 5 Dec 31 16:00 /dev/mtd2ro

 cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/root      /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0


Viewing all articles
Browse latest Browse all 3247

Trending Articles