FreeBSD/AVR32 port
Arnar Mar Sig
antab at valka.is
Mon Aug 11 14:49:35 UTC 2008
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.
-------------- next part --------------
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
-------------- next part --------------
Greets
Arnar Mar Sig
Valka ehf
More information about the freebsd-current
mailing list