Compiling u-boot fails

Discussion of Samsung Exynos 5250 Arndale Community Board.
Posts: 20
Joined: Fri Nov 23, 2012 11:26 am

Compiling u-boot fails

Postby James » Mon Dec 03, 2012 3:01 pm

I followed the instructions to build Android from here: http://www.arndaleboard.org/wiki/index. ... or_Android

When I'm building u-boot I get the following error:

arm-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x43E00000 -I/android/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv7-a -Wall -Wstrict-prototypes -fno-stack-protector \
-o smc.o smc.c -c
In file included from /android/u-boot/include/config.h:4:0,
from /android/u-boot/include/common.h:37,
from smc.c:7:
/android/u-boot/include/configs/arndale.h:381:34: warning: "/*" within comment [-Wcomment]
In file included from smc.c:9:0:
/android/u-boot/include/asm/arch/cpu.h:515:1: warning: multi-line comment [-Wcomment]
smc.c: In function ‘load_uboot_image’:
smc.c:140:2: warning: implicit declaration of function ‘dmc_delay’ [-Wimplicit-function-declaration]
{standard input}: Assembler messages:
{standard input}:91: Error: selected processor does not support ARM mode `smc 0'
{standard input}:171: Error: selected processor does not support ARM mode `smc 0'
{standard input}:216: Error: selected processor does not support ARM mode `smc 0'
{standard input}:253: Error: selected processor does not support ARM mode `smc 0'
{standard input}:294: Error: selected processor does not support ARM mode `smc 0'
make[1]: *** [smc.o] Error 1

Anyone can help with this? I have already successfully compiled a later version of u-boot but that one does not give me a proper bl2 binary. Is your u-boot version not meant to work with gcc 4.6?

Thanks!

User avatar
Posts: 20
Joined: Wed Nov 21, 2012 7:28 am

Re: Compiling u-boot fails

Postby suapapa » Tue Dec 04, 2012 6:10 am

You should use `gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67)` to compile the u-boot.
I'll fix the wiki page to contain this information.

The compiler is selected by Samsung-SLSI's u-boot guide.

----

I know it's legacy compiler which is, currently, hard to find right link to download. :(

If you still want build the u-boot with gcc-4.6 AT YOUR OWN RISK,
try following patch to the u-boot.

Code: Select all
diff --git a/board/insignal/arndale/smc.c b/board/insignal/arndale/smc.c
index 49e9e3a..219bbce 100644
--- a/board/insignal/arndale/smc.c
+++ b/board/insignal/arndale/smc.c
@@ -90,6 +90,7 @@ static inline u32 exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3)
        register u32 reg3 __asm__("r3") = arg3;
 
        __asm__ volatile (
+               ".arch_extension sec\n"
                "smc    0\n"
                : "+r"(reg0), "+r"(reg1), "+r"(reg2), "+r"(reg3)


It's not deeply tested!! But, looks good.
No compile error, not been a brick, fastboot works..

Compiler version:
Code: Select all
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)


Build commands:
Code: Select all
$ cd u-boot
$ make ARCH=arm CROSS_COMPILE="arm-linux-gnueabi-" arndale_config
$ make ARCH=arm CROSS_COMPILE="arm-linux-gnueabi-" -j8


Flashing the bootloader (including bl1, bl2 and tzsw)
Code: Select all
$ fastboot flash fwbl1 vendor/insignal/arndale/exynos5250/exynos5250.bl1.bin
$ fastboot flash bl2 u-boot/bl2.bin
$ fastboot flash bootloader u-boot/u-boot.bin
$ fastboot flash tzsw vendor/insignal/arndale/exynos5250/exynos5250.tzsw.bin


Thanks.

Return to Samsung Exynos 5 Arndale Board

Who is online

Users browsing this forum: No registered users and 2 guests