How to build U-BOOT SPL?

2,509 views
Skip to the first unread message

wills

unread,
3 Mar 2013, 23:25:3803/03/2013
to linux...@googlegroups.com
How to build U-BOOT SPL?

Daniel Mosquera

unread,
4 Mar 2013, 03:01:5704/03/2013
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,
4 Mar 2013, 09:00:0604/03/2013
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,
4 Mar 2013, 09:43:2204/03/2013
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,
5 Mar 2013, 21:06:1705/03/2013
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,
29 May 2013, 22:03:4329/05/2013
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,
30 May 2013, 05:16:5830/05/2013
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,
31 May 2013, 02:53:1531/05/2013
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,
31 May 2013, 07:14:4531/05/2013
to linux...@googlegroups.com
Not in u-boot-spl.lds
It's from header in include/configs

wills

unread,
31 May 2013, 07:17:0431/05/2013
to linux...@googlegroups.com
I commend same lines with double slashes in sunxi-common.h

Henrik Nordström

unread,
31 May 2013, 09:29:4431/05/2013
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,
31 May 2013, 22:01:1431/05/2013
to linux...@googlegroups.com
Yes, but i suggest removing the "-ansi" option from the public repository

wills

unread,
31 May 2013, 22:01:2431/05/2013
to linux...@googlegroups.com
Yes, but i suggest removing the "-ansi" option from the public repository

putt...@gmail.com

unread,
14 Nov 2013, 23:57:2914/11/2013
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,
15 Nov 2013, 04:22:2915/11/2013
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