Expanding UBI fs to maxavailable size

Karsten Jeppesen karsten at jeppesens.com
Mon Oct 18 17:22:37 EDT 2010


Hi there,
....I think I found an error :-)

I have an ARM platform with either 32 or 64MB FLASH, and I want to make 
an image that I can burn more or less directly (ie: not tar) into the 
flash regardless if its the 32 or the 64MB edition.
So I assumed that is what the autoresize flag is about, but maybe I am 
wrong here.
I can get ubiformat to burn the image to the flash, but subsequently the 
filesystem doesn't expand to occupy the max available area.
What am I doing wrong - and how is it supposed to be achieved? Or is 
this an error or a missing feature?

Content of ubinize.cfg is>
---
[kjp_ubi]
mode=ubi
image=kjp.img
vol_id=0
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
---

and my generation script looks like this:
---
#!/bin/sh
rm -rf work *.img 2>/dev/null
mkdir work
tar xzf armroot-stripped.tar.gz --directory work
mkfs.ubifs --root=work --min-io-size=1 --leb-size=130944 
--max-leb-cnt=232 -o kjp.img -x zlib
ubinize -o ubi.img --min-io-size=1 --peb-size=131072 ubinize.cfg
---

Burning the image to flash using:
ubiformat /dev/mtd4 -e 0 --yes -f ubi.img

The resulting filesystem will in the 64 MB edition be about 470 leb's. 
But the stupid thing wont expand. Sigh.

Enlightenment will be greatly appreciated

Sincerely,
Karsten Jeppesen




More information about the linux-mtd mailing list