public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* [Bug 1001157] New: Addition of JFFS2 flash test offset and length options to cdl
@ 2011-02-17 22:04 bugzilla-daemon
  2011-02-17 22:25 ` [Bug 1001157] " bugzilla-daemon
  2011-02-17 22:26 ` bugzilla-daemon
  0 siblings, 2 replies; 3+ messages in thread
From: bugzilla-daemon @ 2011-02-17 22:04 UTC (permalink / raw)
  To: ecos-patches

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 on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug 1001157] Addition of JFFS2 flash test offset and length options to cdl
  2011-02-17 22:04 [Bug 1001157] New: Addition of JFFS2 flash test offset and length options to cdl bugzilla-daemon
@ 2011-02-17 22:25 ` bugzilla-daemon
  2011-02-17 22:26 ` bugzilla-daemon
  1 sibling, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2011-02-17 22:25 UTC (permalink / raw)
  To: ecos-patches

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001157

Jonathan Larmour <jifl@ecoscentric.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEEDINFO
                 CC|                            |jifl@ecoscentric.com
     Ever Confirmed|0                           |1

--- Comment #1 from Jonathan Larmour <jifl@ecoscentric.com> 2011-02-17 22:25:25 GMT ---
This was a mistake of mine. I updated tests partially based on eCosCentric
sources, but missed the CDL.

The eCosCentric version has some things your version doesn't, so I'm applying
that preferentially (sorry).

Also, while those default values may be appropriate for the synthetic flash,
I'm more concerned about real hardware, where the offset would not nearly be
enough if RedBoot is on the board - it would overwrite chunks of it. It would
be too easy to accidentally brick a board, so I wouldn't want the offset as
small as that.

I'm attaching a patch for that, and committing it. Let me know if there are any
problems.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug 1001157] Addition of JFFS2 flash test offset and length options to cdl
  2011-02-17 22:04 [Bug 1001157] New: Addition of JFFS2 flash test offset and length options to cdl bugzilla-daemon
  2011-02-17 22:25 ` [Bug 1001157] " bugzilla-daemon
@ 2011-02-17 22:26 ` bugzilla-daemon
  1 sibling, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2011-02-17 22:26 UTC (permalink / raw)
  To: ecos-patches

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001157

Jonathan Larmour <jifl@ecoscentric.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1136|0                           |1
        is obsolete|                            |
         AssignedTo|unassigned@bugs.ecos.source |jifl@ecoscentric.com
                   |ware.org                    |

--- Comment #2 from Jonathan Larmour <jifl@ecoscentric.com> 2011-02-17 22:26:29 GMT ---
Created an attachment (id=1137)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1137)
Patch to add missing test options

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-17 22:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 22:04 [Bug 1001157] New: Addition of JFFS2 flash test offset and length options to cdl bugzilla-daemon
2011-02-17 22:25 ` [Bug 1001157] " bugzilla-daemon
2011-02-17 22:26 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).