U-boot for Banana Pi

TooMeeK Admin maps at toomeek.waw.pl
Wed Aug 13 00:18:40 UTC 2014


Hello,

after few days spent on solving problems I've decided to join this list, 
since Banana Pi is ARM device.
Please be patient, I'm new here :)

I'll explain where problem is..
Basically, I've created 2 new files based on Cubieboard2 for Banana Pi 
board in following locations:
filename: BANANAPI
what is: kernel config
location: /usr/src/sys/arm/conf
filename: bananapi.dts
what is: DTS files
location: /usr/src/sys/boot/fdt/dts
I've enabled some options like EXT2 support, kernel config built-in and so.

I'm running FreeBSD 10.0 in two test environments:
1. VirtualBox - because it's easy to use it on Windows, mainly for fast 
compilation due very good CPU here
2. KVM - because I can passthrough raw device like USB flash or microSD 
card directly to VM and install bootloader, make partitions and so
Both are FreeBSD freebsd 10.0-RELEASE (64-bit).

Kernel compilation is fine - "Kernel build for BANANAPI completed on..."

However.. problem is with u-boot for my board.
Source got from:
https://github.com/linux-sunxi/u-boot-sunxi/

So far I've did this:

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
git clone https://github.com/linux-sunxi/u-boot-sunxi
cd u-boot-sunxi

2. make
gmake -j4 ARCH=arm CROSS_COMPILE=${CROSS} USE_PRIVATE_LIBGCC=yes clean
gmake -j4 ARCH=arm CROSS_COMPILE=${CROSS} USE_PRIVATE_LIBGCC=yes 
Bananapi_config
gmake -j4 ARCH=arm CROSS_COMPILE=${CROSS} USE_PRIVATE_LIBGCC=yes

3. compile
gcc --version
gcc (GCC) 4.5.4

root at freebsd:/usr/src/u-boot-sunxi # gmake -j4 ARCH=arm 
CROSS_COMPILE=${CROSS} USE_PRIVATE_LIBGCC=yes Bananapi_config
Configuring for Bananapi - Board: sun7i, Options: 
BANANAPI,SPL,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),STATUSLED=244,STATUSLED1=245,FAST_MBUS

root at freebsd:/usr/src/u-boot-sunxi # gmake -j4 ARCH=arm 
CROSS_COMPILE=${CROSS} USE_PRIVATE_LIBGCC=yes
   GEN     include/autoconf.mk.dep
   GEN     include/autoconf.mk
   CHK     include/config/uboot.release
   CHK     include/generated/timestamp_autogenerated.h
   UPD     include/generated/timestamp_autogenerated.h
   HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c:108:22: fatal error: sys/mman.h: No such file or 
directory
compilation terminated.
gmake[1]: *** [scripts/basic/fixdep] Error 1
gmake: *** [scripts_basic] Error 2
gmake: *** Waiting for unfinished jobs....

The problem I'm hitting is that compiler requires sys/mman.h
The file can be found:
/usr/include/sys/mman.h
/usr/src/sys/cddl/compat/opensolaris/sys/mman.h
/usr/src/sys/compat/svr4/svr4_mman.h
/usr/src/sys/sys/mman.h
But even if I copy it or symlink it seems it doesn't change anything..
Tried several directories, ex:
/usr/src/u-boot-sunxi/include/
/usr/src/u-boot-sunxi/scripts/
/usr/src/u-boot-sunxi/scripts/basic/

If I comment this in scripts/basic/fixdep.c then another file is 
missing: arpa/inet.h

How to resolve this?

Thank You,
TooMeeK


More information about the freebsd-arm mailing list