public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Bricked when trying to attach UBI
Date: Wed, 19 Dec 2012 16:24:32 +0100	[thread overview]
Message-ID: <50D1DC30.1060701@gmail.com> (raw)
In-Reply-To: <50D1A4C2.6020207@comelit.it>

Dear Luca Ceresoli,

On 19.12.2012 12:28, Luca Ceresoli wrote:
> Hi all,
> 
> I am facing a problem with some boards that do not boot after some
> weeks or months of normal usage, being unable to attach UBI. They do
> not boot anymore event after a power cycle, in other words they are
> totally bricked.
> I don't know exactly what problem UBI has, but it is recoverable by
> Linux, but apparently not by U-Boot.
> 
> The boards are DIG297 (dig297 board in mainline U-Boot), based on
> OMAP3530 and equipped with a NAND flash (Micron MT29F2G16ABBEAHC) as
> their unique permanent storage.
> 
> U-Boot v2012.04.01 starts correctly. The bootcmd tries to load the
> kernel from UBI, starting with the following commands:
> 
> echo Booting from nand ...
> setenv bootargs console=ttyO2,115200n8
> mtdparts=omap2-nand.0:768k(uboot),128k(reserved),128k(uboot-env),-(ubi)
> ubi.mtd=3 root=ubi0:rootfs ro rootfstype=ubifs ip=....
> ubi part nand0,3
> ...
> 
> On "bricked" devices the output of the "ubi part nand0,3" command is:
> 
> Creating 1 MTD partitions on "nand0":
> 0x000000100000-0x000010000000 : "mtd=3"
> 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 error: ubi_wl_init_scan: no enough physical eraseblocks (0, need 1)
> 
> Now the device is totally blocked, and power cycling does not change
> the result.

have you tried to increase the malloc arena in u-boot
(CONIG_SYS_MALLOC_LEN)?
We had errors like this before [1],[2] and [3], maybe others -
apparently with another error message, but please give it a try. We know
ubi recovery needs some ram and 1MiB may be not enough.

> The interesting thing is that if I load Linux (2.6.37 + OMAP patches +
> board support patches) via TFTP and boot it with bootm, it correctly
> attaches UBI (fixing any problem it may have) and boots correctly.
> After that the board is unbricked: U-Boot can boot again normally from
> NAND.

The fact that linux can recover with a quite old version points for me
towards 'environment constraints' like to few memory in u-boot.
Unfortunately the error messages in u-boots ubi sometimes missing such
details (like -ENOMEM as in [1]).

Best regards

Andreas Bie?mann

[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/124769
[2] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/145526
[3] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/145655

  reply	other threads:[~2012-12-19 15:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 11:28 [U-Boot] Bricked when trying to attach UBI Luca Ceresoli
2012-12-19 15:24 ` Andreas Bießmann [this message]
2012-12-19 15:56   ` Luca Ceresoli
2012-12-19 16:09     ` Andreas Bießmann
2012-12-19 17:37       ` Luca Ceresoli
2012-12-20 12:44         ` Holger Brunck
2012-12-20 16:02         ` Luca Ceresoli
2013-01-02 14:37           ` Luca Ceresoli
2012-12-19 17:32 ` Vikram Narayanan
2012-12-19 18:22   ` Stefan Roese
2012-12-19 18:47     ` Vikram Narayanan
2012-12-19 18:57       ` Vikram Narayanan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D1DC30.1060701@gmail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox