[U-Boot] Compiling the latest u-boot-2009.06 with Cross-2.95, and errors came out
Detlev Zundel
dzu at denx.de
Mon Jun 29 13:39:53 CEST 2009
Hi Johnson Yu,
> Hi Detlev Z,
>
>
> Thanks for your suggestions, and after I upgraded the toolchain to
> v3.2, those problems went away.
Why did you upgrade only to 3.2? We are currently using gcc-4.2.2. You
are welcome to download ELDK 4.2 for arm[1] and give it a try.
> However, new errors turned up as expected:
You expected new errors? Uh uh, I was hoping for them to go away ;)
> 1) the invocations of U_BOOT_CMD in several .c files,
> common/cmd_bootm.c line 923, common/cmd_source.c line 232,
> common/cmd_ximg.c line 186 terminated the make process for the
> "unterminated argument list invoking macro "U_BOOT_CMD" ", known as
> the "parse error". So, I set the last argument of U_BOOT_CMD marco to
> NULL, and then make went silent.
I don't understand this. include/common.h defines U_BOOT_CMD to take 6
parameters. Your example common/cmd_boot.c also provides 6 parameters:
U_BOOT_CMD(
bootm, CONFIG_SYS_MAXARGS, 1, do_bootm,
"boot application image from memory",
"[addr [arg ...]]\n - boot application image stored in memory\n"
"\tpassing arguments 'arg ...'; when booting a Linux kernel,\n"
...... [more concatenations below this point]
So I count 4 parameters on the first line, 1 parameter on the next and
the 6th parameter is the long list of concatenated strings.
Why should you need to add another parameter here?
> 2) this error came at the linking stage:
>
> "arm-linux-ld:/home/johnson-yn/GEARI/u-boot-2009.06/board/atmel/at91rm9200dk/u-boot.lds:40:
> parse error
> make: *** [u-boot] Error 1"
>
> and the line 40 of u-boot.lds is :
>
> .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
>
> how should I solve this?
The easiest way would be to upgrade to a _recent_ toolchain (i.e. >4).
On the other hand, the line you mention was added in this commit:
http://git.denx.de/?p=u-boot.git;a=commit;h=f62fb99941c625605aa16a0097b396a5c16d2c88
If you check the commit msg, you get an idea of how you may "unwind"
this optimization.
However, why invest time, if a recent toolchain "just works"?
> If I just don't need use NAND flash module in u-boot, what are the
> steps I should take??
It should be enough to #undef CONFIG_CMD_NAND in the config file.
Cheers
Detlev
[1] http://www.denx.de/wiki/view/DULG/ELDKDownload?stickboard=qong
--
14474011154664524427946373126085988481573677491474835889066354349131199152128
If you know why this number is perfect - you're probably a mathematician...
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
More information about the U-Boot
mailing list