Building U-Boot

I’ve been trying to build U-Boot (the 2016.03 version) from the instructions in
https://eewiki.net/display/linuxonarm/BeagleBone+Black
and have ended up with the following shell script:

#!/bin/bash
export CROSS_COMPILE="/home/beagle/linux-dev/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-"
export CC="/home/beagle/linux-dev/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-"
export ARCH=arm
make distclean
make am335x_evm_defconfig
make

eof

which uses a 32-bit Linaro compiler which I’ve used for U-Boot before.

The sources patch correctly, but the compile fails (the log is below). Does anyone
know of a 32-bit compiler which will compile the current U-Boot?

Thanks - C W Rose

Build log for U-Boot:
CLEAN tools
CLEAN tools/lib tools/common
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config include/generated spl
CLEAN .config include/autoconf.mk include/autoconf.mk.dep include/config.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf

You’re problem does to seem to be a compiler error. It seems to be a missing type, specifically a missing struct with a member name of sname. Many times, this can be attributed to a missing header file. But that whole C file seems riddled with warnings, which a good developer should at least attempt to clean up . . . no idea who wrote that code.

Judging by the amount of [-Wimplicit-function-declaration] warnings prior to the errors I’d think that you’re missing a header file.

Just thinking about what might also possibly be the cause, you could attempt to change the CC line in the make file to so gcc will use the C99 std instead of C11. the option to add would be -std=c99

The problem was GCC 4.7.3; I installed Ubuntu 16.04 and downloaded their ARM cross-compiler (GCC 4.9) and the build was straightforward.

C W Rose