From owner-freebsd-arm@FreeBSD.ORG Wed Nov 29 21:07:19 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 D86F516A50A for ; Wed, 29 Nov 2006 21:07:19 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id A49C543CB0 for ; Wed, 29 Nov 2006 21:07:13 +0000 (GMT) (envelope-from bounces@nabble.com) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GpWeC-0006po-E8 for freebsd-arm@freebsd.org; Wed, 29 Nov 2006 13:07:16 -0800 Message-ID: <7607997.post@talk.nabble.com> Date: Wed, 29 Nov 2006 13:07:16 -0800 (PST) From: Zuy To: freebsd-arm@freebsd.org In-Reply-To: <20061118.012659.-1876864065.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: zaitsevbros@mail.ru References: <7380637.post@talk.nabble.com> <20061116.093638.63053940.imp@bsdimp.com> <7395689.post@talk.nabble.com> <20061118.012659.-1876864065.imp@bsdimp.com> 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:07:20 -0000 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. So I need an advice what is the best way to enable support for ARM in GCC for FreeBSD. Thank you. : You mentioned bootstrap tools such as boot0, boot0iic, boot0spi and boot2. : Where can I get them? : Boot0 and boot2 I found in /usr/src/sys/boot but there is no folder for ARM. : I use FreeBSD 6.0 (6.2 is downloading now) may be that is the reason. In -current, they can be found in /usr/src/sys/boot/arm/at91, as well as on 6.2. I believe that the 6.2 versions are less advanced. : And the last question about compilation process. As you wrote, following : sequence will give the compiled OS for arm architecture: : % setenv TARGET arm : % setenv TARGET_ARCH arm : % make buildworld : % make distribution DESTDIR=/mnt : % make installworld DESTDIR=/mnt : : But how the system will know that I need compilation for ARM9. Where it will : get drivers for basic internal peripherals of AR91RM9200? I think that I : have to prepare configuration file like I do for compiling kernel for I386, : but I cannot find it. It looks like they are in the /usr/src/sys/arm/conf. I : found there two files IQ31244 and SIMICS. Probably they are configuration : files for IQ31244 and SIMICS development boards. So I think I have to make : the same file for AT91RM9200. May be you can give me the idea where to get : such file like an example? You are correct in that you need a config file. In 6.2 and current there is a KB920X file that can be used as a basis for this support. Warner : Best regards, : Ivan Zaitsev. : : -- View this message in context: http://www.nabble.com/At91rm9200-how-to-start-with-FreeBSD-tf2643928.html#a7607997 Sent from the freebsd-arm mailing list archive at Nabble.com.