[oe] [RFC] Add ubi volume image support, fix ubifs

Koen Kooi k.kooi at student.utwente.nl
Thu Feb 12 22:45:47 UTC 2009


On 10-02-09 21:48, Tom Rini wrote:
> Hey all.  I'd like to commit the following patch.  This will add support
> for generating single image UBI volumes as well as fix creating ubifs
> images.  Going backwards here, the problem with ubifs images right now
> is that you must pass in -m -e -c -r and -o args in order to get an
> image to come out and only -r / -o are not flash part specific.  To fix
> this, on ubifs images, pass in ${MKUBIFS_ARGS}.  Why not just
> ${EXTRA_IMAGECMD} ? That's because making a UBI volume requires a
> different set of mandatory arguments too.  And as there's no way (today)
> to have IMAGETYPE=foo require IMAGETYPE=bar to be built previously, we
> need to use a separate mechanism here (similar to ext2/3 and blocksize).
> To pass in the ubinize args we then go and set UBINIZE_ARGS and then we
> get our 1 image UBI volume to come out if mtd-utils-native=1.2.0+git is
> being used.
>
> As an example, on a board we have with a Samsung K9F2G08U0M we do:
> # Make 256MiB/128KiB
> MKUBIFS_ARGS = "-m 2048 -e 126976 -c 2047"
> UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"

To get the values for these params:

http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&id=76af265d0f1a9ed377dbaba7be03fe23643910fe

# do ubiattach /dev/ubi_ctrl -m 4
# From dmesg:
# UBI: smallest flash I/O unit:    2048
# UBI: logical eraseblock size:    129024 bytes
# from ubiattach stdout:
# UBI device number 0, total 1996 LEBs
MKUBIFS_ARGS = "-m 2048 -e 129024 -c 1996"

# do ubiattach /dev/ubi_ctrl -m 4
# from dmesg:
# UBI: smallest flash I/O unit:    2048
# UBI: physical eraseblock size:   131072 bytes (128 KiB)
# UBI: sub-page size:              512
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512"

regards,

Koen





More information about the Openembedded-devel mailing list