From owner-freebsd-arm@FreeBSD.ORG Wed Nov 29 21:19:49 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 7F8B816A40F for ; Wed, 29 Nov 2006 21:19:49 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (cognet.ci0.org [80.65.224.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09F6A43CCC for ; Wed, 29 Nov 2006 21:18:18 +0000 (GMT) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.7/8.13.4) with ESMTP id kATLaTTK035517; Wed, 29 Nov 2006 22:36:29 +0100 (CET) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.13.7/8.13.4/Submit) id kATLaTPM035514; Wed, 29 Nov 2006 22:36:29 +0100 (CET) (envelope-from mlfbsd) Date: Wed, 29 Nov 2006 22:36:28 +0100 From: Olivier Houchard To: Zuy Message-ID: <20061129213628.GA35446@ci0.org> References: <7380637.post@talk.nabble.com> <20061116.093638.63053940.imp@bsdimp.com> <7395689.post@talk.nabble.com> <20061118.012659.-1876864065.imp@bsdimp.com> <7607997.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7607997.post@talk.nabble.com> User-Agent: Mutt/1.4.1i Cc: 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:19:49 -0000 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. Cheers, Olivier