mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* ubiattach error
@ 2011-09-20 14:25 Lambrecht Jürgen
  2011-09-23 14:01 ` Lambrecht Jürgen
  0 siblings, 1 reply; 2+ messages in thread
From: Lambrecht Jürgen @ 2011-09-20 14:25 UTC (permalink / raw)
  To: barebox

Hello,

When I want to run 'ubiattach' I get this error:

barebox:/dev erase nand0.root1.bb
Skipping bad block at 0x08000000
Skipping bad block at 0x08020000
barebox:/dev ubiattach nand0.root1
UBI: attaching mtd0 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: empty MTD device detected
UBI: create volume table (copy #1)
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 0:512, 
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 1:512, 
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 2:512, 
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 3:512, 
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 4:512, 
written 0 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 5:512, 
written 0 bytes
failed to attach: I/O error
------------------------------------------------------------------
- I use a imx27, and our HW is based on the imx27pdk.
- We use the BI-swap solution to work around the nand flash HW bug (2kB 
pages are load in 512 chunks, mangling the spare area) (so 
drivers/mtd/nand/nand_imx.c is patched).
- I see UBI detects a sub-page size of 512B, what does that mean?
   Because in the UBI menu config "drivers - mtd - NAND - select nand 
pagesize you want to support booting from", I must take '2048 byte page 
size'; with '512 byte and 2048 byte pagesize' selected the board does 
not boot.
- I use LTIB from CVS (not the freescale one), that I have patched 
according to the imx28 BSP from freescale to support UBI

Kind regards,
Jürgen

-- 
Jürgen Lambrecht
R&D Associate
Tel: +32 (0)51 303045    Fax: +32 (0)51 310670
http://www.televic-rail.com
Televic Rail NV - Leo Bekaertlaan 1 - 8870 Izegem - Belgium
Company number 0825.539.581 - RPR Kortrijk

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ubiattach error
  2011-09-20 14:25 ubiattach error Lambrecht Jürgen
@ 2011-09-23 14:01 ` Lambrecht Jürgen
  0 siblings, 0 replies; 2+ messages in thread
From: Lambrecht Jürgen @ 2011-09-23 14:01 UTC (permalink / raw)
  To: barebox

On 09/20/2011 04:25 PM, Lambrecht Jürgen wrote:
>
> Hello,
>
> When I want to run 'ubiattach' I get this error:
>
> barebox:/dev erase nand0.root1.bb
> Skipping bad block at 0x08000000
> Skipping bad block at 0x08020000
> barebox:/dev ubiattach nand0.root1
>
first do 'ubiformat' in linux or flash an ubi image. Then you can attach 
to it.
Mark: you can only attach 1 mtd0

After a lot of reading and trial-and-error, now I understand ubi and ubifs.

Juergen
>
> UBI: attaching mtd0 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: empty MTD device detected
> UBI: create volume table (copy #1)
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 0:512,
> written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 1:512,
> written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 2:512,
> written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 3:512,
> written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 4:512,
> written 0 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 5:512,
> written 0 bytes
> failed to attach: I/O error
> ------------------------------------------------------------------
> - I use a imx27, and our HW is based on the imx27pdk.
> - We use the BI-swap solution to work around the nand flash HW bug (2kB
> pages are load in 512 chunks, mangling the spare area) (so
> drivers/mtd/nand/nand_imx.c is patched).
> - I see UBI detects a sub-page size of 512B, what does that mean?
>    Because in the UBI menu config "drivers - mtd - NAND - select nand
> pagesize you want to support booting from", I must take '2048 byte page
> size'; with '512 byte and 2048 byte pagesize' selected the board does
> not boot.
> - I use LTIB from CVS (not the freescale one), that I have patched
> according to the imx28 BSP from freescale to support UBI
>
> Kind regards,
> Jürgen
>
> --
> Jürgen Lambrecht
> R&D Associate
> Tel: +32 (0)51 303045    Fax: +32 (0)51 310670
> http://www.televic-rail.com
> Televic Rail NV - Leo Bekaertlaan 1 - 8870 Izegem - Belgium
> Company number 0825.539.581 - RPR Kortrijk
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>


-- 
Jürgen Lambrecht
R&D Associate
Tel: +32 (0)51 303045    Fax: +32 (0)51 310670
http://www.televic-rail.com
Televic Rail NV - Leo Bekaertlaan 1 - 8870 Izegem - Belgium
Company number 0825.539.581 - RPR Kortrijk

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-23 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 14:25 ubiattach error Lambrecht Jürgen
2011-09-23 14:01 ` Lambrecht Jürgen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox