From: Artem Bityutskiy <dedekind1@gmail.com>
To: Saurabh Jain <saurabh@thinvent.in>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Squashfs over UBI
Date: Wed, 03 Feb 2010 18:17:32 +0200 [thread overview]
Message-ID: <1265213852.7343.107.camel@localhost> (raw)
In-Reply-To: <c11c61211001241116i50063d7ds6e2fb4edcce0769@mail.gmail.com>
On Mon, 2010-01-25 at 00:46 +0530, Saurabh Jain wrote:
> Hi!
>
> I've been trying to get squashfs working on a new board with NAND
> flash. However, the mtd of the mtdblock I am using contains bad
> blocks. When I dd in the squashfs file system, the kernel throws
> end_request, nand_erase_nand and mtdblock errors.
Yeah, IMHO, current mtdblock* should die and we need one which can cope
with bad blocks...
> I therefore decided to use squashfs over UBI.
If you are fine with mtdblock otherwise, i.e., you are OK with the
wear-levelling and error handling aspects of it, then for you it will be
better to hack it a little and teach it to skip bad blocks.
UBI has some overhead you might not want.
> I saw this discussed in
> a couple of places on the web. However, the /dev/ubi0 device created
> by ubiattach is a character device.
Right. This is documented in the MTD web pages.
> I can't just dd my squashfs into
> it.
Right.
But you can try this hack:
1. load gluebi which will emoulate an /dev/mtdX on top of /dev/ubi0.
2. load mtdblock which will emulate /dev/mtdblockX on top of
that /dev/mtdx.
For item 1, see here:
http://www.linux-mtd.infradead.org/faq/ubi.html#L_run_jffs2
> If I create a UBIFS over this /dev/ubi0, and then put my squashfs
> into it, that works, but now I've got "double compression", something
> I don't want on an embedded system.
>
> Is it possible to get squashfs to use the bad block avoidance features
> of UBI, without using UBIFS?
See above for a not very beautiful way, which should work, nevertheless.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
prev parent reply other threads:[~2010-02-03 16:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-24 19:16 Squashfs over UBI Saurabh Jain
2010-02-03 16:17 ` 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=1265213852.7343.107.camel@localhost \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=saurabh@thinvent.in \
/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