public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Strange UBI problems
Date: Wed, 20 Nov 2013 04:42:45 -0700	[thread overview]
Message-ID: <528CA035.4000907@mlbassoc.com> (raw)
In-Reply-To: <528B9A61.2000103@mlbassoc.com>

On 2013-11-19 10:05, Gary Thomas wrote:
> I'm building U-Boot from the FSLC (repo/fork) on an i.MX6
>    U-Boot 2013.10-00012-g5bc3118-dirty (Nov 19 2013 - 09:17:18)
>    CPU:   Freescale i.MX6SOLO rev1.1 at 792 MHz
>
> After I made a small change today in the NAND FLASH layout, I can
> no longer use UBI from U-Boot.  Here's what I see today:
>
> MyBoard > mtdparts default
> MyBoard > mtdparts
>
> device nand0 <gpmi-nand>, # parts = 4
>   #: name                size            offset          mask_flags
>   0: boot                0x001e0000      0x00000000      0
>   1: env                 0x00020000      0x001e0000      0
>   2: linux               0x00f00000      0x00200000      0
>   3: fs                  0x06f00000      0x01100000      0
>
> active partition: nand0,0 - (boot) 0x001e0000 @ 0x00000000
>
> defaults:
> mtdids  : nand0=gpmi-nand
> mtdparts: mtdparts=gpmi-nand:1920k(boot),128k(env),15m(linux),-(fs)
>
> MyBoard > ubi part linux
> UBI: attaching mtd1 to ubi0
> UBI: physical eraseblock size:   131072 bytes (128 KiB)
> UBI: logical eraseblock size:    126976 bytes
> UBI: smallest flash I/O unit:    2048
> UBI: VID header offset:          2048 (aligned 2048)
> UBI: data offset:                4096
> UBI error: ubi_read_volume_table: the layout volume was not found
> UBI error: ubi_init: cannot attach mtd1
> UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
> UBI init error 22
>
> Notice that when I try to access the 'linux' partition, it's trying
> to use mtd1 (env).  In fact, it doesn't seem to matter at all what
> partition I try to access, it always wants to use mtd1.
>
> Today, I changed the MTD layout from
>    mtdparts=gpmi-nand:896k(boot),128k(env),15m(linux),-(fs)
> to
>    mtdparts=gpmi-nand:1920k(boot),128k(env),15m(linux),-(fs)
> I then rebuilt my Linux and reinstalled the partition.  Linux is totally
> happy with this new layout, but U-Boot doesn't like it at all.
>
> Just to make sure I have this right, I just restored the previous layout
> and everything works as expected.
>
> What am I missing?  Why is UBI not working with this layout?
>
> Thanks for any help/pointers
>

Oddly enough, when I change the layout to
   mtdparts=gpmi-nand:3968k(boot),128k(env),15m(linux),-(fs)
the UBI works again in U-Boot!

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

      reply	other threads:[~2013-11-20 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 17:05 [U-Boot] Strange UBI problems Gary Thomas
2013-11-20 11:42 ` Gary Thomas [this message]

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=528CA035.4000907@mlbassoc.com \
    --to=gary@mlbassoc.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