All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Angielski <jeff@theptrgroup.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ubi part failing on NAND
Date: Fri, 18 Dec 2009 09:47:23 -0500	[thread overview]
Message-ID: <4B2B95FB.3000502@theptrgroup.com> (raw)
In-Reply-To: <2daf59620912180435u1c0331b2m57de65ed11cbfea9@mail.gmail.com>

hedwin wrote:
> Jeff, what is the size of your allocateble memory. Had to increase it to 4MB
> to get it working.

#define CONFIG_SYS_MALLOC_LEN		(1024 * 1024)

I'll try increasing it to see if that helps.

> 
> On Fri, Dec 18, 2009 at 9:16 AM, Stefan Roese <sr@denx.de> wrote:
>> Jeff,
>>
>> On Thursday 17 December 2009 22:09:03 Jeff Angielski wrote:
>>> The "ubi part" command is failing for me on my PowerPC 85xx board.  I am
>>> not trying to do anything special, just create the partitions and
>>> volumes so that I can try writing an ubi.img.  It spits out enough
>>> information that it looks like it did work but it prints out an error
>>> nonetheless.
>>>
>>> And of course there is the long standing issue of the reported MTD
>>> number not making any sense.  But previous posts have discounted this as
>>> an issue.
>> Patches to fix/change this are welcome. :)
>>
>>> Here is the snippet of the error:
>>>
>>> UBI error: ubi_init: cannot attach mtd2
>>> UBI: mtd2 is detached from ubi0
>>> UBI error: ubi_init: UBI error: cannot initialize UBI, error -17
>>> UBI init error -17
>> -17 == EEXIST. Looking at the code (build.c) shows that ubi_attach_mtd_dev()
>> is returning this error code in case the MTD device is already attached. Even
>> though the UBI implementation should handle this without any problems. I have
>> to admit that I'm a bit out of ideas what's going wrong in your case. I just
>> checked again and UBI works fine for me with the latest version:
>>
>>
>> => mtdparts
>>
>> device nand0 <nand>, # parts = 3
>>  #: name                size            offset          mask_flags
>>  0: bootloader          0x00100000      0x00000000      0
>>  1: rootfs              0x01000000      0x00100000      0
>>  2: ubifs               0x02f00000      0x01100000      0
>>
>> active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000
>>
>> defaults:
>> mtdids  : nand0=nand
>> mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs)
>> => nand erase 1100000 2f00000
>>
>> NAND erase: device 0 offset 0x1100000, size 0x2f00000
>> Erasing at 0x3ffc000 -- 100% complete.
>> OK
>> => ubi part ubifs
>> Creating 1 MTD partitions on "nand0":
>> 0x000001100000-0x000004000000 : "mtd=2"
>> UBI: attaching mtd1 to ubi0
>> UBI: physical eraseblock size:   16384 bytes (16 KiB)
>> UBI: logical eraseblock size:    15872 bytes
>> UBI: smallest flash I/O unit:    512
>> UBI: sub-page size:              256
>> UBI: VID header offset:          256 (aligned 256)
>> UBI: data offset:                512
>> UBI: empty MTD device detected
>> UBI: create volume table (copy #1)
>> UBI: create volume table (copy #2)
>> UBI: attached mtd1 to ubi0
>> UBI: MTD device name:            "mtd=2"
>> UBI: MTD device size:            47 MiB
>> UBI: number of good PEBs:        3008
>> UBI: number of bad PEBs:         0
>> UBI: max. allowed volumes:       92
>> UBI: wear-leveling threshold:    4096
>> UBI: number of internal volumes: 1
>> UBI: number of user volumes:     0
>> UBI: available PEBs:             2974
>> UBI: total number of reserved PEBs: 34
>> UBI: number of PEBs reserved for bad PEB handling: 30
>> UBI: max/mean erase counter: 0/0
>> => mtdparts
>>
>> device nand0 <nand>, # parts = 3
>>  #: name                size            offset          mask_flags
>>  0: bootloader          0x00100000      0x00000000      0
>>  1: rootfs              0x01000000      0x00100000      0
>>  2: ubifs               0x02f00000      0x01100000      0
>>
>> active partition: nand0,0 - (bootloader) 0x00100000 @ 0x00000000
>>
>> defaults:
>> mtdids  : nand0=nand
>> mtdparts: mtdparts=nand:1m(bootloader),16m(rootfs),-(ubifs)
>> => nand erase 100000 1000000
>>
>> NAND erase: device 0 offset 0x100000, size 0x1000000
>> Erasing at 0x10fc000 -- 100% complete.
>> OK
>> => ubi part rootfs
>> UBI: mtd1 is detached from ubi0
>> Creating 1 MTD partitions on "nand0":
>> 0x000000100000-0x000001100000 : "mtd=1"
>> UBI: attaching mtd1 to ubi0
>> UBI: physical eraseblock size:   16384 bytes (16 KiB)
>> UBI: logical eraseblock size:    15872 bytes
>> UBI: smallest flash I/O unit:    512
>> UBI: sub-page size:              256
>> UBI: VID header offset:          256 (aligned 256)
>> UBI: data offset:                512
>> UBI: empty MTD device detected
>> UBI: create volume table (copy #1)
>> UBI: create volume table (copy #2)
>> UBI: attached mtd1 to ubi0
>> UBI: MTD device name:            "mtd=1"
>> UBI: MTD device size:            16 MiB
>> UBI: number of good PEBs:        1024
>> UBI: number of bad PEBs:         0
>> UBI: max. allowed volumes:       92
>> UBI: wear-leveling threshold:    4096
>> UBI: number of internal volumes: 1
>> UBI: number of user volumes:     0
>> UBI: available PEBs:             1010
>> UBI: total number of reserved PEBs: 14
>> UBI: number of PEBs reserved for bad PEB handling: 10
>> UBI: max/mean erase counter: 0/0
>> =>
>>
>>
>> Perhaps you should try the latest version as well. Could be that this is a bug
>> already fixed now. Otherwise you need to debug this problem yourself, since I
>> can't reproduce it here.
>>
>> Cheers,
>> Stefan
>>
>> --
>> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
> 


-- 
Jeff Angielski
The PTR Group
www.theptrgroup.com

      parent reply	other threads:[~2009-12-18 14:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17 21:09 [U-Boot] ubi part failing on NAND Jeff Angielski
2009-12-18  8:16 ` Stefan Roese
2009-12-18 12:35   ` hedwin
2009-12-18 12:41     ` Stefan Roese
2009-12-18 15:07       ` Jeff Angielski
2009-12-19 12:56         ` hedwin
2009-12-21 10:02         ` Stefan Roese
2009-12-18 14:47     ` Jeff Angielski [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=4B2B95FB.3000502@theptrgroup.com \
    --to=jeff@theptrgroup.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 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.