A couple of questions

Olivier Houchard cognet at ci0.org
Wed Aug 4 10:19:15 PDT 2004


On Wed, Aug 04, 2004 at 06:36:53PM +0300, Alexander Timoshenko wrote:
> Olivier Houchard (cognet at 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


More information about the freebsd-arm mailing list