Modify

Opened 6 years ago

Last modified 4 years ago

#11749 new defect

mtd: can't write to nand with bad blocks

Reported by: Damian Kaczkowski <damian.kaczkowski@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

mtd fails to write image on rootfs partition. I'm not sure if it's a bug, but shouldn't mtd handle bad blocks on nand flash?

Tested on r32492, ar71xx, Mikrotik RB750GL

console log:

root@d4ca6d258aeb:~# mtd erase kernel && mkdir /mnt/kernel
Unlocking kernel ...
Erasing kernel ...
root@d4ca6d258aeb:~# mount -t yaffs /dev/mtdblock1 /mnt/kernel
root@d4ca6d258aeb:~# cp /tmp/openwrt-ar71xx-nand-mod-vmlinux.elf /mnt/kernel/kernel
root@d4ca6d258aeb:~# umount /mnt/kernel
root@d4ca6d258aeb:~# logger $(date)
root@d4ca6d258aeb:~# mtd -e rootfs -rn write /tmp/openwrt-ar71xx-nand-mod-root.squashfs rootfs
Unlocking rootfs ...
Erasing rootfs ...
Failed to erase block on rootfs at 0x1ac000

Writing from /tmp/openwrt-ar71xx-nand-mod-root.squashfs to rootfs ...  [w]Error writing image.
root@d4ca6d258aeb:~#

syslog:

2012-06-25 12:38:37     d4ca6d258aeb    kern.info       [ 1420.470000] yaffs: dev is 32505857 name is "mtdblock1" rw
2012-06-25 12:38:37     d4ca6d258aeb    kern.info       [ 1420.470000] yaffs: passed flags ""
2012-06-25 12:38:37     d4ca6d258aeb    kern.debug      [ 1420.480000] yaffs: Attempting MTD mount of 31.1,"mtdblock1"
2012-06-25 12:38:37     d4ca6d258aeb    kern.debug      [ 1420.490000] yaffs_read_super: is_checkpointed 0
2012-06-25 12:38:49     d4ca6d258aeb    kern.debug      [ 1432.400000] save exit: is_checkpointed 0
2012-06-25 12:38:49     d4ca6d258aeb    kern.debug      [ 1432.400000] save exit: is_checkpointed 0
2012-06-25 12:38:49     d4ca6d258aeb    kern.debug      [ 1432.400000] save exit: is_checkpointed 0
2012-06-25 12:39:12     d4ca6d258aeb    user.notice     root: Mon Jun 25 12:39:12 CEST 2012
2012-06-25 12:39:20     d4ca6d258aeb    kern.warning    [ 1463.380000] nand_erase_nand: attempt to erase a bad block at page 0x00002d60

Any hints?

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by anonymous

I have this same problem. There doesn't seem to be anything in the mtd tool to deal with bad erase blocks, even in the trunk version. Surely others have this problem?

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

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.