[U-Boot] Current status of UBI?

Stefan Roese sr at denx.de
Mon May 4 09:59:22 CEST 2009


On Thursday 30 April 2009, Matthew L. Creech wrote:
> Hi, I'm using the latest U-Boot GIT snapshot (4/28), and trying to get
> UBI/UBIFS working.  I'm wondering what the current status of UBI
> support in U-Boot is, and whether what I'm doing will work.

Current status: I'm successfully using UBI and UBIFS on multiple platforms 
(mostly PPC based).

> The goal is to get a single R/W filesystem on a large NAND partition.

You are aware that the U-Boot UBIFS implementation is (intentionally) 
read-only?

> If I understand correctly, I should be able to:
>
> 1. [In U-Boot]: Use "mtdparts" to partition my NAND device
> 2. [In U-Boot]: Use "ubi part" to setup UBI on a partition
> 3. [In U-Boot]: Use "ubi create" to create a volume which fills the
> whole partition
> 4. [On my PC]: Use "mkfs.ubifs" & "ubinize" to create a UBIFS image
> 5. [In U-Boot]: Use "ubi write" to write the UBIFS image to the volume

No. If you used "ubinize" then your image is already an "UBI" image which has 
to be written to FLASH with the "usual" FLASH commands (e.g. cp.b for NOR, 
nand write for NAND etc).

> 6. [In Linux]: Boot using the UBIFS image as my rootfs
>
> Is this more or less correct?
>
> The problem I'm currently running into is step 2, which throws an
> error in ubi_io_write() (see below).  Googling around turned up a few
> hits that suggested turning off sub-page writes, so I tried adding
> NAND_NO_SUBPAGE_WRITE to NAND_SAMSUNG_LP_OPTIONS, but that causes a
> crash.  Actually, it gets to volume table copy #2 in that case, so the
> crash may be unrelated to subpage writes.
>
> Anyway, I'm mainly wondering whether this is a good approach before I
> go chasing down this crash, and also whether others are using UBIFS on
> large-page flash devices successfully in U-Boot.  Any feedback is
> appreciated, thanks!

I have to admit that I never used UBIFS on large page NAND chips yet. One 
thing you should make sure is to erase the FLASH before calling "ubi part". I 
suggest you start a again with step 2 after erasing this UBI partition.

Best regards,
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
=====================================================================


More information about the U-Boot mailing list