All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timon ter Braak <timonterbraak@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: Re: ubiattach error!
Date: Fri, 20 May 2011 16:24:18 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110520T181331-434@post.gmane.org> (raw)
In-Reply-To: 1305901388.2630.151.camel@localhost

Artem Bityutskiy <dedekind1 <at> gmail.com> writes:

> Hmm. Can you confirm that:
> 
> 1. you can attach the mtd device successfully.
> 2. detach it and attach again successfully.
> 3. Have a power cut, and then be unable attach it again because of this
>    error?
> 
> Do you flash an UBI image? How do you do this?

UBI itself is always able to attach to the mtd. The kernel is present on
the same chip and is never corrupted (of course it is never written to).
However, many times either the recovery of UBIFS fails, or we get some
errors after booting the kernel (probably spawned by 'ubi_bgt0d'?).

I will be happy to provide more information, but I am not sure what
exactly. It is difficult to separate what procedure corrupt the filesystem
and what does work. For example, even a normal 'reboot' command
results in the message 'recovery needed'; is that normal?

We flash a UBI image generated by the buildroot toolchain (we used
buildroot 2010.05 and 2011.02). We are able to work with the system
for an arbitrary amount of reboots and/or power cycles, but I can almost
destroy the filesystem on command.

I am working with a custom designed board for research purposes.
The board has been available for about a year right now. We started
with linux 2.6.33.4 and tried various patches and kernel upgrades,
to no avail. We think the main problem is that we use a Spansion
GL512P NOR flash, while most mechanisms within UBI(FS) assume a
certain state machine within the chip that may not hold at all times
for this one?

Best regards,
Timon ter Braak

Creating 3 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000400000 : "linux"
0x000000400000-0x000002000000 : "rootfs"
0x000002000000-0x000004000000 : "rest"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    130944 bytes
UBI: smallest flash I/O unit:    1
UBI: VID header offset:          64 (aligned 64)
UBI: data offset:                128
UBI: max. sequence number:       76
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "rootfs"
UBI: MTD device size:            28 MiB
UBI: number of good PEBs:        224
UBI: number of bad PEBs:         0
UBI: number of corrupted 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: 224
UBI: number of PEBs reserved for bad PEB handling: 0
UBI: max/mean erase counter: 2/1
UBI: image sequence number:  0
UBI: background thread "ubi_bgt0d" started, PID 21
macb macb: invalid hw address, using random
macb macb: eth0: Features changed: 0x00004800 -> 0x00004000
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffbc000 irq 22 (aa:4b:67:1f:7a:58)
eth0: attached PHY driver [Marvell 88E1111]
cpuidle: using governor ladder
cpuidle: using governor menu
TCP cubic registered
NET: Registered protocol family 17
Installing 9P2000 support
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   27498240 bytes (26853 KiB, 26 MiB, 210 LEBs)
UBIFS: journal size:       7725696 bytes (7544 KiB, 7 MiB, 59 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)

  reply	other threads:[~2011-05-20 16:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23  9:26 ubiattach error! jerry
2010-04-08  8:23 ` Artem Bityutskiy
2011-05-20 14:14   ` Timon ter Braak
2011-05-20 14:23     ` Artem Bityutskiy
2011-05-20 16:24       ` Timon ter Braak [this message]
2011-05-23 12:42         ` Artem Bityutskiy

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=loom.20110520T181331-434@post.gmane.org \
    --to=timonterbraak@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.