linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Problem with JFFS2 mount
@ 2011-10-01 14:55 -= KuK =-
  2011-10-14  8:41 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: -= KuK =- @ 2011-10-01 14:55 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have problem with creating image file from mounted jffs2 file system.

I have 1:1 dump from 1GB NAND which is UBI format.
But it contains JFFS part also.
This part can be downloaded from my server.
www.pouchx.com/PRV/HDS/K9G8G08U0M_Samsung_1GB_NAND_Config.ini_block_JFFS.rar

Archive contains two files. One is original JFFS copy, second is same 
file but I deleted ECC blocks.

I mount jffs image (noECC) with this script:

$ sudo apt-get install mtd-tools
$ sudo modprobe -v mtd
$ sudo modprobe -v jffs2
$ sudo modprobe -v mtdram total_size=8192 erase_size=256
$ sudo modprobe -v mtdchar
$ sudo modprobe -v mtdblock
$ sudo dd if=/HDS/Config.img of=/dev/mtd0
$ sudo mount -t jffs2 /dev/mtdblock0 /HDS/JFFS

After that I can see all 3 files that are in jffs image:
can_unique_id
Config.ini
MAC

I make no changes to these files.

That I want to make new image from mounted device.

I use this command:
$ sudo mkfs.jffs2 -r /HDS/JFFS -o /HDS/newimage.jffs2 -e 256 -l

Output file is only 696bytes.
www.pouchx.com/PRV/HDS/newconfig2.zip

Can anyone help me with this.
How can I get same image as original one?

In the future I want to edit Config.ini but now I just want to test that 
I will be able to create correct and working image.

Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with JFFS2 mount
  2011-10-01 14:55 Problem with JFFS2 mount -= KuK =-
@ 2011-10-14  8:41 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-10-14  8:41 UTC (permalink / raw)
  To: -= KuK =-; +Cc: linux-mtd

On Sat, 2011-10-01 at 16:55 +0200, -= KuK =- wrote:
> Hi,
> 
> I have problem with creating image file from mounted jffs2 file system.
> 
> I have 1:1 dump from 1GB NAND which is UBI format.
> But it contains JFFS part also.
> This part can be downloaded from my server.
> www.pouchx.com/PRV/HDS/K9G8G08U0M_Samsung_1GB_NAND_Config.ini_block_JFFS.rar
> 
> Archive contains two files. One is original JFFS copy, second is same 
> file but I deleted ECC blocks.
> 
> I mount jffs image (noECC) with this script:
> 
> $ sudo apt-get install mtd-tools
> $ sudo modprobe -v mtd
> $ sudo modprobe -v jffs2
> $ sudo modprobe -v mtdram total_size=8192 erase_size=256
> $ sudo modprobe -v mtdchar
> $ sudo modprobe -v mtdblock
> $ sudo dd if=/HDS/Config.img of=/dev/mtd0
> $ sudo mount -t jffs2 /dev/mtdblock0 /HDS/JFFS

Try using nandwrite and nanddump instead - you will find them in
mtd-utils. And you do not need mtdblock to mount JFFS2 - I think mount
-t jffs2 mtd0 /HDS/JFFS will work fine.

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-14  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-01 14:55 Problem with JFFS2 mount -= KuK =-
2011-10-14  8:41 ` Artem Bityutskiy

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).