This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: JFFS2 file system problem. Thanks a lot.
- From: Bob Koninckx <bob dot koninckx at mech dot kuleuven dot ac dot be>
- To: QiangHuang <jameshq at liverpool dot ac dot uk>
- Cc: Ecos-Discuss <ecos-discuss at sources dot redhat dot com>
- Date: 03 Jun 2003 20:38:27 +0200
- Subject: Re: [ECOS] JFFS2 file system problem. Thanks a lot.
- Organization: KULeuven
- References: <ONEOIJPPOKNBBKJKCGLCGEBHCBAA.jameshq@liv.ac.uk>
On Tue, 2003-06-03 at 12:58, QiangHuang wrote:
> Hi all:
> I have tried to integreate JFFS2 support into my system. but I got some
> problem.
>
> I have installed the accompanied test support file in
> /fs/jffs2/support/jffs2.img by RedBoot into flash memory shown below:
>
> RAM: 0x00000000-0x02000000, 0x00002000-0x01f21000 available
> FLASH: 0x40000000 - 0x40800000, 128 blocks of 0x00010000 bytes each.
> RedBoot> fis list
> Name FLASH addr Mem addr Length Entry point
> RedBoot 0x40000000 0x40000000 0x00020000 0x00000000
> RedBoot config 0x407E0000 0x407E0000 0x00001000 0x00000000
> FIS directory 0x407F0000 0x407F0000 0x00010000 0x00000000
> JFFS2 0x40100000 0x40100000 0x00400000 0x00100000
> web 0x40500000 0x00040000 0x00100000 0x00040000
>
> when starting my application I always got the following message:
There seems to be something wrong with where JFFS2 is (0x40100000) and
where the filesystem thinks it is (0xd78). Are you sure that your
application does not claim all of the virtual vectors and by doing so
overwrites some data that was put there before by redboot?
>
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d78:
> 0xa224
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d7c:
> 0x336c
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d80:
> 0x9a34
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d84:
> 0x0003
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d88:
> 0x3360
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d8c:
> 0x0001
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d90:
> 0x99a8
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d98:
> 0x99a8
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000d9c:
> 0x0001
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000da0:
> 0x0001
> instead
> <5>Further such events for this erase block will not be printed
> <4>Empty flash at 0x00003db8 ends at 0x00003dbc
> <4>Empty flash at 0x00003ddc ends at 0x00003de4
> <4>Empty flash at 0x00003df8 ends at 0x00003dfc
> <4>Empty flash at 0x00003e10 ends at 0x00003e14
> <4>Empty flash at 0x00003e28 ends at 0x00003e2c
> <4>Empty flash at 0x00003e40 ends at 0x00003e44
> <4>Empty flash at 0x00003e58 ends at 0x00003e5c
> <4>Empty flash at 0x00003e70 ends at 0x00003e74
> <4>Empty flash at 0x00003e88 ends at 0x00003e8c
> <4>Empty flash at 0x00003ea0 ends at 0x00003ea4
> <4>Empty flash at 0x00003eb8 ends at 0x00003ebc
> <4>Empty flash at 0x00003ed0 ends at 0x00003ed4
> <4>Empty flash at 0x00003ee8 ends at 0x00003eec
> <4>Empty flash at 0x00003f00 ends at 0x00003f04
> <4>Empty flash at 0x00004030 ends at 0x00004034
> <4>Empty flash at 0x000043bc ends at 0x000043c0
> <4>Empty flash at 0x00004650 ends at 0x00004654
> <4>Empty flash at 0x00004670 ends at 0x00004674
> <4>Empty flash at 0x000046e8 ends at 0x00004d38
> <4>Empty flash at 0x00005278 ends at 0x0000527c
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000:
> 0x2003
> instead
> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004:
> 0x000c
> instead
> ....
> ...
> ..
>
> how can I set the magic bitmask? or do I need to?
It should be there if you build the filesystem using mkfs.jffs2
>
> also when running my program it works properly for some time and fail .
> Failure comes out randomly. In my program user can instruct the program to
> create file, delete file and read content of the file. sometime it works
> fine(delete, write and read) for sometime but sometime it fail with some
> error message as:
>
> when doing a delete sometime get the following errors:
Again, I'd start checking these addresses as they seem not to correspond
to what your FIS directory tells.
>
> <5>Write of %zd bytes at 0x0000002b failed. returned 114116, retlen %z d
> <INFO>: reading directory /flash
> <4>Write error in obliterating obsoleted node at 0x00018b28: 1
> <4>Write error in obliterating obsoleted node at 0x00018a80: 1
> <4>Write error in obliterating obsoleted node at 0x000189d8: 1
>
> when doing a file create sometime get the following errors:
>
> <INFO>: create file aac size 200
> <5>Write of %zd bytes at 0x00000044 failed. returned 115100, retlen %z d
> <5>Write of %zd bytes at 0x0000002b failed. returned 115168, retlen %z d
> <5>Write of %zd bytes at 0x000000a8 failed. returned 115212, retlen %z d
>
> why the address attempt to write to is 0x00000044, 0x0000002b, 0x000000a8
> , but the flash memory is located from 0x40000000?? so what's going on here?
> Thanks a lot.
That seems to me to be the whole problem. Check what your application
does with the virtual vector table. That is the mechanism to pass data
from redboot to the application. But if this latter claims the whole
table, it will initialize everything, overwriting redboot data in the
process.
>
> Any help will be appreciated. Thank you.
You're wellcome. That is if you stop mailing me off-list.
Bob
>
> qiang huang
--
----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering, tel. +32 16 322535
Machine Design and Automation fax. +32 16 322987
Celestijnenlaan 300B bob.koninckx@mech.kuleuven.ac.be
B-3001 Leuven Belgium http://www.mech.kuleuven.ac.be/pma
----------------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss