public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mkfs.jffs2 question
@ 2002-03-03  0:52 Ray Lehtiniemi
  2002-03-03  2:20 ` Ray Lehtiniemi
  2002-03-03 10:07 ` David Woodhouse
  0 siblings, 2 replies; 8+ messages in thread
From: Ray Lehtiniemi @ 2002-03-03  0:52 UTC (permalink / raw)
  To: linux-mtd

hi folks

two problems i notice with mkfs.jffs2:


first, the '-p' option seems to be parsed a little strangely:

  mkfs.jffs2                  ----> 712832 bytes
  mkfs.jffs2 -p               ----> 720896 bytes
  mkfs.jffs2 --pad            ----> 720896 bytes
  mkfs.jffs2 -p 0x800000      ----> 720896 bytes
  mkfs.jffs2 --pad=0x800000   ----> 8388608 bytes

shouldn't number 4 also result in an 8MB image?




second, if the very first dirent of the --root= argument is itself a dir, then
it is not put into the jffs2 image.  for example, if i have:

 /some/place/foo
 /some/place/usr/bin/
 /some/place/usr/sbin/

then:

  mkfs.jffs2 --root=/some/place -o some.img

will contain both /usr/bin and /usr/sbin, but

  mkfs.jffs2 --root=/some/place/usr -o some.img

will only contain /sbin (assuming it's the first dirent in usr)


i am looking at the code right now, but i was hoping the answer might jump out
at someone who already knows the code.



thanks

-- 
---------------------------------------------------------------------------
    Ray Lehtiniemi <rayl@mail.com> <rayl@otii.com>

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

* Re: mkfs.jffs2 question
  2002-03-03  0:52 mkfs.jffs2 question Ray Lehtiniemi
@ 2002-03-03  2:20 ` Ray Lehtiniemi
  2002-03-03 10:07 ` David Woodhouse
  1 sibling, 0 replies; 8+ messages in thread
From: Ray Lehtiniemi @ 2002-03-03  2:20 UTC (permalink / raw)
  To: linux-mtd

On Sat, Mar 02, 2002 at 05:52:37PM -0700, Ray Lehtiniemi wrote:

sorry to followup my own post:

> will only contain /sbin (assuming it's the first dirent in usr)
                                        ^
                                       not


also, i now think that the contents of the "missing" directory are included
in the image, they just do not show up under jffs2reader.

i recreated my toplevel tree, ensuring that the first dirent was a file,
not a directory.  now, all items show up just fine in the jffs2reader output,
but the jffs2 image is the same size as it was before.

so maybe it's just a problem with the reader?


thanks

-- 
---------------------------------------------------------------------------
    Ray Lehtiniemi <rayl@mail.com> <rayl@otii.com>

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

* Re: mkfs.jffs2 question
  2002-03-03  0:52 mkfs.jffs2 question Ray Lehtiniemi
  2002-03-03  2:20 ` Ray Lehtiniemi
@ 2002-03-03 10:07 ` David Woodhouse
  2002-03-03 10:42   ` Ray Lehtiniemi
  1 sibling, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2002-03-03 10:07 UTC (permalink / raw)
  To: Ray Lehtiniemi; +Cc: linux-mtd

rayl@otii.com said:
>  shouldn't number 4 also result in an 8MB image? 

Er, yes - probably. That looks like a getopt bug. I'm not sure what we 
could do differently.

>  second, if the very first dirent of the --root= argument is itself a
> dir, then it is not put into the jffs2 image.

>  i recreated my toplevel tree, ensuring that the first dirent was a
> file, not a directory.  now, all items show up just fine in the
> jffs2reader output, but the jffs2 image is the same size as it was
> before.

Presumably this is without the -p option? :)

> so maybe it's just a problem with the reader?

Mount the image on your host and verify this. I'm more inclined to believe
it's the jffs2reader at fault than mkfs.jffs2. 

	insmod mtdram total_size=8192 erase_size=64
	dd if=/dev/mtd0 of=/dev/mtd0
	mount -t jffs2 /dev/mtdblock0 /mnt/spare


--
dwmw2

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

* Re: mkfs.jffs2 question
  2002-03-03 10:07 ` David Woodhouse
@ 2002-03-03 10:42   ` Ray Lehtiniemi
  0 siblings, 0 replies; 8+ messages in thread
From: Ray Lehtiniemi @ 2002-03-03 10:42 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

On Sun, Mar 03, 2002 at 10:07:53AM +0000, David Woodhouse wrote:

> Presumably this is without the -p option? :)

yah :-)



> > so maybe it's just a problem with the reader?
> 
> Mount the image on your host and verify this. I'm more inclined to believe
> it's the jffs2reader at fault than mkfs.jffs2. 
> 
> 	insmod mtdram total_size=8192 erase_size=64
> 	dd if=/dev/mtd0 of=/dev/mtd0
> 	mount -t jffs2 /dev/mtdblock0 /mnt/spare

ok, i ended up copying the jffs2 image into the actual flash on the board,
and it was indeed fine.  it definitely looks like a reader problem.


thanks

-- 
---------------------------------------------------------------------------
    Ray Lehtiniemi <rayl@mail.com> <rayl@otii.com>

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

* mkfs.jffs2 question
@ 2004-05-07  1:49 Burt Bicksler
  0 siblings, 0 replies; 8+ messages in thread
From: Burt Bicksler @ 2004-05-07  1:49 UTC (permalink / raw)
  To: linux-mtd

Hi,

I've just started working with JFFS2 and I have a couple of questions. 
First some details:

Kernel 2.4.25 running on AMD Au1000 based system with AMD Flash chip.

Using latest zlib from the zlib site.  Currently building mkfs.jffs2 on
SuSE 8.2 (Intel) platform.  Other tools (e.g. fcp) built cross-compiled
for mips32 (little endian).

MTD tools that I've tried:

Snapshot from 'snapgear' mkfs.jffs2 version 1.2 according to the source
file.

This one seems to build a JFFS2 file system that I can boot and access
with no problems.  I fixed problems getting it to build / link with 
the latest zlib version.

The one issue I see with this build is that even though I have specified
a devices file and I can see the device nodes when running jffs2dump on
the created image file, when I mount the file system from Flash the /dev
directory is empty!  

The only thing that spit out during the creation of the file system was
a message about /dev not having a parent directory so it was being 
skipped. But the /dev directory (and the node files from the devices.txt
 file WERE in the resulting image file as mentioned above).

It's probably something that I'm missing on the command line or in the 
file (but I just copied and tweaked the example from the util 
directory).

The other snapshot that I'm working with is the one from 04/30/2004. 
The mkfs.jffs2 version from source code is 1.40.

So far I haven't been able to create a JFFS2 file system that I can boot
 or mount with mkfs.jffs2 built from this snapshot.

Also, mkfs.jffs2 from this snapshot also whines about the /dev directory
not having a parent when building the image.  And the final difference
 is that the created image is nearly twice the size of that built with
 the mkfs.jffs2 from the older snapshot.

I'm using the same current zlib library in both cases, and tweaked the
 source so that it will build/link with zlib.

I suspect that part of the issue with the latest snapshot build may be
 that I'm still running with the older JFFS2 support that is part of the
 2.4.25 Kernel.

My questions:
1) Is there a note somewhere that I've missed saying what snapshots are
reasonably stable so that I know which one to work with for a 
semi-production release?

2) Has anyone else had a similar issue with the 04/30/2004 snapshot as 
far as the created image not mounting and being much larger than that 
created with older snapshots?

I've looked back through the archives and so far have not been able to 
locate anything related to the latest snapshot as applies to what I'm 
seeing.

Thanks,
Burt

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

* Mkfs.jffs2 question
@ 2004-06-03 19:04 Carlos, John J USAATC
  0 siblings, 0 replies; 8+ messages in thread
From: Carlos, John J USAATC @ 2004-06-03 19:04 UTC (permalink / raw)
  To: linux-mtd

Can mkfs.jffs2 run on a host build the jffs2 for the target "ie: the targets
nfs file system"  or must it run on the target and the target must build the
jffs2 file system using the current nfs mount?

Thanks
John

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

* mkfs.jffs2 question
@ 2008-05-07 18:54 Manu Rao
  2008-05-07 19:12 ` Ricard Wanderlof
  0 siblings, 1 reply; 8+ messages in thread
From: Manu Rao @ 2008-05-07 18:54 UTC (permalink / raw)
  To: linux-mtd

Trivial question - Does the pagesize option in mkfs.jffs2 refer to the
NAND hardware page size, or the jffs2 page size?
Thanks
Manu

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

* Re: mkfs.jffs2 question
  2008-05-07 18:54 Manu Rao
@ 2008-05-07 19:12 ` Ricard Wanderlof
  0 siblings, 0 replies; 8+ messages in thread
From: Ricard Wanderlof @ 2008-05-07 19:12 UTC (permalink / raw)
  To: Manu Rao; +Cc: linux-mtd@lists.infradead.org


On Wed, 7 May 2008, Manu Rao wrote:

> Trivial question - Does the pagesize option in mkfs.jffs2 refer to the
> NAND hardware page size, or the jffs2 page size?

I believe it is actually supposed to be the (target) system page size = 
PAGE_SIZE, i.e. 4 KiB for most systems.

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

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

end of thread, other threads:[~2008-05-07 19:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-07  1:49 mkfs.jffs2 question Burt Bicksler
  -- strict thread matches above, loose matches on Subject: below --
2008-05-07 18:54 Manu Rao
2008-05-07 19:12 ` Ricard Wanderlof
2004-06-03 19:04 Mkfs.jffs2 question Carlos, John J USAATC
2002-03-03  0:52 mkfs.jffs2 question Ray Lehtiniemi
2002-03-03  2:20 ` Ray Lehtiniemi
2002-03-03 10:07 ` David Woodhouse
2002-03-03 10:42   ` Ray Lehtiniemi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox