Collibri T20 Compilation Error for U-Boot and Linux Kernel

Hi Folks,

I am using the Colibri development board (T20 v3.1A). downloaded source code for kernel and U-Boot.
following the document
http://developer.toradex.com/knowledge-base/build-u-boot-and-linux-kernel-from-source-code#Source_Code

I am facing error in uboot compilation:

u-boot-toradex$ make -j3 2>&1 | tee build.log
Generating include/autoconf.mk.dep
Generating include/autoconf.mk
arm-linux-gnueabihf-gcc -DDO_DEPS_ONLY \
		-g  -O2   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x00108000 -I/home/nikhil/Public/toradex/u-boot-toradex/include -fno-builtin -ffreestanding -nostdinc -isystem /home/nikhil/Public/toradex/gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.2.1/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Werror -Wall -Wstrict-prototypes -fno-stack-protector   \
		-o lib/asm-offsets.s lib/asm-offsets.c -c -S
In file included from /home/nikhil/Public/toradex/u-boot-toradex/include/common.h:117:0,
                 from lib/asm-offsets.c:18:
/home/nikhil/Public/toradex/u-boot-toradex/include/image.h:551:12: error: inline function 'fit_parse_subimage' declared but never defined [-Werror]
 inline int fit_parse_subimage (const char *spec, ulong addr_curr,
            ^
/home/nikhil/Public/toradex/u-boot-toradex/include/image.h:549:12: error: inline function 'fit_parse_conf' declared but never defined [-Werror]
 inline int fit_parse_conf (const char *spec, ulong addr_curr,
            ^
cc1: all warnings being treated as errors
make: *** [lib/asm-offsets.s] Error 1
nikhil@goprolinux02:~/Public/toradex/u-boot-toradex$ make CC='arm-angstrom-linux-gnueabi-gcc  --sysroot=~/oe-core/build/out-glibc/sysroots/colibri-vf'
/bin/sh: arm-angstrom-linux-gnueabi-gcc: command not found
/bin/sh: arm-angstrom-linux-gnueabi-gcc: command not found
dirname: missing operand
Try 'dirname --help' for more information.
/bin/sh: arm-angstrom-linux-gnueabi-gcc: command not found
arm-angstrom-linux-gnueabi-gcc  --sysroot=~/oe-core/build/out-glibc/sysroots/colibri-vf -DDO_DEPS_ONLY \
		-g  -O2   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x00108000 -I/home/nikhil/Public/toradex/u-boot-toradex/include -fno-builtin -ffreestanding -nostdinc -isystem  -pipe  -DCONFIG_ARM -D__ARM__         -march=armv5 -Werror -Wall -Wstrict-prototypes    \
		-o lib/asm-offsets.s lib/asm-offsets.c -c -S
/bin/sh: arm-angstrom-linux-gnueabi-gcc: command not found
make: *** [lib/asm-offsets.s] Error 127

In kernel also i am getting below error:

  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
In file included from include/linux/compiler.h:48:0,
                 from include/linux/stddef.h:4,
                 from include/linux/posix_types.h:4,
                 from include/linux/types.h:17,
                 from include/linux/page-flags.h:8,
                 from kernel/bounds.c:9:
include/linux/compiler-gcc.h:94:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

If someone compile this source code please give me some pointers

I am using the Colibri development board (T20 v3.1A).

First there is no such board. We do carrier boards and modules that plug into them. So you probably have a Colibri T20 module and a Colibri Evaluation board V3.1A. However under environment you note having a Colibri VF50 of V3.1A which again does not exist. Please clarify.

Concerning the compilation errors it looks to me like you are not using a matching branch/configuration. Which exact BSP version and hardware model are we now exactly talking about?

/bin/sh: arm-angstrom-linux-gnueabi-gcc: command not found

In the second part you did not even specify a valid cross-compilation toolchain. I don’t know what exactly you were trying to achieve there.

In the kernel compilation case it looks like you are trying to compile an older BSP version with a newer GCC version. However as you do not indicate what exact versions and model we are talking about this is kind of difficult for me to asses.

Hi Marcel,

Thanks for your quick reply. Let me answer your questions:
Yes you are correct I have Colibri T20 module and a Colibri Evaluation board V3.1A (Also insert the image of EVB) with nxp processor MVF50NN151CMK40

For Downloading bootloader i am using git clone -b colibri git://git.toradex.com/u-boot-toradex.git
and for kernel source git clone -b colibri git://git.toradex.com/linux-toradex.git
I am using the toolchain: gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf.tar.xz

Could you please correct me, I am using the appropriate BSP and hardware model? if no please provide me the complete details so i can easily fix this.

I want to setup complete buildup environment (i.e. default working images uboot and kernel after getting compilation my own machine)

I think this info is sufficient to take me out and setup my build environment. Please let me know if you require other information to clearalt text this.

Thanks for your quick reply.

You are very welcome.

Let me answer your questions: Yes you are correct I have Colibri T20 module

No, you don’t. At least not on the picture as given above you do have a Colibri VF50 module.

BTW: From looking at the picture I would also assume the module is not properly seated into its socket. Take it out again by releasing the clips on either side (e.g. pushing them outwards). And insert it properly again starting with a say 30 deg angle and then pushing the module down until locked again by those side clips. You may also enjoy the following instructional getting started video at around second 25 to 30.

and a Colibri Evaluation board V3.1A (Also insert the image of EVB) with nxp processor MVF50NN151CMK40

The evaluation board is really just a carrier board without any processor. The processor is on the module.

For Downloading bootloader i am using git clone -b colibri git://git.toradex.com/u-boot-toradex.git and for kernel source git clone -b colibri git://git.toradex.com/linux-toradex.git I am using the toolchain: gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf.tar.xz

Those are definitely not the proper branches to be used. Have a look at the following article on our developer website for the proper ones.

Could you please correct me, I am using the appropriate BSP and hardware model? if no please provide me the complete details so i can easily fix this.

I would suggest either using latest stable being V2.5 or latest beta being V2.6.1 beta 1.

I want to setup complete buildup environment (i.e. default working images uboot and kernel after getting compilation my own machine)

Please note that the complete build environment would be Angstrom/OpenEmbedded/Yocto as outlined here. However just to compile the U-Boot boot loader and/or the Linux kernel one may go with the simpler setup as you are trying to do.

I think this info is sufficient to take me out and setup my build environment. Please let me know if you require other information to clear

Well, I still get confused by you claiming to work with a Colibri T20 but other than that I hope we got you onto the right track now.