UBI partitioning in embedded device?

Artem Bityutskiy dedekind1 at gmail.com
Mon Apr 18 03:09:15 EDT 2011


On Mon, 2011-04-18 at 08:44 +0200, Ricard Wanderlof wrote:
> Are there any opinions here on the partitioning of a flash memory in an 
> embedded device when using UBI?
> 
> Principially, one could let UBI manage the whole flash as one mtd 
> partition, except possibly some boot area due to restriction in the boot 
> ROM of the system in question.

FYI, IBM people were able to implement boot initial boot loader with the
limit of 4KiB for the whole initial boot loader, and it supported R/O
UBI (but not UBIFS of course).

>  But is it wise to do so, assuming for 
> instance there is data in part of the flash that you really want to avoid 
> loosing, such as calibration data?

The best way to not lose it is to have several copy of it, IMO.

>  Of course, theoretically, once the 
> kernel has access to one part of the flash it could clobber anything, 
> still, the mtd code has been proven for years whereas UBI is relatively 
> young, so one idea would be to partition that flash into several mtd 
> partitions (e.g. boot, running system, and calibration data), and let UBI 
> handle these separately. That could minimize the risk of UBI clobbering 
> the calibration data when operating on the running system, for instance.
> 
> Any thoughts?

You can let UBI manage your calibration data in a static UBI volume. But
additionally, you can have a separate calibration data back-up
partition, just in case.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list