Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 2004 19:45:10 +0200
From:      Olivier Houchard <cognet@ci0.org>
To:        Alexander Timoshenko <gonzo@univ.kiev.ua>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: A couple of questions
Message-ID:  <20040804174510.GB83850@ci0.org>
In-Reply-To: <20040804153653.GA63512@univ.kiev.ua>
References:  <20040804115115.GA39676@univ.kiev.ua> <20040804155300.GA82096@ci0.org> <20040804153653.GA63512@univ.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 04, 2004 at 06:36:53PM +0300, Alexander Timoshenko wrote:
> Olivier Houchard (cognet@ci0.org) wrote:
> > 
> > On Wed, Aug 04, 2004 at 02:51:15PM +0300, Alexander Timoshenko wrote:
> > >     Sorry, for distrubing the silence of this templ^W mailing list :) I
> > > have a couple of questions regarding arm port of freebsd. I'm playing
> > > with intel development board these days and going to try to run freebsd
> > > on it, but want to know more before i start.
> > > 
> > >     - How to build image suitable for loading on developemnt board. Are
> > >       there any instructions? Or could someone share his scripts with
> > >       me?
> > > 
> > >     - Could someone describe the generic cycle of development for arm
> > >       CPU? e.g: edit/compile/build image/reset board. What kind of
> > >       bootloader should i use?
> > > 
> > > Thanks in advance. Sorry for the kind of lame questions.
> > > 
> > 
> > Hi,
> > 
> > It all depends of what your board is.
> > Generally speaking, you won't be able to run FreeBSD, because each board is
> > too different.
> > What is on the CVS should support the Assabet board, as this is what Simics
> > emulate, however I have no clue on how to get FreeBSD on it, as Simics was
> > loading the kernel for me.
> > These days, I'm working with an IQ31244 (if you have an IQ80321, it should be
> > fine too). I cross-build the kernel on an i386 box (gcc/binutils in the base
> > does not support arm, but I provide patches for that), and use Redboot to
> > bootp, download the kernel via TFTP and run it (for some definition of run).
> 
>     Thanks for answers. Where could i get your patches(if it is
> possible, of course)?  Are devel/arm-elf-* ports is good enough for
> kernel  cross-building?
> 
> 

Patches against latest current are available here : (I've never try to apply
them since the gcc 3.4.2 import, so maybe it lacks something, so please let me
now if it doesn't work) :
http://people.FreeBSD.org/~cognet/contrib-arm.diff (to be applied in 
src/contrib).
http://people.FreeBSD.org/~cognet/gnu-arm.diff (to be applied in src/gnu,
beware you have to use patch -p and not just patch, as it creates directory).
Once done, you can compile binutils and gcc that way (fwiw I think you'll need
a gcc 3.4.2 on the host to be able to do that) :
(assuming you want to install the cross compiler in /usr/cross)
mkdir -p /usr/cross/usr/lib
mkdir -p /usr/cross/usr/share/man/man1
mkdir -p /usr/cross/usr/bin
mkdir -p /usr/cross/usr/share/info
touch /usr/cross/usr/lib/libc.a
cd /usr/src/gnu/usr.bin/cc && make TARGET_ARCH=arm DESTDIR=/usr/cross TOOLS_PREFIX=/usr/cross depend all install
cd /usr/src/gnu/usr.bin/binutils && make TARGET_ARCH=arm DESTDIR=/usr/cross TOOLS_PREFIX=/usr/cross depend all install
You will then have enough in /usr/cross to cross-compile a FreeBSD/arm kernel.
You can source the script at http://www.ci0.org/setarmcc to set the needed
environment variables.
About the devel/arm-elf* ports, I've never tried them, but I don't think they
will work, as they are really old.

Just out of curiosity, what board(s) do you have access to ?

Cheers,

Olivier



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