This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001157] New: Addition of JFFS2 flash test offset and lengthoptions to cdl
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: unassigned at bugs dot ecos dot sourceware dot org
- Date: Thu, 17 Feb 2011 22:04:30 +0000
- Subject: [Bug 1001157] New: Addition of JFFS2 flash test offset and lengthoptions to cdl
- Auto-submitted: auto-generated
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001157
Summary: Addition of JFFS2 flash test offset and length options
to cdl
Product: eCos
Version: CVS
Platform: All
OS/Version: HostOS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: low
Component: Patches and contributions
AssignedTo: unassigned@bugs.ecos.sourceware.org
ReportedBy: mbergandi@gmail.com
CC: ecos-patches@ecos.sourceware.org
Class: Advice Request
Created an attachment (id=1136)
--> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1136)
eCos ecm to enable JFFS2 and patch file
HOST: Ubuntu 10.04.1 LTS
TARGET: Linux Synthetic Target
The jffs2 tests attempt to mount JFFS2_TEST_DEV at "/". JFFS2_TEST_DEV is
defined as in fs/jffs2/current/tests/jffs2_1.c as:
# define JFFS2_TEST_DEV "/dev/flash/0/"
stringify(CYGNUM_FS_JFFS2_TEST_OFFSET) ","
stringify(CYGNUM_FS_JFFS2_TEST_LENGTH)
That define literally evaluates to:
JFFS2_TEST_DEV="/dev/flash/0/CYGNUM_FS_JFFS2_TEST_OFFSET,CYGNUM_FS_JFFS2_TEST_LENGTH"
I verified it in gdb. CYGNUM_FS_JFFS2_TEST_OFFSET and
CYGNUM_FS_JFFS2_TEST_LENGTH are not defined _anywhere_ in the ecos
tree. Since the image gets mounted successfully in the test, I assume
that the offset and length are just ignored if they aren't numbers.
A suggestion was made to add these missing defines to the jffs2.cdl. I have
attached a patch to just that. There is also a minimal config to turn on jffs2
and its requirements. They are in the attached jffs2test.tar.gz.
The default jffs2 config sets a block size of 64KB, 15 main blocks, and one
boot block. The total size of the synthv2.flash image that the tests create is
1MB. Based on these sizes, I set the default for CYGNUM_FS_JFFS2_TEST_OFFSET to
be 0x1000 (64KB: skip the boot block) and CYGNUM_FS_JFFS2_TEST_LENGTH to
0x0F0000 (1MB - 64KB). If my understanding is correct, the length is measured
from the offset. The result would be that JFFS2_TEST_DEV will be sensible:
JFFS2_TEST_DEV="/dev/flash/0/0x1000,0x0F0000"
I ran all the jffs2 tests successfully on the synthetic target with boot blocks
enabled and disabled.
Mike
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.