From owner-freebsd-arm@FreeBSD.ORG Wed Aug 4 17:19:15 2004 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65B6C16A4CE for ; Wed, 4 Aug 2004 17:19:15 +0000 (GMT) Received: from dong.ci0.org (cognet.ci0.org [80.65.224.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51FAB43D5C for ; Wed, 4 Aug 2004 17:19:14 +0000 (GMT) (envelope-from doginou@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.12.11/8.12.11) with ESMTP id i74HjAeZ084233; Wed, 4 Aug 2004 19:45:10 +0200 (CEST) (envelope-from doginou@dong.ci0.org) Received: (from doginou@localhost) by dong.ci0.org (8.12.11/8.12.11/Submit) id i74HjA5H084232; Wed, 4 Aug 2004 19:45:10 +0200 (CEST) (envelope-from doginou) Date: Wed, 4 Aug 2004 19:45:10 +0200 From: Olivier Houchard To: Alexander Timoshenko Message-ID: <20040804174510.GB83850@ci0.org> References: <20040804115115.GA39676@univ.kiev.ua> <20040804155300.GA82096@ci0.org> <20040804153653.GA63512@univ.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040804153653.GA63512@univ.kiev.ua> User-Agent: Mutt/1.4.1i cc: freebsd-arm@freebsd.org Subject: Re: A couple of questions X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.1 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, 04 Aug 2004 17:19:15 -0000 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