mkfs.jffs2 question
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
Signature · 2 lines
---------------------------------------------------------------------------
Ray Lehtiniemi <[email protected]> <[email protected]>On Sat, Mar 02, 2002 at 05:52:37PM -0700, Ray Lehtiniemi wrote:
sorry to followup my own post:
Quoted 1 line
will only contain /sbin (assuming it's the first dirent in usr)
^
notalso, 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
Signature · 2 lines
---------------------------------------------------------------------------
Ray Lehtiniemi <[email protected]> <[email protected]>Quoted 1 line · [email protected] 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.
Quoted 7 lines
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? :)
Quoted 1 line
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
Quoted 1 line · David Woodhouse
Presumably this is without the -p option? :)
yah :-)
Quoted 8 lines
Quoted 1 line
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
Signature · 2 lines
---------------------------------------------------------------------------
Ray Lehtiniemi <[email protected]> <[email protected]>