From: "Schlägl Manfred jun." <manfred.schlaegl@gmx.at>
To: Dach Miroslaw <miroslaw.dach@psi.ch>
Cc: linux-mtd@lists.infradead.org, Grant Erickson <gerickson@nuovations.com>
Subject: RE: MTD and jffs2 mount problem on Linux-2.6.23 rc2
Date: Wed, 05 Mar 2008 10:45:23 +0100 [thread overview]
Message-ID: <1204710323.3599.12.camel@lisa.alm.archives.at> (raw)
In-Reply-To: <1B4F8000449511488D1A640DD6DECA3501EC25E3@MAILBOX0A.psi.ch>
Hi!
Am Mittwoch, den 05.03.2008, 09:24 +0100 schrieb Dach Miroslaw:
> Hi Grant,
>
> Thanks for your hints. As regards the endianness. I have tried both little and big endian options.
> In my case only Big endian (native for ppc405) is accepted. There is however the CRC calculation mismatch
> between the calculated one (by the kernel) during mounting the jffs2 and that one which is calculated by mkfs.jffs2.
>
> I am however not sure that the Flash memory access in my case is fine for all modes A8 A16 A32.
> I have got than idea to test jffs2 image stored somehow in RAM instead of Flash to test if jffs2 image generated by mkfs.jffs2 is consistent from kernel 2.6.23 point of view.
>
> this what I have tried was:
>
> losetup /dev/loop0 img2.jffs2
> mount -t jffs2 /dev/loop0 /mnt
>
> unfortunately mount did not work.
This can't work, because jffs2 is using the block-device mtdblock only
to get device-information about the mtd-device. jffs2 itself is using
the mtd-api directly. so jffs2 only on mtd.
>
> Maybe it is possible somehow to use RAMDISK to emulate the Flash to mount jffs2 image?
>
There is a nand-Simulator (nandsim). It simulates a nand in
kernel-virtual-memory. With nandsim you'll get a ram-mtd-device, on
witch jffs2 can be used.
Using nandsim: http://www.linux-mtd.infradead.org/faq/nand.html
Example: simulating 32MB 8bit nand-flash (page:512, eb: 16K):
* nandsim & mtd
# modprobe nandsim first_id_byte=0x20 second_id_byte=0x35
# modprobe mtdblock
# modprobe mtdchar
* erase (not neccessary)
# flash_eraseall /dev/mtd0
Erasing 16 Kibyte @ 1ffc000 -- 99 % complete.
* Create jffs2-Image
# mkfs.jffs2 -p 512 -s 512 -e 16384 -d jffs2 -o jffs2.img
* Write to nandsim
# nandwrite /dev/mtd0 jffs2.img
Writing data to block 0
Writing data to block 4000
* Mount
# mount /dev/mtdblock0 /mnt/ -t jffs2
> Best Regards
>
> M.
>
>
> -----Original Message-----
> From: Grant Erickson [mailto:gerickson@nuovations.com]
> Sent: Tue 3/4/2008 8:40 PM
> To: Dach Miroslaw
> Subject: Re: MTD and jffs2 mount problem on Linux-2.6.23 rc2
>
> On 3/4/08 11:29 AM, Dach Miroslaw wrote:
> > In fact I have NOR flash. The 'dd' command to copy data to flash and backwards
> > to the file works fine so I thing that 'dd' is not the issue.
>
> Seems reasonable.
>
> > I suspect that crc32 works differently when generating the jffs2 image file
> > and the kernel uses different calculation methode? Maybe I am wrong.
>
> Are you specifying an endianness/byte ordering on the command line when
> creating the JFFS2 file system?
>
> > Maybe it is the problem to access the Flash memory? Is there any method to
> > mount jffs2 image in RAM instead of Flash just to test the jffs2 image
> > consistency?
>
> If your kernel is so configured, you should be able to mount it via the
> loopback device:
>
> mount -t loop root.img /mnt
>
> Regards,
>
> Grant
>
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
Greetings
Manfred
next prev parent reply other threads:[~2008-03-05 9:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <C3F2E592.DC63%gerickson@nuovations.com>
2008-03-05 8:24 ` MTD and jffs2 mount problem on Linux-2.6.23 rc2 Dach Miroslaw
2008-03-05 9:45 ` Schlägl Manfred jun. [this message]
2008-03-05 12:03 ` Jörn Engel
2008-03-05 13:44 ` Dach Miroslaw
2008-03-05 13:50 ` Jörn Engel
2008-03-06 7:48 ` Dach Miroslaw
2008-03-06 14:19 ` Jörn Engel
2008-03-04 10:34 Dach Miroslaw
2008-03-04 17:14 ` Grant Erickson
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=1204710323.3599.12.camel@lisa.alm.archives.at \
--to=manfred.schlaegl@gmx.at \
--cc=gerickson@nuovations.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miroslaw.dach@psi.ch \
/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