This is an old revision of the document!


AVR32

:!: This effort is out of date and won't work with the latest version of FreeBSD

:!: AVR discontinued the AVR32 architecture development

AVR32 is a 32 bit RISC architecture from Atmel designed for high throughput with low power consumption. This port targets the bigger AP7 chips.

NGW100 boots to single user mode

  • Booting kernel with tftp
  • Mounting rootfs from onboard flash (cfi) or using nfs
  • Can execute statically linked commands in single user mode
  • Dynamic linking (binutils bug?)
  • Lots of other stuff
#!/bin/sh

export SRCROOT=/src/FreeBSD/p4/avr32/src
export TARGET_ARCH=avr32
export TARGET=avr32
export TARGET_CPUTYPE=avr32
export KERNCONF=NGW100
export MAKEOBJDIRPREFIX=/src/FreeBSD/obj/avr32
export TFTPBOOT=/src/FreeBSD/tftpboot

make WITHOUT_GDB=yes kernel-toolchain

make NO_MODULES=yes buildkernel
KERNOBJDIR=$MAKEOBJDIRPREFIX/$TARGET_ARCH.$TARGET_ARCH/$SRCROOT/sys/$KERNCONF
OBJCOPY=$MAKEOBJDIRPREFIX/$TARGET_ARCH.$TARGET_ARCH/$SRCROOT/tmp/usr/bin/objcopy
$OBJCOPY -O binary $KERNOBJDIR/kernel $KERNOBJDIR/kernel.binary
mkimage -A avr32 -O freebsd -a 0x90000000 -e 0x90000000 -n 'FreeBSD' \
    -T kernel -C none -d $KERNOBJDIR/kernel.binary $TFTPBOOT/kernel.uboot

mkimage is a part of uboot package (devel/u-boot port)

U-boot 1.3 or later is required to boot. Update instructions and binaries can be found at http://www.atmel.no/buildroot/buildroot-u-boot.html

Only tested why of booting is using tftp, dhcpd and nfs. * Setup isc-dhcpd and add the following entry:

host ngw {
        hardware ethernet <board mac address>;
        option root-path "<nfs server>:<avr32 root>";
        next-server <tfpd server>;
        filename "kernel.uboot";
}
  • Board mac address can be found by typing 'printenv ethaddr' in u-boot
  • Enable nfsd and add line for <avr32 root> to /etc/exports
  • Enable tftpd in inetd.conf, modify -s parameter to point to directory with AVR32 kernels

To boot, type: 'dhcp; bootm' in u-boot.


  • avr32.1567842867.txt.gz
  • Last modified: 2019/09/07 07:54
  • by LorenzoSalvadore