public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Felix Fietkau <nbd@openwrt.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: UBI: ignore/overwrite old data/PEBs after flashing
Date: Thu, 16 Oct 2014 13:09:28 +0300	[thread overview]
Message-ID: <1413454168.7906.154.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <CACna6rxapt_J8qjMb37UnQ5iFE3DJ06U8nok_Fw=RO5UHs6Vsg@mail.gmail.com>

On Thu, 2014-10-16 at 07:34 +0200, Rafał Miłecki wrote:
> Hi,
> 
> I need some help with flashing UBI images.
> 
> I work with Broadcom ARM SoCs that use a CFE bootloader. In most cases
> it doesn't provide a way to clear flash content before flashing the
> firmware. It means that if I have 120 MiB of space for the firmware
> and I flash 20 MiB firmware, the rest of flash (100 MiB) won't be
> cleared. My partitioner driver will create 2 MiB partition for kernel
> and 118 MiB partition for UBI.

So what I hear is that the flasher does not provide users the "erase"
operation, but only provides users a "write" operation?

Then the solution would be to pad your image with 0xFFs and write it.
UBI will notice PEBs which do not contain UBI headers and will erase
them in background.

And by the way, this is not related to your problem, but if you are
using a dumb flasher and you wanna use UBIFS, you may need to check the
"space fixup" stuff:

http://www.linux-mtd.infradead.org/faq/ubifs.html#L_free_space_fixup

  parent reply	other threads:[~2014-10-16 10:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16  5:34 UBI: ignore/overwrite old data/PEBs after flashing Rafał Miłecki
2014-10-16  9:10 ` Richard Weinberger
2014-10-16 10:21   ` Rafał Miłecki
2014-10-16 11:30     ` Artem Bityutskiy
2014-10-16 10:09 ` Artem Bityutskiy [this message]
2014-10-16 10:29   ` Rafał Miłecki
2014-10-16 10:40     ` Artem Bityutskiy
2014-10-16 11:17       ` Rafał Miłecki
2014-10-16 11:27         ` Artem Bityutskiy
2014-10-16 11:38           ` Rafał Miłecki
2014-10-16 11:54             ` Artem Bityutskiy
2014-10-16 13:51               ` Rafał Miłecki
2014-10-20 13:47                 ` Artem Bityutskiy
2014-10-20 18:40                   ` Rafał Miłecki

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=1413454168.7906.154.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nbd@openwrt.org \
    --cc=zajec5@gmail.com \
    /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