From owner-freebsd-arm@FreeBSD.ORG Tue Apr 17 19:34:51 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3DA3106566C; Tue, 17 Apr 2012 19:34:51 +0000 (UTC) (envelope-from marktinguely@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7246C8FC15; Tue, 17 Apr 2012 19:34:51 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so8500358pbc.13 for ; Tue, 17 Apr 2012 12:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ASZQAsrOPeepFPw7ib/HwzyiFImHRMmIO7ojwWOBL7Q=; b=YZdmjM+F5XjLZTZrhX1vy15IIX7GQuacHpOHS8y0l+JyCjbIp2J8bUqdtNwypvut1E qLWy6zJAE1ruZiqLvmpib+F2BeWIIsaOx/O6+t19sG7XCC8B5Ybi4cJdwdYCSZTxc6ve aXwWLajbgtS4i9vz98NIjds1vjzjUzPS5weFRKYME1ZuQrZqAvD22bHtjO0/mo5ez1BE 6LAi86oqt3pjJ4DvZN+XqraFLM+SIdN75D38b45n6axs7XmgEC1YC/6VK3P+o1mv2aJp KDJk/OfII5ohsVZ1hSul/tqTII26pKYmi03hthKLbSOAPA1qVTHVNDytFvxF18ot2Bsy lPVA== MIME-Version: 1.0 Received: by 10.68.225.198 with SMTP id rm6mr38756149pbc.89.1334691291196; Tue, 17 Apr 2012 12:34:51 -0700 (PDT) Received: by 10.68.234.106 with HTTP; Tue, 17 Apr 2012 12:34:50 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Apr 2012 14:34:50 -0500 Message-ID: From: Mark Tinguely To: "Alex T." Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-arm@freebsd.org, Damjan Marion Subject: Re: beaglebone X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2012 19:34:51 -0000 On Tue, Apr 17, 2012 at 1:00 PM, Alex T. wrote: > Just a quick question. What compiler do you use? When I start the kernel > compilation the gcc from my base system is used, which is gcc 4.2.1, and it > complains about armv6 target cpu: > > `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. > cc1: error: unrecognized command line option "-mlittle-endian" > sys/arm/arm/genassym.c:1: error: bad value (armv6) for -march= switch > sys/arm/arm/genassym.c:1: error: bad value (armv6) for -mtune= switch > > Do you override CC by any chance? > Thanks. > > > On 17 April 2012 14:25, Damjan Marion wrote: > >> >> I put together guide how to build bootable SD card with FreeBSD on >> beaglebone. >> >> http://people.freebsd.org/~dmarion/beaglebone/creating_bootable_sd_card/ >> >> It is still work in progress, so ethernet driver is not complete and USB >> support is missing. >> >> Will be happy to hear any feedback. >> >> Damjan >> >> _______________________________________________ This should be somewhere in the FreeBSD ARM pages: First, create the following directories into the destination directory : mkdir -p usr/bin mdkir -p usr/lib mkdir -p usr/include mkdir -p usr/share/man/man1 mkdir -p usr/share/info mkdir -p usr/libdata/ldscripts mkdir -p usr/libexec go in /usr/src/gnu/usr.bin/cc, and do : make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross clean depend all make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install Then go in /usr/src/gnu/usr.bin/binutils, and do : make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross clean depend all make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install You should get what is needed to cross-compile a kernel. You need to set the following environment varibles for cross-compiling : export CC=/usr/cross/usr/bin/gcc export AS=/usr/cross/usr/bin/as export NM=/usr/cross/usr/bin/nm export RANLIB=/usr/cross/usr/bin/ranlib export LD=/usr/cross/usr/bin/ld export OBJCOPY=/usr/cross/usr/bin/objcopy export SIZE=/usr/cross/usr/bin/size export MACHINE=arm export MACHINE_ARCH=arm I add: export PATH=/usr/cross/usr/bin:$PATH: If you are doing a buildworld, do not use a cross compiler and only specify: make TARGET_ARCH=arm buildworld make TARGET_ARCH=arm DESTDIR=/path/to/arm/root installworld