public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Lauren Del Giudice <lauren@wyplay.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI - exclude bootloader blocks from wear levelling
Date: Sun, 10 Jan 2010 01:14:55 +0200	[thread overview]
Message-ID: <1263078895.7315.110.camel@localhost.localdomain> (raw)
In-Reply-To: <4B2FA658.6010407@wyplay.com>

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 (Артём Битюцкий)

      parent reply	other threads:[~2010-01-09 23:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 16:46 UBI - exclude bootloader blocks from wear levelling Lauren Del Giudice
2009-12-21 21:30 ` Darwin Rambo
2009-12-21 22:51   ` twebb
2009-12-21 23:12     ` Darwin Rambo
2010-01-09 23:18       ` Artem Bityutskiy
2009-12-22  8:08   ` Lauren Del Giudice
2009-12-22 14:03     ` Darwin Rambo
2009-12-23  6:32 ` Wolfgang Denk
2009-12-23 17:12   ` Darwin Rambo
2009-12-23 21:08     ` Lauren Del Giudice
2009-12-23 21:40     ` Wolfgang Denk
2009-12-23 23:39       ` Darwin Rambo
2010-01-09 23:14 ` Artem Bityutskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1263078895.7315.110.camel@localhost.localdomain \
    --to=dedekind1@gmail.com \
    --cc=lauren@wyplay.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox