From owner-freebsd-current@FreeBSD.ORG Mon Aug 11 14:49:35 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 016E3106566B; Mon, 11 Aug 2008 14:49:35 +0000 (UTC) (envelope-from antab@valka.is) Received: from vxout-1.c.is (vxout-1.c.is [213.176.128.13]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0D68FC20; Mon, 11 Aug 2008 14:49:34 +0000 (UTC) (envelope-from antab@valka.is) Received: from mail.internet.is (mail.aknet.is [193.4.194.58]) by vxout-1.c.is (Postfix) with ESMTP id 14084538E1B; Mon, 11 Aug 2008 14:49:25 +0000 (GMT) Received: from [192.168.1.127] (buttbuddies.cannabis.is [85.197.203.197]) by mail.internet.is (Postfix) with ESMTP id 52CE53A3C4; Mon, 11 Aug 2008 14:49:21 +0000 (CUT) Message-Id: <4E6DF728-C81C-43F9-B99C-12DD0BD4A570@valka.is> From: Arnar Mar Sig To: current@FreeBSD.org In-Reply-To: <20080809.214357.1707063132.imp@bsdimp.com> Content-Type: multipart/mixed; boundary=Apple-Mail-21--359207516 Mime-Version: 1.0 (Apple Message framework v926) Date: Mon, 11 Aug 2008 14:49:20 +0000 References: <67389BC1-FBD5-4D39-97CA-056FFC3B3B01@valka.is> <20080809.214357.1707063132.imp@bsdimp.com> X-Mailer: Apple Mail (2.926) X-Vodafone-MailScanner-Information: Virusskannad hja Vodafone X-Vodafone-MailScanner: Found to be clean - Enginn virus fannst X-Vodafone-MailScanner-SpamCheck: ekki ruslpostur, SpamAssassin (notcached, stigagjof=0, required 5, autolearn=disabled) X-MailScanner-From: antab@valka.is Cc: "Wojciech A. Koszek" , "M. Warner Losh" , Hans Petter Selasky Subject: Re: FreeBSD/AVR32 port X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 14:49:35 -0000 --Apple-Mail-21--359207516 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Attached are instruction how to get binutils, gcc and uboot mkimage for avr32 working on FreeBSD. Dont be put off by the avr32-linux target, the avr32 target is broken or at last i haven't been able to get it working, and it dosen't matter because no linux specific code is included in the end. I have no intrest in trying to get the toolchain into the freebsd tree until Atmel has submitted they're changes upstream, and the fact that some Atmel gcc patches seem to break other arch builds. I will post patches for FreeBSD/AVR32 later today. --Apple-Mail-21--359207516 Content-Disposition: attachment; filename=build-avr32-gcc.txt Content-Type: text/plain; x-unix-mode=0644; name="build-avr32-gcc.txt" Content-Transfer-Encoding: 7bit Assuming all files are downloaded to the same folder and toolchain will be installed to /crosstools and that /crosstools/bin is in you PATH. At the moment i got a hardcoded paths to /crosstools to build the kernel. Downloads for binutils: http://avr32linux.org/twiki/pub/Main/BinutilsPatches/binutils-2.17.atmel.1.2.6.tar.bz2 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD Downloads for gcc: http://avr32linux.org/twiki/pub/Main/GccPatches/gcc-4.2.2.atmel.1.0.8.tar.bz2 http://avr32linux.org/twiki/pub/Main/GccPatches/901-avr32-fix-no-cond-exec-before-reload.patch http://avr32linux.org/twiki/pub/Main/GccPatches/902-avr32-fix-sync-insn-instructions.patch http://avr32linux.org/twiki/pub/Main/GccPatches/903-avr32-fix-removal-of-redundant-cast-operations.patch Download for uboot: http://avr32linux.org/twiki/pub/Main/UbootPatches/u-boot-1.3.1.atmel.1.tar.bz2 Building bintuils: $ tar xvjf binutils-2.17.atmel.1.2.6.tar.bz2 Move config.sub and config.guess into binutils-2.17.atmel.1.2.6/ $ mkdir binutils-build $ cd binutils-build $ ../binutils-2.17.atmel.1.2.6/configure --target=avr32-linux --prefix=/crosstools $ gmake $ gmake install Building gcc: $ tar xvjf gcc-4.2.2.atmel.1.0.8.tar.bz2 $ cd gcc-4.2.2.atmel.1.0.8 $ patch -p1 < ../901-avr32-fix-no-cond-exec-before-reload.patch $ patch -p1 < ../902-avr32-fix-sync-insn-instructions.patch $ patch -p1 < ../903-avr32-fix-removal-of-redundant-cast-operations.patch $ cd .. $ mkdir gcc-build $ cd gcc-build $ ../gcc-4.2.2.atmel.1.0.8/configure --target=avr32-linux --prefix=/crosstools --with-gmp=/usr/local --with-mpfr=/usr/local --enable-shared --disable-nls --with-system-zlib --disable-threads --enable-languages=c --disable-libmudflap --disable-libssp --disable-libgomp $ gmake $ gmake install Building uboot: $ tar xvjf u-boot-1.3.1.atmel.1.tar.bz2 $ cd u-boot-1.3.1.atmel.1 $ gmake atngw100_config It will probably fail with some linking errors, it dosen't matter if tools/mkimage has been built. $ cp tools/mkimage /crosstools/bin Other: GDB can be built on freebsd but it dosen't do you any good at the moment, you still need avr32gdbproxy to use JTAG, and that app is closed source and only avilable for linux and windows. Maybe it works with the linux emulation, but i haven't been able to get it working on amd64 (only 32bit binaries avilable, but 64bit binaries are one the way). If you wanna try then the avr32gdbproxy app is avilable from atmels site (included in the toolchain packages) and more info about how to use it on: http://avr32linux.org/twiki/bin/view/Main/KernelDebugging --Apple-Mail-21--359207516 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Greets Arnar Mar Sig Valka ehf --Apple-Mail-21--359207516--