From owner-freebsd-arm@FreeBSD.ORG Wed Aug 13 02:08:24 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36B7A5C9 for ; Wed, 13 Aug 2014 02:08:24 +0000 (UTC) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C15D274F for ; Wed, 13 Aug 2014 02:08:23 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id eu11so14104184pac.3 for ; Tue, 12 Aug 2014 19:08:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=xnRnZrO+sD8UwDkfMpye6y+fkiqp3d82NqinyQlaick=; b=IzzBF6Zo2+es5JYgZxrAxoW12PioKPVtfwtHQG2uLfIY2JBGR9VylOSD7KeFnzYpXT 5/Pe6f54FHQ26GTqZ2mSsi9G+Kfwj12X32N97GGqmC3B33V+FOgSrj5IUNgYOj8rvCV4 5ILlNcrp7mM6AtjtX3GM9a9+1sMnCzWu/oxMpt6wZh59Q+LDJoaJqJCZO8ccT2UqYk0W IvHbw6aJgJVlyrnJf5pj8jWaglslM20bkcfAvmGcyVH+qc+GOMMSETETNR1YMlLrG/Qb nORAl02il4P/0RhAoXcwCXRimkONfUZRYapwVi2K9XU/tzl+GhFQUEje6KUVVSOjeQ3I vYQw== X-Gm-Message-State: ALoCoQkSdQfMlZgsTaIqPmM5wMUgl1y0R4bTdU5cGsbUA6NbDePHbeidbzBFEj2MaAaBCa8gzQ7a X-Received: by 10.67.22.65 with SMTP id hq1mr1199720pad.137.1407895696140; Tue, 12 Aug 2014 19:08:16 -0700 (PDT) Received: from [192.168.1.100] (c-24-6-220-224.hsd1.ca.comcast.net. [24.6.220.224]) by mx.google.com with ESMTPSA id ak1sm316538pbc.58.2014.08.12.19.08.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 19:08:15 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: U-boot for Banana Pi From: Tim Kientzle In-Reply-To: <53EAAEDB.8060802@toomeek.waw.pl> Date: Tue, 12 Aug 2014 19:08:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <53EAAEDB.8060802@toomeek.waw.pl> To: TooMeeK Admin X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-arm@freebsd.org 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 02:08:24 -0000 On Aug 12, 2014, at 5:18 PM, TooMeeK Admin wrote: > 1. prepare > pkg install gcc make gmake joe screen htop gsed wget git arm-eabi-gcc > set CROSS=3D/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=92t need these symlinks. To use arm-eabi-gcc as your cross compiler, you want to use gmake =85 CROSS_COMPILE=3Darm-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=3Dgcc to run a compiler that = can build tools to run on the host machine. But you=92ve set up =91gcc=92= 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. >=20 > 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=92ve broken HOSTCC. Cheers, Tim