Modify

Opened 4 years ago

Last modified 19 months ago

#14192 new defect

NOR Flash Write Error in OpenWRT only (successful in U-Boot)

Reported by: wjding Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: NOR flash failure Cc:

Description

This may not be a bug, but I really have no idea what's wrong with it because I tried on two devices with the same result.

I modified the flash partition to fit my device (Huawei HG255D, ramips, rt3052 CPU) based on SVN r37745.

Everything seems fine. However, when I'm trying to write many files or big files to the flash, within the Openwrt, it may report error as below:

Log:

Write of 1749 bytes at 0x006dedf0 failed. returned -5, retlen 642
Write of 1439 bytes at 0x006df4c8 failed. returned -5, retlen 0
Not marking the space at 0x006df4c8 as dirty because the flash driver returned retlen zero
Write of 1423 bytes at 0x006df4c8 failed. returned -5, retlen 0
Not marking the space at 0x006df4c8 as dirty because the flash driver returned retlen zero
Write of 1403 bytes at 0x006df4c8 failed. returned -5, retlen 0
Not marking the space at 0x006df4c8 as dirty because the flash driver returned retlen zero
Write of 1388 bytes at 0x006df4c8 failed. returned -5, retlen 0
Not marking the space at 0x006df4c8 as dirty because the flash driver returned retlen zero

Once it's reported, the system is not able to write anything to the flash anymore, until a reset of user data, or re-flash the firmware again from Uboot.

Failure also occurs when I'm trying to upgrade the firmware within Openwrt, no matter mtd write is used, or dd is used, the firmware write will be failed after a short while after it's started.

The erase within Openwrt also fails with software timeout.

Log:

root@OpenWrt:/# touch a
[ 1076.570000] jffs2: Write of 68 bytes at 0x006d2c0c failed. returned -5, retlen 0
[ 1076.590000] jffs2: Not marking the space at 0x006d2c0c as dirty because the flash driver returned retlen zero
[ 1076.610000] jffs2: Write of 68 bytes at 0x006d2c0c failed. returned -5, retlen 0
[ 1076.620000] jffs2: Not marking the space at 0x006d2c0c as dirty because the flash driver returned retlen zero
touch: a: Input/output error
root@OpenWrt:/# mtd erase rootfs_data
Unlocking rootfs_data ...
Erasing rootfs_data ...
[ 1463.890000] MTD do_erase_oneblock(): software timeout
Failed to erase block on rootfs_data at 0x0

Talked with a few friends in the IRC, we thought it might be the bad flash, so I tried it on another box, but still fails.

What is really weird is that writing in Uboot never fails. Any ideas?

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:2 Changed 19 months ago by 0kay@…

I have exactly the same problems with HG255D even on chaos calmer 15.1

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.