Skip to contentSkip to conversation

need help regarding u-boot for csb226

U-Boot-Users renjithgopal 4 participants 9 messages Sep 11, 2003 – Sep 13, 2003

lore
Share & tools
lore
#0 lore raw

Hello
I am a beginner
I was trying to compie u-boot for csb226. but it is giving some compiler error.

make[1]: Entering directory `/uboot/lib_generic'
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xa1fe0000 -I/uboot/include -fno-builtin -ffreestanding -nostdinc -isystem include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes -c -o crc32.o crc32.c
as: unrecognized option `-marmv4'
In file included from /uboot/include/common.h:77,

                 from crc32.c:12:

/uboot/include/image.h:148: output pipe has been closed
cpp0: output pipe has been closed
make[1]: *** [crc32.o] Error 1
make[1]: Leaving directory `/uboot/lib_generic'
make: *** [subdirs] Error 1

but when i asked some of my friends they told it should work fine with out any problem.. i am using u-boot 0.4.6
and arm-linux-gcc 2.95.3

i am also attaching the log of compilation ...
please tell me what to do?

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets on Air Sahara Flights at Prices Lower Than Before. Just log on to http://airsahara.indiatimes.com and Bid Now! -------------- next part --------------
A non-text attachment was scrubbed...
Name: ubooterr
Type: application/octet-stream
Size: 14378 bytes
Desc: ubooterr
Url : http://lists.denx.de/pipermail/u-boot/attachments/20030911/a55a3881/attachment.obj

#1 lore raw
Quoted 15 lines · renjithgopal

Hello
I am a beginner
I was trying to compie u-boot for csb226. but it is giving some compiler error.

make[1]: Entering directory `/uboot/lib_generic'
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xa1fe0000 -I/uboot/include -fno-builtin -ffreestanding -nostdinc -isystem include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes -c -o crc32.o crc32.c
as: unrecognized option `-marmv4'
In file included from /uboot/include/common.h:77,

                 from crc32.c:12:

/uboot/include/image.h:148: output pipe has been closed
cpp0: output pipe has been closed
make[1]: *** [crc32.o] Error 1
make[1]: Leaving directory `/uboot/lib_generic'
make: *** [subdirs] Error 1

Quoted 6 lines

but when i asked some of my friends they told it should work fine with out any problem.. i am using u-boot 0.4.6
and arm-linux-gcc 2.95.3

i am also attaching the log of compilation ...
please tell me what to do?

You apparently have issues with your cross gcc+binutils installation and/or forgot to set your PATH to point to your tools. I just did the following:

	PATH=${PATH}:/usr/local/arm/2.95.3/bin make distclean
	PATH=${PATH}:/usr/local/arm/2.95.3/bin make csb226_config
	PATH=${PATH}:/usr/local/arm/2.95.3/bin make all

and do not encounter the get the "as: unrecognized option `-marmv4'" error.

However, it looks like someone has recently broken the build since I get this error now with recent CVS (as of today +/- and hour):

make[1]: Entering directory `/Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/drivers/sk98lin'
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xa1fe0000 -I/Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc-lib/i386-redhat-linux/2.96/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes -I. -DSK_USE_CSUM -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xa1fe0000 -I/Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc-lib/i386-redhat-linux/2.96/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=strongarm1100 -c -o skge.o skge.c
In file included from /Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/include/common.h:40,

                  from u-boot_compat.h:30,
                  from h/skdrv1st.h:158,
                  from skge.c:349:

/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h:43: parse error before `__gnuc_va_list' /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h:43: warning: data definition has no type or storage class /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h:110: parse error before `va_list' /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h:110: warning: data definition has no type or storage class In file included from u-boot_compat.h:30,

                  from h/skdrv1st.h:158,
                  from skge.c:349:

/Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/include/common.h:438: parse error before `va_list' /Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/include/common.h:438: warning: function declaration isn't a prototype /Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/include/common.h:468: parse error before va_list' /Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/include/common.h:468: warning: function declaration isn't a prototype skge.c:4732: warning: DumpMsg' defined but not used
skge.c:4818: warning: `DumpLong' defined but not used
make[1]: *** [skge.o] Error 1
make[1]: Leaving directory `/Projects/OSS/cvs.sourceforge.net/u-boot/u-boot/drivers/sk98lin'
make: *** [subdirs] Error 1

Quoted 9 lines

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets on Air Sahara Flights at Prices Lower Than Before. Just log on to http://airsahara.indiatimes.com and Bid Now!

#2 lore raw

Dear George,

Quoted 2 lines · in message <[email protected]> you wrote:

and do not encounter the get the "as: unrecognized option `-marmv4'" error.

Neither do I.

Quoted 2 lines

However, it looks like someone has recently broken the build since I get this error now with recent CVS (as of today +/- and hour):

Ummm ... which tag? This must be an old (temporary) version.

Quoted 2 lines

skge.c:4732: warning: DumpMsg' defined but not used skge.c:4818: warning: DumpLong' defined but not used

Anything in skge.c between lines 345 and 4869 (the end) is wrappen in a #ifdef CONFIG_SK98; if you see this, this must be old code.

Make sure to check out a revent version (i. e. tag U-Boot-0_4_8 or later)

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
...when fits of creativity run strong, more than  one  programmer  or
writer  has  been  known to abandon the desktop for the more spacious
floor.                                             - Fred Brooks, Jr.
#3 lore raw
Quoted 11 lines · Wolfgang Denk

Dear George,

Quoted 1 line · in message <[email protected]> you wrote:

and do not encounter the get the "as: unrecognized option `-marmv4'" error.

Neither do I.

Quoted 5 lines
Quoted 2 lines

However, it looks like someone has recently broken the build since I get this error now with recent CVS (as of today +/- and hour):

Ummm ... which tag? This must be an old (temporary) version.

HEAD

Quoted 11 lines
Quoted 4 lines

skge.c:4732: warning: DumpMsg' defined but not used skge.c:4818: warning: DumpLong' defined but not used

Anything in skge.c between lines 345 and 4869 (the end) is wrappen in a #ifdef CONFIG_SK98; if you see this, this must be old code.

Make sure to check out a revent version (i. e. tag U-Boot-0_4_8 or later)

Ah, sorry, I've been pulling HEAD. My own fault for being on the bleeding edge.

Thanks!

--
Regards,
George

Quoted 5 lines

Best regards,

Wolfgang Denk

#4 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines

Ummm ... which tag? This must be an old (temporary) version.

HEAD

Well, actually HEAD is clean. At least _my_ head :-)

Quoted 1 line

Ah, sorry, I've been pulling HEAD. My own fault for being on the bleeding edge.

Sorry, but I think you are actually running an _old_ (temporary) version [I checked this in to document the changes made to the driver when porting it to Linux]. The problem is that anonymous CVS is some 24...48 hours delayed because it's run from a backup server. Please try out:

-> cvs log drivers/sk98lin/skge.c
Warning: Remote host denied X11 forwarding.

RCS file: /cvsroot/u-boot/u-boot/drivers/sk98lin/skge.c,v Working file: drivers/sk98lin/skge.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:

        LABEL_2003_09_12_1745: 1.2
        LABEL_2003_09_12_0110: 1.2
        U-Boot-0_4_8: 1.2
        LABEL_2003_09_06_0055: 1.1

keyword substitution: o
...

I guess you see revision 1.1, not 1.2. Right?

Best regards,

Wolfgang Denk

Signature · 8 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"(The  Chief  Programmer)  personally  defines  the  functional   and
performance  specifications, designs the program, codes it, tests it,
and writes its documentation... He  needs  great  talent,  ten  years
experience  and  considerable  systems  and  applications  knowledge,
whether in applied mathematics, business data handling, or whatever."
- Fred P. Brooks, _The Mythical Man Month_
#5 lore raw
Quoted 8 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:
Quoted 1 line

Ummm ... which tag? This must be an old (temporary) version.

HEAD

Well, actually HEAD is clean. At least _my_ head :-)

My head is usually all confused. : P

Quoted 21 lines
Quoted 3 lines

Ah, sorry, I've been pulling HEAD. My own fault for being on the bleeding edge.

Sorry, but I think you are actually running an _old_ (temporary) version [I checked this in to document the changes made to the driver when porting it to Linux]. The problem is that anonymous CVS is some 24...48 hours delayed because it's run from a backup server. Please try out:

-> cvs log drivers/sk98lin/skge.c
Warning: Remote host denied X11 forwarding.

RCS file: /cvsroot/u-boot/u-boot/drivers/sk98lin/skge.c,v Working file: drivers/sk98lin/skge.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:

Quoted 8 lines
        LABEL_2003_09_12_1745: 1.2
        LABEL_2003_09_12_0110: 1.2
        U-Boot-0_4_8: 1.2
        LABEL_2003_09_06_0055: 1.1

keyword substitution: o
...

I guess you see revision 1.1, not 1.2. Right?

Affirmative.

Thanks!

--
Regards,
George

Quoted 5 lines

Best regards,

Wolfgang Denk

#6 lore raw
In reply to renjithgopal
Quoted 2 lines · renjithgopal

arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xa1fe0000 -I/uboot/include -fno-builtin -ffreestanding -nostdinc -isystem include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes -c -o crc32.o crc32.c
as: unrecognized option `-marmv4'

Hmm, here the compile run sets "-march=armv4", not "-marmv4". Did you tweak your makefiles somehow?

Quoted 2 lines

but when i asked some of my friends they told it should work fine with out any problem..

Same here:

robert at himalia:~/local/u-boot-0.4.6> make csb226_config
[...]
robert at himalia:~/local/u-boot-0.4.6> make
[...]
make[1]: Leaving directory
/usr/local/home/robert/u-boot-0.4.6/examples' UNDEF_SYM=arm-linux-objdump -x board/csb226/libcsb226.a cpu/pxa/libpxa.a lib_arm/libarm.a fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a post/libpost.a post/cpu/libcpu.a common/libcommon.a lib_generic/libgeneric.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
arm-linux-ld -Bstatic -T /home/robert/local/u-boot-0.4.6/board/csb226/u-boot.lds -Ttext

0xa1fe0000  $UNDEF_SYM cpu/pxa/start.o \
                --start-group board/csb226/libcsb226.a cpu/pxa/libpxa.a

lib_arm/libarm.a fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a post/libpost.a post/cpu/libcpu.a common/libcommon.a lib_generic/libgeneric.a --end-group \
-Map u-boot.map -o u-boot
arm-linux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec arm-linux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra?e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#7 lore raw
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 2 lines · renjithgopal

arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xa1fe0000 -I/uboot/include -fno-builtin -ffreestanding -nostdinc -isystem include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes -c -o crc32.o crc32.c
as: unrecognized option `-marmv4'

Hmm, here the compile run sets "-march=armv4", not "-marmv4". Did you tweak your makefiles somehow?

In fact all relevant architecture specific config files in U-Boot use "-march=armv4":

-> find * -type f | xargs egrep armv4 cpu/arm720t/config.mk:PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=arm7tdmi cpu/arm920t/config.mk:PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 cpu/sa1100/config.mk:PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100 cpu/arm925t/config.mk:PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 cpu/at91rm9200/config.mk:PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=arm7tdmi cpu/pxa/config.mk:PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100 cpu/arm926ejs/config.mk:PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4

And as you can see, these options are present on the GCC command line above. And it's not GCC, but "as" who is complaining about the unrecognized option. Obviously GCC is passing additional (or bad, or at least incompatible) options to "as".

As I wrote before: this cross toolchain is broken.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"The number  of  Unix  installations  has  grown  to  10,  with  more
expected."    - The Unix Programmer's Manual, 2nd Edition, June, 1972
#8 lore raw
In reply to renjithgopal

Hello,

Quoted 2 lines · in message <[email protected]> you wrote:

I was trying to compie u-boot for csb226. but it is giving some compiler error.

...

Quoted 1 line

as: unrecognized option `-marmv4'

It seems your version of the binutils does not support ARM (or not correctly).

Quoted 1 line

but when i asked some of my friends they told it should work fine with out any problem..

It works fine here.

Quoted 1 line

i am also attaching the log of compilation ...

...

Quoted 8 lines

--=_MAILER_ATTACH_BOUNDARY_200391141717232145174067
Content-Type: application/octet-stream; name="ubooterr"
Content-Transfer-Encoding: BASE64
Content-Description: ubooterr
Content-Disposition: attachment; filename="ubooterr"

W3Jvb3RAUmVuaml0aCB1Ym9vdF0jIG1ha2UgZGlzdGNsZWFuCmZpbmQgLiAtdHlwZSBmIFwKXCgg LW5hbWUgJ2NvcmUnIC1vIC1uYW1lICcqLmJhaycgLW8gLW5hbWUgJyp+JyBcCi1vIC1uYW1lICcq

...

Grrrgh...

Please do not send base 64 encoded messages.

Please send plain text only.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.