Unable to mount mtdblock in P2040

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to mount mtdblock in P2040

598 Views
gouravjain
Contributor IV

Hi all,

I'm getting error while mounting jffs2 mtdblock in Linux on P2040 SOC.

cat proc/mtd
dev: size erasesize name
mtd0: 08000000 00020000 "fe8000000.flash"
mtd1: 02000000 00020000 "NAND U-Boot Image"
mtd2: 10000000 00020000 "NAND Root File System"
mtd3: 08000000 00020000 "NAND Compressed RFS Image"
mtd4: 04000000 00020000 "NAND Linux Kernel Image"
mtd5: 01000000 00020000 "NAND DTB Image"
mtd6: 01000000 00020000 "NAND Writable User area"
mtd7: 00100000 00010000 "u-boot"
mtd8: 00500000 00010000 "kernel"
mtd9: 00100000 00010000 "dtb"
mtd10: 00900000 00010000 "file system"

mount -t jffs2 /dev/mtdblock7 /mnt/mtd/
root@hmd-modem::/# jffs2: Erase at 0x00050000 failed immediately: -EROFS. Is the sector locked?
jffs2: Erase at 0x00040000 failed immediately: -EROFS. Is the sector locked?

Seems like sector is locked. But how to unlock sector? Where to modify the code?

Regards,

Gourav

0 Kudos
Reply
1 Reply

460 Views
bpe
NXP Employee
NXP Employee

Based on your /proc/mtd, mtdblock7 partition that you are trying to
mount, is the primary u-Boot image. It is quite logical that it is
protected, besides that, it is definitely not a JFFS2 partition.
If you really want to write to that area, try 'protect off' command
under u-Boot. Type 'protect help' at u-Boot command prompt for more
information about the command.


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply