[ECOS] Is there any RedBoot related setting needed for using JFFS2 to access Flash memory by ecos RAM application? Thanks a lot.

QiangHuang jameshq@liverpool.ac.uk
Fri May 23 17:08:00 GMT 2003


now I unlock the flash  by using the RedBoot, but I am getting another error
message, any idea? Thanks a lot. (I even tried the following steps:
1. fis init -f
2. fis unlock -f 0x40030000 -l 0x00700000
3. load and run the ecos ram apps by redboot(without resetting the board)


<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008:
0xf018
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c:
0xf018
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010:
0xf018
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018:
0xf018
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c:
0xf018
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024:
0x0414
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028:
0x0438
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000002c:
0x0464
 instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000030:
0x0480
 instead
<5>Further such events for this erase block will not be printed
<5>Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
<5>empty_blocks 15, bad_blocks 0, c->nr_blocks 16
<FAIL>: mount() returned -1 I/O error
<FAIL>: chdir() returned -1 No such entity

What could be wrong?
BTW does the magic bitmask has been set into flash memory before the
application runs? do I need to initialise anything?

Thank you very much.


-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Andrew Lunn
Sent: 23 May 2003 12:26
To: QiangHuang
Cc: Ecos-Discuss
Subject: Re: [ECOS] Is there any RedBoot related setting needed for using
JFFS2 to access Flash memory by ecos RAM application? Thanks a lot.


On Fri, May 23, 2003 at 12:03:08PM +0100, QiangHuang wrote:
> Hi all:
>    Can somebody kindly tell me is there any relation ship between the
> RedBoot and the JFFS2? I want to the ecos application to access the JFFS2,
> do I need to setup something by RedBoot(e.g. unlock, or init?) before the
> ecos application can use JFFS2? (The situation is: I want to build ecos
RAM
> application and loaded by RedBoot, in ecos ram application I use JFFS2 to
> access the flash memory-store/read) Thanks a lot.

The only thing you need to do is make sure they don't both try to use
the same blocks.

> 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

> eCOS configuration setting is:
> FLASH device drivers --> Instantiate in I/O block device API --> Name of
> flash device 1 block device ("dev/flash1") --> Static configuration
> selected --> Start offset from flash base (0x00100000); Length
(0x00100000).

so the jffs is at 0x40100000 to 0x40200000. So, you have no problem
here.

> But when I run the fileio1 test program I got the following errors:
>
> 1. When the program runs to "mount()"
> <4>Write clean marker to block at 0x000e0000 failed: 1
> <4>Write clean marker to block at 0x000d0000 failed: 1
> <4>Write clean marker to block at 0x000c0000 failed: 1
> <4>Write clean marker to block at 0x000b0000 failed: 1

My guess is the blocks of flash are locked. I quickly looked to the
flash block device and it does nothing about unlocking them. You
probably want to write a little program that uses the flash function
flash_unloc() to unlock the blocks. Otherwise your jffs can only read
and not write.

    Andrew

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


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



More information about the Ecos-discuss mailing list