From: Matthieu CASTET <matthieu.castet@parrot.com>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
Thomas Herrmann <THerrmann@adwin.de>
Subject: Re: UBI+UBIFS on Read-Only NAND
Date: Fri, 6 Dec 2013 12:33:03 +0100 [thread overview]
Message-ID: <20131206123303.0702ec88@parrot.com> (raw)
In-Reply-To: <CACQ1gAiYBT987kad3Tk6cwsSfv29_uiAm8S=NzA=7FOR6FybYg@mail.gmail.com>
Le Fri, 6 Dec 2013 09:24:40 +0100,
Richard Genoud <richard.genoud@gmail.com> a écrit :
> 2013/12/5 Thomas Herrmann <THerrmann@adwin.de>:
> > We had an old JFFS based system that had a dip switch connected to
> > the write-enable pin of the flash device, and it worked as
> > expected. Users were able to configure and use the system in r/w
> > mode and then "lock" the configuration.
> >
> > I tried the same with our newer hardware, and UBI/UBIFS. I did not
> > use static volumes, since write support is essential for initial
> > setup. However, the system will not boot if the flash is
> > write-protected in hardware, because UBI assumes that it is R/W.
> >
> > What is the suggested solution for such a setup? I could not find
> > anything in the FAQ or in the archive, but I may have been
> > searching for the wrong keywords...
>
> AFAIK, UBI is not design to be used on a write protected NAND.
> As it is basically a wear-leveling / bad block handling layer, it
> wouldn't make much sense without a write capability.
> The closest use case I can imagine would be to mount the UBIFS volume
> RO by default and remount it RW when a gpio button is pushed.
> But with a dip switch directly on the NAND WP pin, I don't think
> there's an UBI based solution.
>
When you open a UBI volume you can choose the mode (UBI_READONLY,
UBI_READWRITE, UBI_EXCLUSIVE).
But ubifs always open it in UBI_READWRITE mode (in ubifs_fill_super),
even if we are in ro mode.
If it wasn't the case you can implement a software write protect at ubi
level.
Matthieu
prev parent reply other threads:[~2013-12-06 11:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 12:53 UBI+UBIFS on Read-Only NAND Thomas Herrmann
2013-12-06 8:24 ` Richard Genoud
2013-12-06 11:33 ` Matthieu CASTET [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=20131206123303.0702ec88@parrot.com \
--to=matthieu.castet@parrot.com \
--cc=THerrmann@adwin.de \
--cc=linux-mtd@lists.infradead.org \
--cc=richard.genoud@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;
as well as URLs for NNTP newsgroup(s).