-
Notifications
You must be signed in to change notification settings - Fork 59
Atheros Reference AP93
The Atheros AP93 is an AR7240 MIPS24k SoC enterprise reference design.
It has:
- AR7240 SoC, 400MHz
- 64MB RAM
- 16MB NOR flash
- USB 2.0 EHCI port
- on-chip 10/100 ethernet switch (LAN ports)
- 10/100/1000 WAN port
- AR9280 2x2 2GHz wifi NIC
The flash layout is a little odd. FreeBSD will fit fine on the board; it's easiest to just put a combined image onto the board and then reconfigure the boot command environment variable.
ar7240> setenv ipaddr 192.168.2.169 ar7240> setenv serverip 192.168.2.12 ar7240> tftpboot 0x80050000 ap93.flashinst.img Trying eth0 eth0 link down FAIL Trying eth1 dup 1 speed 1000 Using eth1 device TFTP from server 192.168.2.12; our IP address is 192.168.2.169 Filename 'ap93.flashinst.img'. Load address: 0x80050000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################# done Bytes transferred = 7134208 (6cdc00 hex) ar7240> erase 0xbf080000 +0x00800000 Erase Flash from 0xbf080000 to 0xbf87ffff in Bank # 1C First 0x8 last 0x87 sector size 0x10000 135 Erased 128 sectors ar7240> cp.b 0x80050000 0xbf080000 $filesize Copy to Flash... write addr: bf080000 done ar7240> setenv bootcmd='bootm 0xbf080000' ar7240> printenv bootdelay=4 baudrate=115200 ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee bootargs=console=ttyS0,115200 root=31:04 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),256k(u-boot-env),3072k(spare-rootfs),1024k(spare-uImage),3072k(rootfs),1024k(uImage),64k(mib0),64k(mib1),4096k(ct),3392k(var),64k(ART) stdin=serial stdout=serial stderr=serial ethact=eth1 filesize=6cdc00 fileaddr=80050000 ipaddr=192.168.2.169 serverip=192.168.2.12
Boot example:
ar7240> reset
Resetting...
U-Boot 1.1.4 (Dec 2 2009 - 17:59:01)
AP93 Home Gateway (ar7240) U-boot DRAM: sri ar7240_ddr_initial_config(145): python ddr init 64 MB Top of RAM usable for U-Boot at: 84000000 Reserving 264k for U-Boot at: 83fbc000 Reserving 192k for malloc() at: 83f8c000 Reserving 44 Bytes for Board Info at: 83f8bfd4 Reserving 36 Bytes for Global Data at: 83f8bfb0 Reserving 128k for boot params() at: 83f6bfb0 Stack Pointer at: 83f6bf98 Now running in RAM - U-Boot at: 83fbc000 id read 0x100000ff flash size 16777216, sector count = 256 Flash: 16 MB In: serial Out: serial Err: serial Net: ag7240_enet_initialize... Fetching MAC Address from 0x83fe9ff0 Fetching MAC Address from 0x83fe9ff0 : cfg1 0xf cfg2 0x7014 eth0: 00:03:7f:11:e5:08 eth0 up : cfg1 0xf cfg2 0x7214 eth1: 00:03:7f:11:e5:09 ATHRS26: resetting s26 ATHRS26: s26 reset done eth1 up eth0, eth1 findbdr flashaddr 0x0. Failed to find a good BDR at seq 0x0. Hit any key to stop autoboot: 0
Image Name: FreeBSD Created: 2017-05-25 6:49:49 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1246349 Bytes = 1.2 MB Load Address: 80050000 Entry Point: 80050100 Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd
Starting kernel ...
CPU platform: Atheros AR7240 rev 2 CPU Frequency=400 MHz CPU DDR Frequency=400 MHz CPU AHB Frequency=200 MHz platform frequency: 400 MHz CPU reference clock: 5 MHz CPU MDIO clock: 5 MHz arguments: a0 = 00000007 a1 = a3f6bfb0 a2 = a3f6c4b0 a3 = 00000010 Cmd line:argv is invalid Environment: envp is invalid Cache info: picache_stride = 4096 picache_loopcount = 16 pdcache_stride = 4096 pdcache_loopcount = 8 max line size = 32 cpu0: MIPS Technologies processor v116.147 MMU: Standard TLB, 16 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes) L1 i-cache: 4 ways of 512 sets, 32 bytes per line L1 d-cache: 4 ways of 256 sets, 32 bytes per line L2 cache: disabled Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG> Config2=0x80000000 Config3=0x20 Config7=0x0 Physical memory chunk(s): 0x48c000 - 0x3ffffff, 62341120 bytes (15220 pages) Maxmem is 0x4000000 KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2017 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-CURRENT #8 r318860M: Wed May 24 23:49:34 PDT 2017 adrian@test-2:/usr/home/adrian/work/freebsd/head-embedded/obj/mips_ap/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/sys/AP93 mips gcc version 6.3.0 (FreeBSD Ports Collection for mips) WARNING: WITNESS option enabled, expect reduced performance. MEMGUARD DEBUGGING ALLOCATOR INITIALIZED: MEMGUARD map base: 0xc0800000 MEMGUARD map size: 104860 KBytes Preloaded elf kernel "kernel" at 0x80486234. real memory = 67108864 (65536K bytes) Physical memory chunk(s): 0x00520000 - 0x03ebafff, 60403712 bytes (14747 pages) avail memory = 53288960 (50MB) arc4random: no preloaded entropy cache mem: null: <full device, null device, zero device> nexus0: random: harvesting attach, 8 bytes (4 bits) from nexus0 argemdio0: <Atheros AR71xx built-in ethernet interface, MDIO controller> at mem 0x19000000-0x19000fff on nexus0 mdio0: on argemdio0 mdioproxy0: <MII/MDIO proxy, MDIO side> on mdio0 random: harvesting attach, 8 bytes (4 bits) from mdioproxy0 arswitch0: <Atheros AR7240 Ethernet Switch (ver 0 rev 0)> on mdio0 miibus0: on arswitch0 ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0 ukphy0: OUI 0x00c82e, model 0x0004, rev. 1 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy0 random: harvesting attach, 8 bytes (4 bits) from miibus0 miibus1: on arswitch0 ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus1 ukphy1: OUI 0x00c82e, model 0x0004, rev. 1 ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy1 random: harvesting attach, 8 bytes (4 bits) from miibus1 miibus2: on arswitch0 ukphy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus2 ukphy2: OUI 0x00c82e, model 0x0004, rev. 1 ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy2 random: harvesting attach, 8 bytes (4 bits) from miibus2 miibus3: on arswitch0 ukphy3: <Generic IEEE 802.3u media interface> PHY 3 on miibus3 ukphy3: OUI 0x00c82e, model 0x0004, rev. 1 ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy3 random: harvesting attach, 8 bytes (4 bits) from miibus3 etherswitch0: on arswitch0 random: harvesting attach, 8 bytes (4 bits) from etherswitch0 mdio1: on arswitch0 mdioproxy1: <MII/MDIO proxy, MDIO side> on mdio1 random: harvesting attach, 8 bytes (4 bits) from mdioproxy1 random: harvesting attach, 8 bytes (4 bits) from mdio1 random: harvesting attach, 8 bytes (4 bits) from arswitch0 random: harvesting attach, 8 bytes (4 bits) from mdio0 random: harvesting attach, 8 bytes (4 bits) from argemdio0 clock0: on nexus0 Timecounter "MIPS32" frequency 200000000 Hz quality 800 Event timer "MIPS32" frequency 200000000 Hz quality 800 random: harvesting attach, 8 bytes (4 bits) from clock0 apb0 at irq 4 on nexus0 uart0: <16550 or compatible> at mem 0x18020003-0x1802001a irq 3 on apb0 uart0: console (115200,n,8,1) uart0: fast interrupt uart0: PPS capture mode: DCD random: harvesting attach, 8 bytes (4 bits) from uart0 random: harvesting attach, 8 bytes (4 bits) from apb0 pcib0 at irq 0 on nexus0 pcib0: ar724x_pci_slot_fixup: checking dev pcib0, 0/0/0 pcib0: found EEPROM at 0x1fff1000 on 0.0.0 0x00006000=0x29168c 0x00006008=0x2800001 0x0000602c=0xa093168c 0x00005000=0x2a168c 0x00005008=0x2800001 0x0000502c=0xa093168c 0x00005064=0x5040cc0 0x0000506c=0x33811 0x00004004=0x40073b 0x00004074=0x0003 0x00004000=0x1c25001 0x00006034=0x0044 pcib0: EEPROM firmware: 0x1fff1000 @ 4096 bytes firmware: 'pcib.0.bus.0.0.0.eeprom_firmware' version 1: 4096 bytes loaded at 0xc6ee6000 pcib0: device EEPROM 'pcib.0.bus.0.0.0.eeprom_firmware' registered pci0: on pcib0 pci0: domain=0, physical bus=0 found-> vendor=0x168c, dev=0xff1c, revid=0x01 domain=0, bus=0, slot=0, func=0 class=02-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0146, statreg=0x0010, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=255 powerspec 2 supports D0 D1 D3 current D0 MSI supports 1 message MSI-X supports 1 message in map 0x10 map[10]: type Memory, range 64, base 0, size 16, enabled pci0: <network, ethernet> at device 0.0 (no driver attached) random: harvesting attach, 8 bytes (4 bits) from pci0 random: harvesting attach, 8 bytes (4 bits) from pcib0 arge0: at mem 0x19000000-0x19000fff irq 2 on nexus0 arge0: Generating random ethernet address. miiproxy0: <MII/MDIO proxy, MII side> on arge0 random: harvesting attach, 8 bytes (4 bits) from miiproxy0 miiproxy0: attached to target mdio1 arge0: finishing attachment, phymask 0010, proxy set miibus4: on miiproxy0 ukphy4: <Generic IEEE 802.3u media interface> PHY 4 on miibus4 ukphy4: OUI 0x00c82e, model 0x0004, rev. 1 ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy4 random: harvesting attach, 8 bytes (4 bits) from miibus4 arge0: bpf attached arge0: Ethernet address: 62:73:64:a0:d5:9e random: harvesting attach, 8 bytes (4 bits) from arge0 arge1: at mem 0x1a000000-0x1a000fff irq 3 on nexus0 arge1: Generating random ethernet address. mii_attach_proxy: not attaching, no mdio device hint for arge1 arge1: finishing attachment, phymask 0000, proxy null arge1: bpf attached arge1: Ethernet address: 62:73:64:d8:e2:89 random: harvesting attach, 8 bytes (4 bits) from arge1 spi0: at mem 0x1f000000-0x1f00000f on nexus0 spibus0: on spi0 mx25l0: at cs 0 mode 0 on spibus0 mx25l0: s25fl128, sector 65536 bytes, 256 sectors random: harvesting attach, 8 bytes (4 bits) from mx25l0 random: harvesting attach, 8 bytes (4 bits) from spibus0 random: harvesting attach, 8 bytes (4 bits) from spi0 ar71xx_wdog0: on nexus0 ar71xx_wdog0: Previous reset was due to watchdog timeout random: harvesting attach, 8 bytes (4 bits) from ar71xx_wdog0 Device configuration finished. Timecounters tick every 1.000 msec lo0: bpf attached tcp_init: net.inet.tcp.tcbhashsize auto tuned to 1024 arswitch0port1: link state changed to DOWN arswitch0port2: link state changed to DOWN arswitch0port3: link state changed to DOWN arswitch0port4: link state changed to DOWN GEOM: new disk flash/spi0 MAP: flash/spi0: 0x40000, data=0x40000 "/dev/map/uboot" MAP: flash/spi0: 40000x40000, data=0x40000 "/dev/map/uboot-env" MAP: search flash/spi0 for key ".!/bin/sh" from 0x80000, step 0x10000 MAP: flash/spi0: 80000x140000, data=0x140000 "/dev/map/kernel" MAP: search flash/spi0 for key ".!/bin/sh" from 0x80000, step 0x10000 MAP: flash/spi0: 1c0000x6c0000, data=0x6c0000 "/dev/map/rootfs" MAP: flash/spi0: 880000x10000, data=0x10000 "/dev/map/cfg" MAP: flash/spi0: 890000x10000, data=0x10000 "/dev/map/mib1" MAP: flash/spi0: 8a0000x400000, data=0x400000 "/dev/map/ct" MAP: flash/spi0: ca0000x350000, data=0x350000 "/dev/map/var" MAP: flash/spi0: ff0000x10000, data=0x10000 "/dev/map/ART" MAP: No valid partition found at map/rootfs.uzip WARNING: WITNESS option enabled, expect reduced performance. Trying to mount root from ufs:/dev/map/rootfs.uzip []... warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init arswitch0: arswitch_miipollstat: port 1: port -> UP arswitch0port2: link state changed to UP load: 1.63 cmd: init 20 [biord] 3.93r 0.00u 0.03s 0% 768k May 25 06:49:58 init: login_getclass: unknown class 'daemon' *** Mounting /tmp, /var, /etc ... ...