This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: guidance for JFFS2 implementation


On Wed, Oct 06, 2004 at 12:46:55PM +0530, Vijay Padiyar wrote:
> 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

This looks more serious than the warnings above. It looks like writing
is failing. I would put some debug prints in flash_program to find out
why. It could be as simple as the flash blocks are locked and you need
to unlock them.

> 1. Should we include the JFFS2 package in RedBoot or application library?

What needs to access the jffs2 filesystem? If redboot needs access
then obviously redboot needs to contain jffs2. If only the application
needs access to the filesystem then only the application needs it.
 
> 2. What files should we use the 'mkfs.jffs2' utility with? Application
> library folder or RedBoot files folder?

First start with the test image, fs/jffs2/current/support/jffs2/jffs2.img. 
This is a little endian image. Is the MPC8260 little endian? 

 
> 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/)?

Take a look at the configuration options CYG???_IO_FLASH_BLOCK_*

> 4. Should we select 'Static configuration' or 'Configuration from FIS' for
> 'Instantiate I/O block device API' option under 'Flash device drivers'?

That is upto you. Both ways work. 

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]