Date: Wed, 29 Nov 2006 22:36:28 +0100 From: Olivier Houchard <mlfbsd@ci0.Org> To: Zuy <zaitsevbros@mail.ru> Cc: freebsd-arm@freebsd.org Subject: Re: At91rm9200 how to start with FreeBSD Message-ID: <20061129213628.GA35446@ci0.org> In-Reply-To: <7607997.post@talk.nabble.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061129213628.GA35446>