This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
guidance for JFFS2 implementation
- From: "Vijay Padiyar" <vijay_padiyar at hotmail dot com>
- To: "eCos Support" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 6 Oct 2004 12:46:55 +0530
- Subject: [ECOS] guidance for JFFS2 implementation
Hi all
We are trying to implement the JFFS2 filesystem on our board, which is based
on the MPC8260. We have ported the Rattler target in eCos to our board and
have obtained the RedBoot prompt and subsequently the 'Hello, eCos World!'
message by running the application image.
Now we wish to implement the JFFS2 filesystem. Since we couldn't find
appropriate guidance on how to implement JFFS2 on a board, we are seeking
help here.
We built the application library with the JFFS2 package (CYGPKG_FS_JFFS2)
and 'net' template in eCos. Then we built the tests and ran the 'fileio1'
test (tests/fs/jffs2/current/tests/), but it failed and gave the following
output (snippets):
-------------------------------------------------------------------------
<4>Empty flash at 0x0000069c ends at 0x00020000
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000:
0xdaff
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004:
0xdfff
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008:
0xeeff
instead
..
..
<5>Further such events for this erase block will not be printed
<4>Empty flash at 0x0002002c ends at 0x00020030
<4>Empty flash at 0x0002009c ends at 0x000200a0
<4>Empty flash at 0x000200c4 ends at 0x000200c8
..
..
<4>Write clean marker to block at 0x00080000 failed: -5
<4>Write clean marker to block at 0x00040000 failed: -5
<4>Write clean marker to block at 0x000c0000 failed: -5
<INFO>: reading directory /
<INFO>: entry . [mode 016f0001 ino 00000001 nlink 1 size 0]
<INFO>: entry .. [mode 016f0001 ino 00000001 nlink 1 size 0]
<INFO>: entry a<3>Eep. Unknown node type 0080 at 00000038 was
marke
d REF_UNCHECKED
<3>Node header CRC failed at 00000038. But it must have been OK earlier.
<3>Node was: { 0080, 2080, 00800080, 00800080 }
<4>Node totlen on flash (0x00800080) != totlen from node ref (0x00000044)
<4>jffs2_do_read_inode(): No data nodes found for ino #2
jffs2_read_inode() failed
BUG() at
/ecos-c/cygwin/opt/ecos/ecosnew/packages/fs/jffs2/current/src/fs-ecos.c
1793
[mode 003c200f ino 80008000 nlink 64 size 76562688]
<INFO>: entry b<3>Eep. Unknown node type 0080 at 000000a8 was
marke
d REF_UNCHECKED
<3>Node header CRC failed at 000000a8. But it must have been OK earlier.
<3>Node was: { 0080, 2080, 00800080, 00800080 }
<4>Node totlen on flash (0x00800080) != totlen from node ref (0x00000044)
<4>jffs2_do_read_inode(): No data nodes found for ino #3
jffs2_read_inode() failed
[mode 003c200f ino 80008000 nlink 64 size 76562688]
<INFO>: entry c<3>Eep. Unknown node type 0080 at 00000118 was
marke
d REF_UNCHECKED
<3>Node header CRC failed at 00000118. But it must have been OK earlier.
<3>Node was: { 0080, 2080, 00800080, 00800080 }
<4>Node totlen on flash (0x00800080) != totlen from node ref (0x00000044)
<4>jffs2_do_read_inode(): No data nodes found for ino #4
jffs2_read_inode() failed
BUG() at
/ecos-c/cygwin/opt/ecos/ecosnew/packages/fs/jffs2/current/src/fs-ecos.c
1793
..
..
<INFO>: create file /foo size 202
<FAIL>: open() returned -1 Unknown error
<FAIL>: write() returned -1 Bad file handle
<FAIL>: write() returned -1 Bad file handle
..
..
-------------------------------------------------------------------------
If you could just explain to us quickly the procedure for implementation of
JFFS2 filesystem, it would be really great for us students. Specifically:
1. Should we include the JFFS2 package in RedBoot or application library?
2. What files should we use the 'mkfs.jffs2' utility with? Application
library folder or RedBoot files folder?
3. Do we have to specify anywhere the absolute location of our Flash memory
specially for JFFS2? Or does it take it from the memory layout files
(packages/hal/powerpc/rattler/current/include/pkgconf/)?
This is also because, when we build RedBoot without the JFFS2 package, it
allows us to download the application image at location 0x00040000 in RAM.
load -v fileio1.srec
But with JFFS2 support in RedBoot, we get an error like:
load -v fileio1.srec
*** Abort! Attempt to load S-record to address: 0x00040000 which is not in
RAM
So is there some conflict between RAM and Flash address range created due to
improper Flash area definition for JFFS2?
4. Should we select 'Static configuration' or 'Configuration from FIS' for
'Instantiate I/O block device API' option under 'Flash device drivers'?
5. Can you just describe the general procedure and steps to follow?
Regards
Chandrashekhar Padiyar
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss