* Squashfs over UBI
@ 2010-01-24 19:16 Saurabh Jain
2010-02-03 16:17 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Saurabh Jain @ 2010-01-24 19:16 UTC (permalink / raw)
To: linux-mtd
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.
I therefore decided to use squashfs over UBI. I saw this discussed in
a couple of places on the web. However, the /dev/ubi0 device created
by ubiattach is a character device. I can't just dd my squashfs into
it. 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?
Regards,
Saurabh
http://www.thinvent.in
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Squashfs over UBI
2010-01-24 19:16 Squashfs over UBI Saurabh Jain
@ 2010-02-03 16:17 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-02-03 16:17 UTC (permalink / raw)
To: Saurabh Jain; +Cc: linux-mtd
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 (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-03 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-24 19:16 Squashfs over UBI Saurabh Jain
2010-02-03 16:17 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox