From owner-freebsd-arm@FreeBSD.ORG Tue Apr 17 20:42:15 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 45CC71065670; Tue, 17 Apr 2012 20:42:15 +0000 (UTC) (envelope-from dioxinu@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id DC7748FC0C; Tue, 17 Apr 2012 20:42:14 +0000 (UTC) Received: by qao25 with SMTP id 25so758932qao.13 for ; Tue, 17 Apr 2012 13:42:13 -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=jyuz1aBtMtsG9F7jToESLkj435LrJ0MpVpgjH5zKcP4=; b=c+F6yqCzhSmT634lNRB5gmuHjfKgG15lADWZZY8KHo1PpEYZrUc+Ll5M1EFuaHYCXB DlPrvCSQuvlA8wLC5UKhO6RSCdrJMmjdetsyAQGY7UYD5tIfbUW0RIQIMWaR2jW8yoJW l2OEo5OKppDIp2I4bvt3vQTqVE3d2u3GoyYd++9uU7IRb/LkKg/tAcpm3M5aVBzWBdZq V505CGjWxkEJWAxnWLEfI7TBryfgo98DgBT+6D79/wmuODuUTxVrSY1y0mbFVrVf1KGj UjfWVBhdeWP8fy9IAH/5wm3b0TMLGRcSynW1UeejLw/VrozCQ6NVt7OvoVxybao33K9x utlw== MIME-Version: 1.0 Received: by 10.229.111.74 with SMTP id r10mr6985555qcp.122.1334695333560; Tue, 17 Apr 2012 13:42:13 -0700 (PDT) Received: by 10.229.251.148 with HTTP; Tue, 17 Apr 2012 13:42:13 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Apr 2012 20:42:13 +0000 Message-ID: From: "Alex T." To: Mark Tinguely Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 20:42:15 -0000 Damjan, Oleksandr, Thanks for your help, I really appreciate your assistance. I have noticed that different ARM cpus are handled in the code with ifdefs like this one: #ifdef CPU_CORTEXA and as far as I understand in order for the CPU_CORTEXA to be defined I need to add cpu CPU_CORTEXA to sys/arm/omap/std.omap. What I don't understand right now is the following code in sys/arm/include/pmap.h #if defined(CPU_ARMV7) void pmap_pte_init_armv7(void); #endif As far as i know ARMV7 covers the Cortex-A family. So how do I properly set CPU_ARMV7 ? I guess I'm missing how the parameters make their way from KERNEL configs to the actual source code. Thanks a lot. On 17 April 2012 19:34, Mark Tinguely wrote: > 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 >