Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2006 13:07:16 -0800 (PST)
From:      Zuy <zaitsevbros@mail.ru>
To:        freebsd-arm@freebsd.org
Subject:   Re: At91rm9200 how to start with FreeBSD
Message-ID:  <7607997.post@talk.nabble.com>
In-Reply-To: <20061118.012659.-1876864065.imp@bsdimp.com>
References:  <7380637.post@talk.nabble.com> <20061116.093638.63053940.imp@bsdimp.com> <7395689.post@talk.nabble.com> <20061118.012659.-1876864065.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7607997.post>