How to build U-BOOT SPL?

2,508 views
Skip to first unread message

wills

unread,
Mar 3, 2013, 11:25:38 PM3/3/13
to linux...@googlegroups.com
How to build U-BOOT SPL?

Daniel Mosquera

unread,
Mar 4, 2013, 3:01:57 AM3/4/13
to linux...@googlegroups.com

https://github.com/linux-sunxi/u-boot-sunxi/wiki
El lunes, 4 de marzo de 2013 05:25:38 UTC+1, wills escribió:
How to build U-BOOT SPL?

Wills Wang

unread,
Mar 4, 2013, 9:00:06 AM3/4/13
to linux...@googlegroups.com
But, I meet:

willswang@wills-wang-dev:~/work/allwinner/u-boot-sunxi$ make ARCH=arm
CROSS_COMPILE=arm-linux-gnueabi- mele_a1000
arm-linux-gnueabi-gcc -E -g -Os -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -ffunction-sections -fdata-sections
-DCONFIG_SYS_TEXT_BASE=0x4A000000 -DCONFIG_SPL_TEXT_BASE=0x30
-DCONFIG_SPL_BUILD -I/home/willswang/work/allwinner/us
cd /home/willswang/work/allwinner/u-boot-sunxi/spl/ &&
arm-linux-gnueabi-ld.bfd -T
/home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl.lds
--gc-sections -Bstatic -Ttext 0x30 arch/arm/cpu/armv7/start.o
--start-group arch/arm/cpu/l
arm-linux-gnueabi-ld.bfd:/home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl.lds:1:
ignoring invalid character `#' in expression
arm-linux-gnueabi-ld.bfd:/home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl.lds:1:
syntax error
make[2]: *** [/home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl]
Error 1
make[2]: Leaving directory `/home/willswang/work/allwinner/u-boot-sunxi/spl'
make[1]: *** [spl/u-boot-spl.bin] Error 2
make[1]: Leaving directory `/home/willswang/work/allwinner/u-boot-sunxi'
make: *** [mele_a1000] Error 2


2013/3/4 Daniel Mosquera <damo...@gmail.com>:
>
> https://github.com/linux-sunxi/u-boot-sunxi/wiki
> El lunes, 4 de marzo de 2013 05:25:38 UTC+1, wills escribió:
>>
>> How to build U-BOOT SPL?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "linux-sunxi" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/linux-sunxi/FU3odHBtWUk/unsubscribe?hl=en-GB.
> To unsubscribe from this group and all of its topics, send an email to
> linux-sunxi...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Alejandro Mery

unread,
Mar 4, 2013, 9:43:22 AM3/4/13
to linux...@googlegroups.com, Wills Wang
On 04/03/13 15:00, Wills Wang wrote:
> But, I meet:
>
> willswang@wills-wang-dev:~/work/allwinner/u-boot-sunxi$ make ARCH=arm
> CROSS_COMPILE=arm-linux-gnueabi- mele_a1000
> arm-linux-gnueabi-gcc -E -g -Os -fno-common -ffixed-r8 -msoft-float
> -D__KERNEL__ -ffunction-sections -fdata-sections
> -DCONFIG_SYS_TEXT_BASE=0x4A000000 -DCONFIG_SPL_TEXT_BASE=0x30
> -DCONFIG_SPL_BUILD -I/home/willswang/work/allwinner/us
> cd /home/willswang/work/allwinner/u-boot-sunxi/spl/ &&
> arm-linux-gnueabi-ld.bfd -T
> /home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl.lds
> --gc-sections -Bstatic -Ttext 0x30 arch/arm/cpu/armv7/start.o
> --start-group arch/arm/cpu/l
> arm-linux-gnueabi-ld.bfd:/home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl.lds:1:
> ignoring invalid character `#' in expression
> arm-linux-gnueabi-ld.bfd:/home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl.lds:1:
> syntax error
> make[2]: *** [/home/willswang/work/allwinner/u-boot-sunxi/spl/u-boot-spl]
> Error 1
> make[2]: Leaving directory `/home/willswang/work/allwinner/u-boot-sunxi/spl'
> make[1]: *** [spl/u-boot-spl.bin] Error 2
> make[1]: Leaving directory `/home/willswang/work/allwinner/u-boot-sunxi'
> make: *** [mele_a1000] Error 2

uhm... what version of gcc are you using?

Wills Wang

unread,
Mar 5, 2013, 9:06:17 PM3/5/13
to Alejandro Mery, linux...@googlegroups.com
arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shab
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

wills

unread,
May 29, 2013, 10:03:43 PM5/29/13
to linux...@googlegroups.com, Alejandro Mery
Solved
In the following statements, the "-ansi" option can't deal with the double slash comment in header file

$(obj)u-boot-spl.lds: $(LDSCRIPT) depend
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - < $< > $@

Oliver Schinagl

unread,
May 30, 2013, 5:16:58 AM5/30/13
to linux...@googlegroups.com
On 30-05-13 04:03, wills wrote:
Solved
In the following statements, the "-ansi" option can't deal with the double slash comment in header file

$(obj)u-boot-spl.lds: $(LDSCRIPT) depend
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - < $< > $@

Personally, I think double slashes are fine for development work, just comment out something quickly, test something etc. when committing code however, they aren't necessary and should be removed/converted to /* */

On Wednesday, March 6, 2013 10:06:17 AM UTC+8, wills wrote:
arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shab
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.

Henrik Nordström

unread,
May 31, 2013, 2:53:15 AM5/31/13
to linux...@googlegroups.com
tor 2013-05-30 klockan 11:16 +0200 skrev Oliver Schinagl:

> Personally, I think double slashes are fine for development work, just
> comment out something quickly, test something etc. when committing
> code however, they aren't necessary and should be removed/converted
> to /* */

Yes.

I missed the beginning of this thread. Where is those // ? I see
u-boot-spl.lds mentioned, but there is no // in any of the versions of
sunxi u-boot-spl.lds that I have. Checked both sunxi-current and sunxi
branches.

Regards
Henrik

wills

unread,
May 31, 2013, 7:14:45 AM5/31/13
to linux...@googlegroups.com
Not in u-boot-spl.lds
It's from header in include/configs

wills

unread,
May 31, 2013, 7:17:04 AM5/31/13
to linux...@googlegroups.com
I commend same lines with double slashes in sunxi-common.h

Henrik Nordström

unread,
May 31, 2013, 9:29:44 AM5/31/13
to linux...@googlegroups.com
fre 2013-05-31 klockan 04:17 -0700 skrev wills:
> I commend same lines with double slashes in sunxi-common.h

Ok, so the problem is not in the public repository?

Regards
Henrik

wills

unread,
May 31, 2013, 10:01:14 PM5/31/13
to linux...@googlegroups.com
Yes, but i suggest removing the "-ansi" option from the public repository

wills

unread,
May 31, 2013, 10:01:24 PM5/31/13
to linux...@googlegroups.com
Yes, but i suggest removing the "-ansi" option from the public repository

putt...@gmail.com

unread,
Nov 14, 2013, 11:57:29 PM11/14/13
to linux...@googlegroups.com
arm-cortexa8-linux-gnueabi-ld.bfd:/home/sukesh/Downloads/u-boot-2013.07/spl/u-boot-spl.lds:1: ignoring invalid character `#' in expression
arm-cortexa8-linux-gnueabi-ld.bfd:/home/sukesh/Downloads/u-boot-2013.07/spl/u-boot-spl.lds:1: syntax error
make[1]: *** [/home/sukesh/Downloads/u-boot-2013.07/spl/u-boot-spl] Error 1
make[1]: Leaving directory `/home/sukesh/Downloads/u-boot-2013.07/spl'
make: *** [spl/u-boot-spl.bin] Error 2


i am getting this error how to how to resolve it

Arokux X

unread,
Nov 15, 2013, 4:22:29 AM11/15/13
to linux...@googlegroups.com
Why not just grab HEAD? It is known to work well.

P.S. You need to specify much more details to get help i.e. what
board, what toolchain etc.
Reply all
Reply to author
Forward
0 new messages