U-boot for Banana Pi

Tim Kientzle tim at kientzle.com
Wed Aug 13 02:08:24 UTC 2014


On Aug 12, 2014, at 5:18 PM, TooMeeK Admin <maps at toomeek.waw.pl> wrote:

> 1. prepare
> pkg install gcc make gmake joe screen htop gsed wget git arm-eabi-gcc
> set CROSS=/usr/obj/arm.armv6/usr/src/tmp/usr/bin/
> echo $CROSS
> ln -s /usr/local/bin/arm-eabi-gcc /usr/local/bin/gcc
> ln -s /usr/local/bin/arm-eabi-gcc /usr/obj/arm.armv6/usr/src/tmp/usr/bin/gcc

You don’t need these symlinks.
To use arm-eabi-gcc as your cross compiler, you want to use

   gmake …  CROSS_COMPILE=arm-eabi- ...

and make sure /usr/local/bin is part of your PATH.

U-Boot build scripts use ${CROSS_COMPILE}gcc to run the cross-compiler GCC, so if you set CROSS to arm-eabi-, U-Boot will use arm-eabi-gcc as the cross compiler.

> gcc --version
> gcc (GCC) 4.5.4

This is bad.  U-Boot by default uses HOSTCC=gcc to run a compiler that can build tools to run on the host machine.  But you’ve set up ‘gcc’ to run the cross-compiler, which is why HOSTCC builds are failing.

>  HOSTCC  scripts/basic/fixdep
> scripts/basic/fixdep.c:108:22: fatal error: sys/mman.h: No such file or directory
> compilation terminated.
> 
> The problem I'm hitting is that compiler requires sys/mman.h

No.  scripts/basic/fixdep requires sys/mman.h when it
is compiled using HOSTCC.  But you’ve broken HOSTCC.

Cheers,

Tim



More information about the freebsd-arm mailing list