Static UBI volumes and ubiupdatevol ?

Ricard Wanderlof ricard.wanderlof at axis.com
Fri Dec 17 04:39:18 EST 2010


(Crud, I was trying to concatenate both replies into one message to avoid 
two threads on the same issue but then I thought of something else after 
sending the first one off).

On Thu, 16 Dec 2010, Artem Bityutskiy wrote:

>> With a system based on mtd+jffs2 it is actually possible to reflash the
>> partition with the [read only] root file system on it without unmounting,
>> as long as no accesses are made to the physical flash during the rewrite
>> or afterwards. In other words, immediately after reflashing the system
>> must be rebooted.
>
> Hmm, I presume you can do this with UBIFS, but you need to make sure all
> the backgound stuff like moving and eraseing eraseblocs is done before
> doing this by doing fsync() on your /dev/ubiX_Y device (UBI volume
> character device), see the 'vol_cdev_fsync()' function. Ah, and of
> course you need to sync UBIFS before this.
>
> Then if you can guarantee that no one is reading writing to it, you can
> change the flash.

It would be nice to use ubiupdatevol to do this, but it won't let me do 
that if the volume is mounted (naturally). I don't know if this is 
something that is enforced by ubiupdatevol or ubi. I would assume the 
latter but I haven't checked the code.

Of course I could always write my own "ubiupdatevol" to deal with this but 
it's always nice to use existing and supported tools.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the linux-mtd mailing list