Skip to content

Atheros ReferenceAP96

Sean Bruno edited this page May 22, 2014 · 1 revision

Atheros AP96 Reference board

Introduction

The Atheros AP96 is an AR7161 based, dual-AR9280 (2GHz + 5GHz) reference design.

Hardware

  • AR7161, 680MHz
  • 64MB RAM
  • 8MB SPI flash
  • 1 x AR8316 10/100/1000BaseT ethernet switch
  • 2 x USB ports
  • 1 x AR9280 5GHz NIC
  • 1 x AR9283 2GHz NIC

Mini-PCI+

The Mini-PCI+ slot is designed for a specific development NIC which featured two AR9220 chips on one Mini-PCI slot. The slot works fine for normal Atheros Mini-PCI NICs.

Software

  • uboot bootloader

Flash layout

The default flash layout is:

  • uboot: 192k
  • env: 64k
  • rootfs: 6144k
  • uimage (kernel): 1728k
  • ART: 64k

To store the configuration, the PB47.hints file defines rootfs as 6080k and a 64k "cfg" partition:

  • uboot: 192k
  • env: 64k
  • rootfs: 6080k
  • cfg: 64k
  • uimage (kernel): 1728k
  • ART: 64k

Booting

(TODO)

Default environment:

(TODO)

The length of the filesystem is 64K shorter than above, ie 0x5ff000 rather than 0x600000.

Building

FreeBSD-HEAD has the required code and kernel configuration file (sys/mips/conf/AP96.) The build system scripts are just used to build a copy of the software.

Note: Unless you're running a FreeBSD-HEAD snapshot, you'll need to compile/install mkulzma from FreeBSD-HEAD. Just "cd /path/to/head/src/usr.bin/mkulzma/ && make && make install && make clean" as root.

/path/to/build ap96 buildworld buildkernel installworld installkernel distribution mfsroot fsimage uboot

Please note that the fsimage build will generate a ulzma filesystem image and this can take quite a long time!

This will generate:

  • /tftpboot/kernel.AP96: netbootable kernel, root from flash
  • /tftpboot/kernel.AP96.lzma.uImage : uImage version of the kernel, suitable for booting
  • /tftpboot/mfsroot-ap96.img.uzip: filesystem image

Flashing

Flashing kernel:

ar7100> setenv ipaddr 192.168.1.10
ar7100> setenv serverip 192.168.1.16
ar7100> tftp 0x80010000 kernel.AP96.lzma.uImage
Trying eth0
eth0 link down
FAIL
Trying eth1
Using eth1 device
TFTP from server 192.168.1.16; our IP address is 192.168.1.10
Filename 'kernel.AP96.lzma.uImage'.
Load address: 0x80010000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##############
done
Bytes transferred = 1400707 (155f83 hex)
ar7100> erase 0xbf640000 +0x1b0000
Erase Flash from 0xbf640000 to 0xbf7effff in Bank # 1 
First 0x64 last 0x7e sector size 0x10000                                                                               126
Erased 27 sectors
ar7100> cp.b 0x80010000 0xbf640000 0x1b0000
Copy to Flash... write addr: bf640000
done
ar7100> 

Flashing rootfs:

ar7100> tftp 0x80010000 mfsroot-ap96.img.uzip
Trying eth0
eth0 link down
FAIL
Trying eth1
Using eth1 device
TFTP from server 192.168.1.16; our IP address is 192.168.1.10Filename 'mfsroot-ap96.img.uzip'.Load address: 0x80010000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #######################################
done
Bytes transferred = 3858944 (3ae200 hex)
ar7100> erase 0xbf040000 +0x5f0000
Erase Flash from 0xbf040000 to 0xbf63ffff in Bank # 1
First 0x4 last 0x62 sector size 0x10000                                                                                 98
Erased 95 sectors                                                                                                         
ar7100> cp.b 0x80010000 0xbf040000 0x5f0000
Copy to Flash... write addr: bf040000
done

Configuring

(todo)

Issues/TODO

  • The system MAC needs to be read from the uboot environment and used at system boot.

FreeBSD boot example

(TODO)