From owner-freebsd-arm@FreeBSD.ORG Wed Nov 29 21:40:28 2006 Return-Path: X-Original-To: freebsd-arm@freebsd.org 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 7748616A53B for ; Wed, 29 Nov 2006 21:40:28 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDC2C43E8D for ; Wed, 29 Nov 2006 21:35:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kATLWvfF021087; Wed, 29 Nov 2006 14:32:57 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 29 Nov 2006 14:33:39 -0700 (MST) Message-Id: <20061129.143339.-861030644.imp@bsdimp.com> To: mlfbsd@ci0.Org From: "M. Warner Losh" In-Reply-To: <20061129213628.GA35446@ci0.org> References: <20061118.012659.-1876864065.imp@bsdimp.com> <7607997.post@talk.nabble.com> <20061129213628.GA35446@ci0.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 29 Nov 2006 14:32:58 -0700 (MST) Cc: zaitsevbros@mail.ru, freebsd-arm@freebsd.org Subject: Re: At91rm9200 how to start with FreeBSD 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: Wed, 29 Nov 2006 21:40:28 -0000 In message: <20061129213628.GA35446@ci0.org> Olivier Houchard writes: : Hi, : : On Wed, Nov 29, 2006 at 01:07:16PM -0800, Zuy wrote: : > : > I found bootstrap tools and kernel config files in FreeBSD6.2. : > So I decided to try to compile kernel for At91RM9200 the same way as I do : > for I386 configuration. : > As far as I do not have all source files installed I have to use traditional : > way for building kernel. : > : > zuy_bsd# cd /usr/src/sys/arm/conf : > zuy_bsd# /usr/sbin/config KB920X : > Kernel build directory is ../compile/KB920X : > Don't forget to do ``make cleandepend; make depend'' : > zuy_bsd# cd ../compile/KB920X : > zuy-bsd# make cleandepend : > rm -f .depend : > zuy-bsd# make depend : > cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs ....... # I cut : > option to make my post shorter : > `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. : > ../../../i386/i386/genassym.c:1: error: bad value (arm9) for -mtune= switch : > *** Error code 1 : > : > Stop in /usr/src/sys/arm/compile/KB920X. : > : > I think this error means that by default GCC in FreeBSD6.2 does not support : > compilation for ARM architecture. : > I have two ideas how to enable this support. : > 1. Download lates version of GCC and compile it with cross compiler for ARM. : > 2. Install /usr/ports/devel/arm-elf-gcc295 : > I found that a lot of people do not advice to change standart compiler with : > new one. It can cause problems with future kernel building. That is why I'm : > not sure that the first way is correct. : > The second way installs ARM support but for old version of compiler. That I : > think is not good as well. : > : : You can build an arm cross-compiler from the system sources as described here : : http://people.FreeBSD.org/~cognet/freebsd_arm.txt : Using the new official way to build the kernel, with make buildkernel, : should work for cross-compiling too : : I think you first need to do : make TARGET_ARCH=arm kernel-toolchain : and then you should be able to do make TARGET_ARCH=arm KERNCONF=YOURFILE : buildkernel : But I do not use this method, so I can't swear it's the exact things to do. I've used this method quite recently on -current. I usually add TARGET=arm as well, but that's because there's a difference between current and stable in this area and adding both doesn't hurt and always works... Warner