Discussion:
JFFS2 for multi-partition Flash
Fadi Nasser
2004-12-21 17:51:58 UTC
Permalink
Hello all,
I apologize I advance for my long email but I'll try to state
The few questions that I have in a detailed fashion. My flash
(sect_size=0x20000, ***@0xFE000000) looks like this:
physmap_partitions
0x00000->0x20000 PPC hardware reset word
0x20000->0x1F00000 Filesystem section
0x1F00000->0x1F40000 U-boot
0x1F40000->0x1F80000 U-boot env

Basically, I only need a portion of Flash to use JFFS2. So I built my
Jffs2.img (padded to 0x1F00000-0x20000=0x1ee0000), burned it in flash.
/proc/mtd shows the proper partitions created (in proc at least).

Question#1
I get my jffs2.img filessize = 0x100000 (1MB) even though I'm padding to
0x1ee0000. Is this because of internal compression?

Problem#1
When linux comes up, I "mknod /dev/mtdblock1 b 31 0". If I try to "mount
-t jffs2 /dev/mtdblock1 /mnt", I see the jffs2_do_mount_fs call scanning
For the magic keys (0x1985) at offset 0x0 (where I don't have a JFFS
Image burned). How can I get the scan_medium and mount_fs files to start
at the proper offset!?

Problem#2
Even after hardcoding the offsets in the jffs2_do_fill_super call,
after the scan_medium is happy for the first 0x100000 bytes, I
start to see the msgs (0x1985 not found at 0x00100a18: xyz instead).
Jffs2_scan_eraseblock() scans every 4bytes & keeps complaining about n
ot finding the magic key (0x1985). I figured this is because my
img size is 0x100000 even though I padded it to 0x1ee0000. What am I
missing here?

Thank you so much for any pointers that you may offer.

-----Original Message-----
From: owner-jffs-***@axis.com [mailto:owner-jffs-***@axis.com] On Behalf
Of David Woodhouse
Sent: Tuesday, December 21, 2004 3:39 AM
To: Pedro Aguilar
Cc: jffs-***@axis.com; linux-***@lists.infradead.org
Subject: Re: Kernel freezing when booting with jffs2
The problem is that when mounting the jffs2 filesystem it says
read-only
(I'm not giving it any read-only flag in the MTD partition) and then
shows
the msg 'Warning: unable to open an initial console'
Is there a /dev/console node in your file system? Mounting read-only is
normal -- add 'rw' on the command line if you don't want it read-only.
--
dwmw2


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to ***@axis.com
David Woodhouse
2004-12-21 18:18:55 UTC
Permalink
Post by Fadi Nasser
"mknod /dev/mtdblock1 b 31 0"
Don't. /dev/mtdblock1 should have minor number 1. The offset which JFFS2
sees is the offset within the _partition_ not on the raw device.
--
dwmw2
Fadi Nasser
2004-12-21 18:38:55 UTC
Permalink
FYI,
I just found out the problem with the padding. If I use the mkfs.jffs2
Tools I downloaded from some site with the -p 0x1ee0000 option, I still
Get the 0x100000 total size. Using explicitly --pad=0x1ee0000, I get
The desired size. Something to do with (argv[i] == 'p') not being
Interpreted properly I guess.

-----Original Message-----
From: David Woodhouse [mailto:***@infradead.org]
Sent: Tuesday, December 21, 2004 10:19 AM
To: Fadi Nasser
Cc: Pedro Aguilar; jffs-***@axis.com; linux-***@lists.infradead.org
Subject: Re: JFFS2 for multi-partition Flash
Post by Fadi Nasser
"mknod /dev/mtdblock1 b 31 0"
Don't. /dev/mtdblock1 should have minor number 1. The offset which JFFS2
sees is the offset within the _partition_ not on the raw device.
--
dwmw2



To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to ***@axis.com
Loading...