* [ECOS] Building JFFS2 on net template fails
@ 2007-01-29 21:47 David Luca
2007-01-29 21:52 ` Andrew Lunn
2007-01-29 22:05 ` Andrew Lunn
0 siblings, 2 replies; 6+ messages in thread
From: David Luca @ 2007-01-29 21:47 UTC (permalink / raw)
To: ecos-discuss
Hello again, kindly request for help for the following error messages when compiling JFFS2 using
net template. I added the Linux compatibility, CRC support, JFFS2, Generic Flash support packages
and the flash driver (Strata). Any help is appreciated, best regards,
David Luca.
arm-elf-gcc -c -I/ecos-c/PROJECTS/eCos/MC9328_install/include
-I/opt/ecos/ecos-3.0/packages/fs/jffs2/current -I/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src
-I/opt/ecos/ecos-3.0/packages/fs/jffs2/current/tests -I.
-I/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/ -finline-limit=7000 -mcpu=arm9 -Wall
-Wpointer-arith -Wstrict-prototypes -Winline -Wundef -g -O2 -ffunction-sections -fdata-sections
-fno-exceptions -D__ECOS -nostdinc -iwithprefix include -Wp,-MD,src/compr.tmp -o
src/fs_jffs2_compr.o /opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/compr.c
In file included from /ecos-c/PROJECTS/eCos/MC9328_install/include/sys/types.h:112,
from /ecos-c/PROJECTS/eCos/MC9328_install/include/sys/stat.h:69,
from /ecos-c/PROJECTS/eCos/MC9328_install/include/linux/stat.h:5,
from /ecos-c/PROJECTS/eCos/MC9328_install/include/linux/fs.h:4,
from /opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/compr.h:24,
from /opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/compr.c:16:
/ecos-c/PROJECTS/eCos/MC9328_install/include/sys/bsdtypes.h:32: error: redefinition of typedef
'cyg_int8'
/ecos-c/PROJECTS/eCos/MC9328_install/include/cyg/infra/cyg_type.h:203: error: previous declaration
of 'cyg_int8' was here
/ecos-c/PROJECTS/eCos/MC9328_install/include/sys/bsdtypes.h:35: error: redefinition of typedef
'cyg_int16'
/ecos-c/PROJECTS/eCos/MC9328_install/include/cyg/infra/cyg_type.h:206: error: previous declaration
of 'cyg_int16' was here
/ecos-c/PROJECTS/eCos/MC9328_install/include/sys/bsdtypes.h:38: error: conflicting types for
'cyg_int32'
/ecos-c/PROJECTS/eCos/MC9328_install/include/cyg/infra/cyg_type.h:209: error: previous declaration
of 'cyg_int32' was here
make[1]: Leaving directory `/ecos-c/PROJECTS/eCos/MC9328_build/fs/jffs2/current'
In file included from /opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/nodelist.h:392,
make: Leaving directory `/ecos-c/PROJECTS/eCos/MC9328_build'
from /opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/compr.h:28,
from /opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/compr.c:16:
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h: In function
'jffs2_dbg_acct_sanity_check_nolock':
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:245: warning: format '%08x' expects type
'unsigned int', but argument 3 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:246: warning: format '%#08x' expects type
'unsigned int', but argument 3 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:246: warning: format '%#08x' expects type
'unsigned int', but argument 4 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:246: warning: format '%#08x' expects type
'unsigned int', but argument 5 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:246: warning: format '%#08x' expects type
'unsigned int', but argument 6 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:246: warning: format '%#08x' expects type
'unsigned int', but argument 7 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:246: warning: format '%#08x' expects type
'unsigned int', but argument 8 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 3 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 4 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 5 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 6 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 7 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 8 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 9 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/debug.h:255: warning: format '%#08x' expects type
'unsigned int', but argument 10 has type 'uint32_t'
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/compr.c: In function 'jffs2_compress':
/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src/compr.c:114: warning: format '%d' expects type
'int', but argument 2 has type 'uint32_t'
make[1]: *** [src/compr.o.d] Error 1
make: *** [build] Error 2
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] Building JFFS2 on net template fails
2007-01-29 21:47 [ECOS] Building JFFS2 on net template fails David Luca
@ 2007-01-29 21:52 ` Andrew Lunn
2007-01-29 22:05 ` Andrew Lunn
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2007-01-29 21:52 UTC (permalink / raw)
To: David Luca; +Cc: ecos-discuss
On Mon, Jan 29, 2007 at 01:47:15PM -0800, David Luca wrote:
> Hello again, kindly request for help for the following error messages when compiling JFFS2 using
> net template. I added the Linux compatibility, CRC support, JFFS2, Generic Flash support packages
> and the flash driver (Strata). Any help is appreciated, best regards,
> David Luca.
>
>
> arm-elf-gcc -c -I/ecos-c/PROJECTS/eCos/MC9328_install/include
> -I/opt/ecos/ecos-3.0/packages/fs/jffs2/current -I/opt/ecos/ecos-3.0/packages/fs/jffs2/current/src
Version 3.0?
Could i borrow your time machine please?
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] Building JFFS2 on net template fails
2007-01-29 21:47 [ECOS] Building JFFS2 on net template fails David Luca
2007-01-29 21:52 ` Andrew Lunn
@ 2007-01-29 22:05 ` Andrew Lunn
2007-01-30 17:45 ` David Luca
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2007-01-29 22:05 UTC (permalink / raw)
To: David Luca; +Cc: ecos-discuss
[-- Attachment #1: Type: text/plain, Size: 465 bytes --]
On Mon, Jan 29, 2007 at 01:47:15PM -0800, David Luca wrote:
> Hello again, kindly request for help for the following error messages when compiling JFFS2 using
> net template. I added the Linux compatibility, CRC support, JFFS2, Generic Flash support packages
> and the flash driver (Strata). Any help is appreciated, best regards,
> David Luca.
>
It is a bit of a hack, but please try this.
I guess the proper way to clean this up is to use <stdint.h>
Andrew
[-- Attachment #2: int8_t.diff --]
[-- Type: text/x-diff, Size: 655 bytes --]
Index: packages/net/bsd_tcpip/current/include/sys/bsdtypes.h
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/include/sys/bsdtypes.h,v
retrieving revision 1.2
diff -u -r1.2 bsdtypes.h
--- packages/net/bsd_tcpip/current/include/sys/bsdtypes.h 4 Feb 2003 22:55:26 -0000 1.2
+++ packages/net/bsd_tcpip/current/include/sys/bsdtypes.h 29 Jan 2007 22:04:51 -0000
@@ -29,6 +29,10 @@
#undef uint8_t
#undef uint16_t
#undef uint32_t
+#undef int8_t
+#undef int16_t
+#undef int32_t
+
typedef __signed char int8_t;
typedef unsigned char u_int8_t;
typedef unsigned char uint8_t;
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] Building JFFS2 on net template fails
2007-01-29 22:05 ` Andrew Lunn
@ 2007-01-30 17:45 ` David Luca
2007-01-30 19:14 ` Andrew Lunn
0 siblings, 1 reply; 6+ messages in thread
From: David Luca @ 2007-01-30 17:45 UTC (permalink / raw)
To: Andrew Lunn, ecos-discuss
No time machine, I just put in ecos-3.0 folder anything new from the cvs for testing purposes only
:)
Thank you for your hack, it works. But I don't understand why these types are redefined. Where
should I include <stdint.h> since I don't want to change the package files (like BSD), only
platform files?
David.
--- Andrew Lunn <andrew@lunn.ch> wrote:
> On Mon, Jan 29, 2007 at 01:47:15PM -0800, David Luca wrote:
> > Hello again, kindly request for help for the following error messages when compiling JFFS2
> using
> > net template. I added the Linux compatibility, CRC support, JFFS2, Generic Flash support
> packages
> > and the flash driver (Strata). Any help is appreciated, best regards,
> > David Luca.
> >
>
> It is a bit of a hack, but please try this.
>
> I guess the proper way to clean this up is to use <stdint.h>
>
> Andrew
> > Index: packages/net/bsd_tcpip/current/include/sys/bsdtypes.h
> ===================================================================
> RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/include/sys/bsdtypes.h,v
> retrieving revision 1.2
> diff -u -r1.2 bsdtypes.h
> --- packages/net/bsd_tcpip/current/include/sys/bsdtypes.h 4 Feb 2003 22:55:26 -0000 1.2
> +++ packages/net/bsd_tcpip/current/include/sys/bsdtypes.h 29 Jan 2007 22:04:51 -0000
> @@ -29,6 +29,10 @@
> #undef uint8_t
> #undef uint16_t
> #undef uint32_t
> +#undef int8_t
> +#undef int16_t
> +#undef int32_t
> +
> typedef __signed char int8_t;
> typedef unsigned char u_int8_t;
> typedef unsigned char uint8_t;
>
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] Building JFFS2 on net template fails
2007-01-30 17:45 ` David Luca
@ 2007-01-30 19:14 ` Andrew Lunn
2007-02-01 1:40 ` wang cui
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2007-01-30 19:14 UTC (permalink / raw)
To: David Luca; +Cc: Andrew Lunn, ecos-discuss
On Tue, Jan 30, 2007 at 09:45:30AM -0800, David Luca wrote:
> No time machine, I just put in ecos-3.0 folder anything new from the cvs for testing purposes only
> :)
> Thank you for your hack, it works. But I don't understand why these types are redefined. Where
> should I include <stdint.h> since I don't want to change the package files (like BSD), only
> platform files?
> David.
The problem is in
packages/compact/linux/current/include/linux/types.h
It has
#define uint8_t cyg_uint8
#define uint16_t cyg_uint16
#define uint32_t cyg_uint32
#define int8_t cyg_int8
#define int16_t cyg_int16
#define int32_t cyg_int32
So when bsdtypes.h is included afterward, which has....
typedef __signed char int8_t;
typedef short int16_t;
etc, the int8_t gets replaced with cyg_int8 and you end up with
redefining the type.
The #defines need replacing with something better.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] Building JFFS2 on net template fails
2007-01-30 19:14 ` Andrew Lunn
@ 2007-02-01 1:40 ` wang cui
0 siblings, 0 replies; 6+ messages in thread
From: wang cui @ 2007-02-01 1:40 UTC (permalink / raw)
To: andrew, davidluca3000; +Cc: ecos-discuss
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312; format=flowed, Size: 2137 bytes --]
I faced same problem before, and I solved it by modify the
CYGPKG_FS_JFFS2_CFLAGS_ADD option like below.
- default_value { "-D__ECOS -nostdinc -iwithprefix include" }
+ default_value { (CYGPKG_POSIX ? "-D_POSIX_SOURCE " : "") . "-D__ECOS
-nostdinc -iwithprefix include" }
I have committed a patch servals days ago:
http://sourceware.org/ml/ecos-patches/2007-01/msg00070.html
That patch also fixed other spelling mistake and compiling warnings in
JFFS2 package.
>From: Andrew Lunn <andrew@lunn.ch>
>To: David Luca <davidluca3000@yahoo.com>
>CC: Andrew Lunn <andrew@lunn.ch>, ecos-discuss
<ecos-discuss@sourceware.org>
>Subject: Re: [ECOS] Building JFFS2 on net template fails
>Date: Tue, 30 Jan 2007 20:13:30 +0100
>
>On Tue, Jan 30, 2007 at 09:45:30AM -0800, David Luca wrote:
> > No time machine, I just put in ecos-3.0 folder anything new from the
cvs for testing purposes only
> > :)
> > Thank you for your hack, it works. But I don't understand why these
types are redefined. Where
> > should I include <stdint.h> since I don't want to change the package
files (like BSD), only
> > platform files?
> > David.
>
>The problem is in
>
>packages/compact/linux/current/include/linux/types.h
>
>It has
>
>#define uint8_t cyg_uint8
>#define uint16_t cyg_uint16
>#define uint32_t cyg_uint32
>
>#define int8_t cyg_int8
>#define int16_t cyg_int16
>#define int32_t cyg_int32
>
>So when bsdtypes.h is included afterward, which has....
>
>typedef __signed char int8_t;
>typedef short int16_t;
>
>etc, the int8_t gets replaced with cyg_int8 and you end up with
>redefining the type.
>
>The #defines need replacing with something better.
>
> Andrew
>
>--
>Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-02-01 1:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-29 21:47 [ECOS] Building JFFS2 on net template fails David Luca
2007-01-29 21:52 ` Andrew Lunn
2007-01-29 22:05 ` Andrew Lunn
2007-01-30 17:45 ` David Luca
2007-01-30 19:14 ` Andrew Lunn
2007-02-01 1:40 ` wang cui
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).