From: Frank Haverkamp <haver@vnet.ibm.com>
To: Marteo Tim <tim.marteo@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: how to use jff2 on UBI layer?
Date: Mon, 10 Jul 2006 15:01:11 +0200 [thread overview]
Message-ID: <1152536472.6066.28.camel@localhost.localdomain> (raw)
In-Reply-To: <91b24a870607091950q59a8d316gb3d561fd1bbe88e@mail.gmail.com>
Hi,
On Mon, 2006-07-10 at 10:50 +0800, Marteo Tim wrote:
> I'm interesting in UBI, which is the new flash management layer. I
> have also get the newest UBI sources from git.
> My question is: how can i use jff2 on UBI layer? In UBI's source, i
> can not find block device relating codes. After load UBI module, i
> found /dev/ubi0, but it is a char device.
> Thanks.
the code which enables you to run JFFS2 on a UBI volume is currently
under discussion between Joern, Thomas Gleixer and Artem. We have
a working prototype, but we think, that it needs some reworks. That is
why it is not yet published. I am trying to make the folks hurry
up, but they are currently busy.
I will try to describe what you need to do to run JFFS2 although we
need to wait for the code still.
/dev/ubi0 is the UBI device, you cannot run JFFS2 on it. To run JFFS2,
you need to create a dynamic UBI volume first. You can do that in three
ways:
1. Use the UBI toolchain to create a binary image containing UBI
volumes. mtd-utils.git/ubi-utils/scripts/test.cfg shows a configuration
file where you specify the volumes you want to have and the binary input
you want to put into them. The JFFS2 volume needs to be a dynamic UBI
volume, because you want to write single pages or subpages if mtd allows
it. The pfi file is processed by pfi2bin and bin2nand to form an image
for your flash. See the example Makefile in that directory too. In
bin2nand you might want add your specific ECC layout in the OOB data if
the existing one is not valid for your hardware. The resulting data you
can flash - bad block aware - into your NAND flash. For NOR you ommit
the bin2nand step and take the binary directly. This can be done by a
JTAG utility or by nandwrite. The output will contain a UBI volume
information table and when you attach your mtd device to UBI, it will
generate all the volumes you defined automatically.
2. Use the UBI tools on the system itself create, delete and update UBI
volumes. ubimkvol creates volumes, ubiupdatevol will push data into them
and with ubirmvol you can remove them (use ubiupdatevol ... -t to
truncate them, otherwise UBI will not let you delete them).
3. Use the pfi file generated by mkpfi and the tool pfiflash on the
target system to automatically update your flash. This tool is intended
to easily allow UBI volume update. The pfi contains the UBI volume
parameters and if the volume is not existing it will be created
automatically by the tool.
Option 2 is good for trying it out. Option 1. is more for a
manufacturing kind of process. Option 3. can be used for updating UBI
volumes which are not in use (if you have a rootfs, or mounted fs in a
UBI volume it is in use and cannot be updated that way of course).
If you have the dynamic volumes for your JFFS2 created you could mount
them like this:
mount -t jffs2 mtd:rootfs_0 /mnt/
^
|
name of UBI volume (specified in the cfg file or with ubimkvol
The last step would work if the mtd->ubi translation layer, which we
call gluebi (glue/UBI) would be available. I hope that this issue is
solved soon.
Regards,
Frank
next prev parent reply other threads:[~2006-07-10 13:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 2:50 how to use jff2 on UBI layer? Marteo Tim
2006-07-10 13:01 ` Frank Haverkamp [this message]
2006-07-12 2:21 ` Tim Marteo
2006-07-20 2:42 ` Kyungmin Park
2006-07-20 9:45 ` Jörn Engel
2006-07-21 6:42 ` Frank Haverkamp
2006-07-21 7:59 ` Jörn Engel
2006-07-24 10:46 ` Artem B. Bityutskiy
2006-07-24 11:40 ` Jörn Engel
2006-07-26 16:52 ` Artem B. Bityutskiy
2006-07-27 12:54 ` Artem B. Bityutskiy
2006-07-30 19:28 ` Josh Boyer
2006-07-31 7:21 ` Artem B. Bityutskiy
2006-07-31 7:43 ` Artem B. Bityutskiy
2006-07-31 9:29 ` Frank Haverkamp
2006-07-31 13:52 ` Josh Boyer
2006-07-31 8:09 ` Artem B. Bityutskiy
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=1152536472.6066.28.camel@localhost.localdomain \
--to=haver@vnet.ibm.com \
--cc=linux-mtd@lists.infradead.org \
--cc=tim.marteo@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