[ECOS] JFFS2 Issue.
Ramgopal Kota
rkota@broadcom.com
Wed Sep 23 12:37:00 GMT 2009
Can some body help me ? I am worried as it may lead so many other issues in future ..
Please let me know what could be reasons for this kind of behavior ??
Thanks & Regards,
Ramgopal Kota
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Ramgopal Kota
Sent: Tuesday, September 22, 2009 10:33 PM
To: eCos Discussion
Subject: [ECOS] JFFS2 Issue.
Hi,
I am integrating JFFS2 into our MIPS Malta board. I am seeing a strange issue.
In JFFS2 erase.c file and function jffs2_mark_erased_block , code section as below
struct jffs2_unknown_node marker = {
.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
.totlen = cpu_to_je32(c->cleanmarker_size)
};
struct jffs2_unknown_node
{
/* All start like this */
jint16_t magic;
jint16_t nodetype;
jint32_t totlen; /* So we can skip over nodes we don't grok */
jint32_t hdr_crc;
} __attribute__((packed));
I am seeing that both .magic and .nodetype are filled with 0x2003 which is the value of JFFS2_NODETYPE_CLEANMARKER.
If I change the code to the following it is working fine...
struct jffs2_unknown_node marker = {
.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
.totlen = cpu_to_je32(c->cleanmarker_size)
};
marker.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
I don't know if it is CFLAGS issue or Compiler issue.I am thinking it is a compiler optimisation re-ordering issue.I am using -Os flag.
Compiler I am using is gcc version 3.2.1 (eCosCentric)
Thanks & Regards,
Ramgopal Kota
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list