IMX6 UBOOT V2.3 - linux/compiler-gcc5.h: No such file or directory

Hi Toradex,

I am trying to compile uboot from source code. Here is what I have done:

  1. git clone -b 2014.04-toradex git://git.toradex.com/linux-toradex.git
  2. cd
  3. wget -c https://releases.linaro.org/components/toolchain/binaries/5.2-2015.11-2/arm-linux-gnueabihf/gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf.tar.xz
  4. tar xvf gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf.tar.xz
  5. ln -s gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf gcc-linaro
  6. export ARCH=arm
  7. export PATH=~/gcc-linaro/bin/:$PATH
  8. export CROSS_COMPILE=arm-linux-gnueabihf-
  9. echo “export ARCH=arm” >> ~/export_compiler
  10. echo “export PATH=~/gcc-linaro/bin/:$PATH” >> ~/export_compiler
  11. echo “export CROSS_COMPILE=arm-linux-gnueabihf-” >> ~/export_compiler
  12. source ~/export_compiler
  13. export PATH=$PATH:$HOME/u-boot-toradex/tools
  14. sudo apt-get install u-boot-tools
  15. cd
  16. cd u-boot-toradex
  17. make apalis_imx6q2g_config
  18. make -j3 2>&1 | tee build.log

During compilation, I encountered this error:

make -j3 2>&1 | tee build.log
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
In file included from include/linux/compiler.h:40:0,
                 from include/linux/byteorder/little_endian.h:12,
                 from /home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/arch/arm/include/asm/byteorder.h:29,
                 from include/compiler.h:112,
                 from include/image.h:19,
                 from /home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/include/common.h:94:
include/linux/compiler-gcc.h:93:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
In file included from include/linux/compiler.h:40:0,
                 from include/linux/byteorder/little_endian.h:12,
                 from /home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/arch/arm/include/asm/byteorder.h:29,
                 from include/compiler.h:112,
                 from include/image.h:19,
                 from /home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/include/common.h:94:
include/linux/compiler-gcc.h:93:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/basic/fixdep
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CC      arch/arm/lib/asm-offsets.s
  CC      lib/asm-offsets.s
In file included from include/linux/compiler.h:40:0,
                 from include/linux/byteorder/little_endian.h:12,
                 from /home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/arch/arm/include/asm/byteorder.h:29,
                 from include/compiler.h:112,
                 from include/image.h:19,
                 from include/common.h:94,
                 from arch/arm/lib/asm-offsets.c:15:
include/linux/compiler-gcc.h:93:30: fatal error: linux/compiler-gcc5.h: No such file or directory
In file included from include/linux/compiler.h:40:0,
                 from include/linux/byteorder/little_endian.h:12,
                 from /home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/arch/arm/include/asm/byteorder.h:29,
                 from include/compiler.h:112,
                 from include/image.h:19,
                 from include/common.h:94,
                 from lib/asm-offsets.c:15:
include/linux/compiler-gcc.h:93:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
/home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/./Kbuild:83: recipe for target 'arch/arm/lib/asm-offsets.s' failed
make[1]: *** [arch/arm/lib/asm-offsets.s] Error 1
make[1]: *** Waiting for unfinished jobs....
compilation terminated.
/home/mark/u-boot-toradex-v2.3_2/u-boot-toradex/./Kbuild:34: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1002: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

Am i doing something wrong or is there supposed to be a include/linux/compiler-gcc5.h file?

Hi

U-Boot 2014.04 cannot be compiled with a gcc 5 compiler.
So you should use gcc 4.

Max

P.S. Note that all i.MX6 based modules have moving to a new version which can not be made compatible with 2014.04.
See the latest PCN.

Hello,

I have the same issue.
Is there a way to install the updated gcc5.
I tried but it did not change anything.

Thanks,
Ran

Rather than hijacking old questions would you please ask a new one stating exactly what versions of things you are taking about and what issue you are facing?

BTW: Any V2.3 beta versions (just like the later V2.4 and V2.5 ones) are long since obsolete and no longer supported. Please update to a stable version like V2.6 or 2.7 or the latest beta version (2.8b1 at the time of this writing) at your earliest convenience.