UBI - exclude bootloader blocks from wear levelling

Artem Bityutskiy dedekind1 at gmail.com
Sat Jan 9 18:14:55 EST 2010


On Mon, 2009-12-21 at 17:46 +0100, Lauren Del Giudice wrote:
> I'm new to UBI... I understood that static wear levelling is applied
> accross the whole device (a NAND device in my case); If so, how can
> I exclude blocks reserved for the bootloader from wear levelling?

So you basically want:

1. reserve the first N PEBs for the boot-loader, kernel, whatever. You
do not want UBI to touch these N ones.
2. The rest M PEBs you want to feed UBI.

(PEB = physical erase-block)

UBI works on top of MTD devices, or MTD partitions. So all you need is
to properly partition your NAND. Make sure your MTD partition which you
feed to UBI covers only those M PEBs.

E.g., you may have /dev/mtd0 which is "mapped" to the 1st N PEBs,
and /dev/mtd1 which is mapped to the rest. And then you attach /dev/mtd1
to UBI. UBI will touch only /dev/mtd1. People do this.

Simply speaking, UBI works on top of the MTD device you gave it. You are
free to partition your NAND chip as you wish.

P.S.: you may even have 2 NAND chips, create a striping layer on top of
them, expose them as one single "striped" MTD device, and feed that one
to UBI.

HTH.

But yes, you should take into account the points Wolfgang provided.

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




More information about the linux-mtd mailing list