[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 12:01:00 GMT 2003
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.
How can I check whether the flash memory is ready for JFFS2 if setting
needed to be done by RedBoot?
(Step1) when I do a "board reset":
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
RAM: 0x00000000-0x02000000, 0x00002000-0x01f21000 available
FLASH: 0x40000000 - 0x40800000, 128 blocks of 0x00010000 bytes each.
(Step2) and "fis list":
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
(Step3) then I do a "fis init -f"
RedBoot> fis init -f
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0x40020000-0x407e0000:
..........................................
............................................................................
....
..
... Erase from 0x407f0000-0x407f0000:
... Erase from 0x40800000-0x40800000:
... Unlock from 0x407f0000-0x40800000: .
... Erase from 0x407f0000-0x40800000: .
... Program from 0x01f2f000-0x01f3f000 at 0x407f0000: .
... Lock from 0x407f0000-0x40800000: .
(Step4) then I do a "fis init"
RedBoot> fis init
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
Warning: device contents not erased, some blocks may not be usable
... Unlock from 0x407f0000-0x40800000: .
... Erase from 0x407f0000-0x40800000: .
... Program from 0x01f2f000-0x01f3f000 at 0x407f0000: .
... Lock from 0x407f0000-0x40800000: .
(Step5) the I do a "fis free"
RedBoot> fis free
0x40020000 .. 0x407E0000
(Step6) load and run the program
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).
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
<4>Write clean marker to block at 0x000a0000 failed: 1
<4>Write clean marker to block at 0x00090000 failed: 1
<4>Write clean marker to block at 0x00080000 failed: 1
<4>Write clean marker to block at 0x00070000 failed: 1
<4>Write clean marker to block at 0x00060000 failed: 1
<4>Write clean marker to block at 0x00050000 failed: 1
<4>Write clean marker to block at 0x00040000 failed: 1
<4>Write clean marker to block at 0x00030000 failed: 1
<4>Write clean marker to block at 0x00020000 failed: 1
<4>Write clean marker to block at 0x00010000 failed: 1
<4>Write clean marker to block at 0x00000000 failed: 1
<4>Write clean marker to block at 0x000f0000 failed: 1
2. when runs to listdir( "/", true, -1, &existingdirents );
<INFO>: reading directory /
<INFO>: entry . [mode 00016f01 ino 00144c08 nlink 1 size 0]
<INFO>: entry .. [mode 00016f01 ino 00144c08 nlink 1 size 0]
3. when runs to createfile()
<FAIL>: write() returned -1 Bad file handle
<FAIL>: write() returned -1 Bad file handle
<FAIL>: write() returned -1 Bad file handle
<FAIL>: write() returned -1 Bad file handle
<FAIL>: write() returned -1 Bad file handle
.....
...
..
Thank you.
--
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