View: 15760|Reply: 4

Problem with u-boot cross-compilation

[Copy link]

1

threads

3

posts

29

credits

Novice

Rank: 1

credits
29
Published in 2016-1-20 19:55:41 | Show all floors |Read mode
Hello

I can`t compile u-boot, after enter compilation command:
make CROSS_COMPILE=arm-linux-gnueabihf-

I got a message:

from /usr/src/orangepi-bsp/u-boot-sunxi/include/common.h:92:
include/linux/compiler-gcc.h:93:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
/usr/src/orangepi-bsp/u-boot-sunxi/./Kbuild:34: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1006: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

I made symbolic link to gcc-4.7 and g++4.7 because default was to 5.2.1 but no result

What can I do in this case ?




2

threads

8

posts

74

credits

Registered member

Rank: 2

credits
74
Published in 2016-1-20 22:53:32 | Show all floors
not sure if this help
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

btw, I heard that gcc/g++ 4.6 works better

1

threads

3

posts

29

credits

Novice

Rank: 1

credits
29
 Author| Published in 2016-1-22 02:58:57 | Show all floors
It doesn`t work. I created new file compiler-gcc5.h with include to compiler-gcc4 but now I have such error messages:

  1. LD      arch/arm/cpu/armv7/sunxi/built-in.o
  2. arch/arm/cpu/armv7/sunxi/board.o: In function `__raw_writesb':
  3. /usr/src/orangepi-bsp/u-boot-sunxi/arch/arm/include/asm/io.h:80: multiple definition of `__raw_writesb'
  4. arch/arm/cpu/armv7/sunxi/timer.o:/usr/src/orangepi-bsp/u-boot-sunxi/arch/arm/include/asm/io.h:80: first defined here
  5. arch/arm/cpu/armv7/sunxi/board.o: In function `__raw_writesb':
Copy code


of course these only partly information

3

threads

60

posts

258

credits

Intermediate member

Rank: 3Rank: 3

credits
258
Published in 2016-1-22 19:57:46 | Show all floors
Try compiling with Linaro toolchain. This one should work.

1

threads

3

posts

29

credits

Novice

Rank: 1

credits
29
 Author| Published in 2016-1-22 22:59:34 | Show all floors
I think that is only way to work I should change Ubuntu on older version with older kernel and older GCC.  I have Ubuntu with 4.2.0-16 kernel so this is too high for compile older kernels. Changing GCC on older nothing gives because in configuration in headers and macro generates incorrect gcc version in my case: #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list