From owner-freebsd-arm@FreeBSD.ORG Wed Aug 13 00:18:40 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E877749E for ; Wed, 13 Aug 2014 00:18:39 +0000 (UTC) Received: from poczta.toomeek.waw.pl (unknown [IPv6:2001:67c:232c:1000::fd9b:4fb4]) by mx1.freebsd.org (Postfix) with ESMTP id A99F82A95 for ; Wed, 13 Aug 2014 00:18:38 +0000 (UTC) Received: from [192.168.137.1] (afik61.neoplus.adsl.tpnet.pl [95.49.218.61]) by poczta.toomeek.waw.pl (Postfix) with ESMTPSA id C6A20C600D0 for ; Tue, 12 Aug 2014 20:18:29 -0400 (EDT) Message-ID: <53EAAEDB.8060802@toomeek.waw.pl> Date: Wed, 13 Aug 2014 02:18:35 +0200 From: TooMeeK Admin User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: U-boot for Banana Pi Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.3.9 (poczta.toomeek.waw.pl [0.0.0.0]); Tue, 12 Aug 2014 20:18:30 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.98.1 at a8d2ba546e X-Virus-Status: Clean X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 00:18:40 -0000 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@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@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