[U-Boot] Remounting UBI image leads to ECC errors

Mark Jackson mpfj-list at mimc.co.uk
Tue Feb 26 16:11:36 CET 2013


We have a custom made AM335x board I'm working on and I have encountered
a problem when mounting an ubifs image from nand.  If I ...

(1) Write an ubifs image to nand
(2) Mount the ubifs image
(3) Repeat step (2)

... this then corrupts the ubifs image.

Below is a full log.

Can anyone help ?

Regards
Mark J.
---
U-Boot SPL 2013.01-00336-g044fbc4-dirty (Feb 26 2013 - 14:07:36)
U-Boot 2013.01-00336-g044fbc4-dirty (Feb 26 2013 - 14:07:36)
I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  256 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401000 using PIO, IRQ 0
Net:   cpsw
U-Boot# nandecc hw 2
HW BCH8 selected
U-Boot# mw.b 82000000 ff 81f000
U-Boot# dhcp 82000000 10.0.0.100:/nanobone/rootfs.ubifs
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 46
*** Unhandled DHCP Option in OFFER/ACK: 46
DHCP client bound to address 10.0.0.104
Using cpsw device
TFTP from server 10.0.0.100; our IP address is 10.0.0.104
Filename '/nanobone/rootfs.ubifs'.
Load address: 0x82000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####################
         657.2 KiB/s
done
Bytes transferred = 6029312 (5c0000 hex)
U-Boot# nand erase 200000 4000000

NAND erase: device 0 offset 0x200000, size 0x4000000
Erasing at 0x41e0000 -- 100% complete.
OK
U-Boot# nand write 82000000 200000 81f000

NAND write: device 0 offset 0x200000, size 0x81f000
 8515584 bytes written: OK
U-Boot# nandecc hw 2
HW BCH8 selected
U-Boot# mtdparts default
U-Boot# ubi part rootfs
Creating 1 MTD partitions on "nand0":
0x000000200000-0x000004200000 : "mtd=6"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: volume 0 ("root") re-sized from 44 to 503 LEBs
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=6"
UBI: MTD device size:            64 MiB
UBI: number of good PEBs:        512
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 512
UBI: number of PEBs reserved for bad PEB handling: 5
UBI: max/mean erase counter: 1/0
U-Boot# nandecc hw 2
HW BCH8 selected
U-Boot# mtdparts default
U-Boot# ubi part rootfs
UBI: mtd1 is detached from ubi0
Creating 1 MTD partitions on "nand0":
0x000000200000-0x000004200000 : "mtd=6"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
ECC: uncorrectable.
ECC: uncorrectable.
UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 510:0, read 64 bytes
ECC: uncorrectable.
ECC: uncorrectable.
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 510:512, read 512 bytes
ECC: uncorrectable.
ECC: uncorrectable.
UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 511:0, read 64 bytes
ECC: uncorrectable.
ECC: uncorrectable.
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 511:512, read 512 bytes
ECC: uncorrectable.
ECC: uncorrectable.


More information about the U-Boot mailing list