wiki:RouterBoard493G

Introduction

  • Device : http://routerboard.com/RB493G
  • Mission : Install FreeBSD on it to run it as home router.
  • Reason : a) Energy consumption vs Performance: Low powered high specs device. b) Getting FreeBSD to run on MIPS based devices. c) Work with large amount of Ethernet ports.

Tech

  • AR7161 MIPS 24k (mips32r2) 680MHz PCI, GMII/RGMII/MII (GigE), UART, USB 2.0, PCM, I2S

References

Status

  • 30/01/2012 - Board is not booting yet.
  • 30/01/2012 - Building world/and kernel.
  • 31/01/2012 - Make sure to set the Boot Options to DHCP

/root/build-mips.csh

Helper script I use to build

brahm# cat /root/build-mips.csh 
setenv SRCROOT /usr/src-head
setenv TARGET mips
setenv TARGET_ARCH mipseb
setenv TARGET_CPUTYPE mips32
setenv KERNCONF AR71XX_BASE
setenv MAKEOBJDIRPREFIX /usr/obj/mips
set NFSROOT=/nfsroot/mipseb
set TFTPBOOT=/tftpboot/ar71xx


set MAKEFLAGS=(-DWITHOUT_CDDL           \
                -DWITHOUT_GAMES         \
                -DWITHOUT_DOCS          \
                -DWITHOUT_KERBEROS      \
                -DWITHOUT_ACPI          \
                -DWITHOUT_KERBEROS      \
                -DWITHOUT_RESCUE        \
                -DWITHOUT_MAN           \
                -DWITHOUT_PROFILE       \
                -DWITHOUT_BSNMP         \
                -DWITHOUT_NIS           \
                -DWITHOUT_IPX           \
                -DWITHOUT_ATM)

cd ${SRCROOT}
#make ${MAKEFLAGS} kernel-toolchain
#make ${MAKEFLAGS} buildworld
make ${MAKEFLAGS} buildkernel
make ${MAKEFLAGS} DESTDIR=${TFTPBOOT} installkernel


#make DESTDIR=${NFSROOT} ${MAKEFLAGS} installworld
#make DESTDIR=${NFSROOT} ${MAKEFLAGS} distrib-dirs 
#make DESTDIR=${NFSROOT} ${MAKEFLAGS} distribution
your choice: p - boot protocol

Choose which boot protocol to use:
   1 - bootp protocol
 * 2 - dhcp protocol
your choice: 2 - dhcp protocol
RouterBOOT booter 2.29

RouterBoard 493G

CPU frequency: 680 MHz
  Memory size: 256 MB

Press any key within 2 seconds to enter setup.

RouterBOOT-2.29
Board Info:

        Board type: 493G
     Serial number: 25E001744DD7
  Firmware version: 2.29
     CPU frequency: 680 MHz
       Memory size: 256 MB
        Build time: 2010-12-09 15:21:33
  eth1 MAC address: 00:0C:42:A9:15:60
  eth2 MAC address: 00:0C:42:A9:15:61
  eth3 MAC address: 00:0C:42:A9:15:62
  eth4 MAC address: 00:0C:42:A9:15:63
  eth5 MAC address: 00:0C:42:A9:15:64
  eth6 MAC address: 00:0C:42:A9:15:65
  eth7 MAC address: 00:0C:42:A9:15:66
  eth8 MAC address: 00:0C:42:A9:15:67
  eth9 MAC address: 00:0C:42:A9:15:68
RouterBOOT booter 2.29

RouterBoard 493G

CPU frequency: 680 MHz
  Memory size: 256 MB

Press any key within 2 seconds to enter setup..
trying dhcp protocol... OK
resolved mac address 00:16:0A:24:DA:5F
Gateway: 192.168.10.1
transfer started .......*....*......*.....*.......*.....*.......*. transfer ok, time=2.75s
setting up elf image... OK
jumping to kernel code
CPU platform: Atheros AR7161 rev 2
CPU Frequency=680 MHz
CPU DDR Frequency=340 MHz
CPU AHB Frequency=170 MHz
platform frequency: 680000000
arguments: 
  a0 = 00000008
  a1 = a0871c00
  a2 = 00000000
  a3 = 00000000
Cmd line: console=ttyS0,115200 gpio=4031 HZ=340000000 mem=256M kmac=00:0C:42:A9:15:60 board=493G boot=1 mlc=2
Environment:
envp is invalid
Cache info:
  picache_stride    = 4096
  picache_loopcount = 16
  pdcache_stride    = 4096
  pdcache_loopcount = 8
cpu0: MIPS Technologies processor v116.147
  MMU: Standard TLB, 16 entries
  L1 i-cache: 4 ways of 512 sets, 32 bytes per line
  L1 d-cache: 4 ways of 256 sets, 32 bytes per line
  Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG>
  Config3=0x20
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2012 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 10.0-CURRENT #0 r230787: Tue Jan 31 07:55:06 CET 2012
    root@brahm.vanderzwet.net:/usr/obj/mips/mips.mipseb/usr/src-head/sys/AR71XX_BASE mips
WARNING: WITNESS option enabled, expect reduced performance.
MEMGUARD DEBUGGING ALLOCATOR INITIALIZED:
	MEMGUARD map base: 0xc0400000
	MEMGUARD map limit: 0xc1800000
	MEMGUARD map size: 20480 KBytes
real memory  = 33554432 (32768K bytes)
avail memory = 25202688 (24MB)
random device not loaded; using insecure entropy
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> on nexus0
Timecounter "MIPS32" frequency 340000000 Hz quality 800
Event timer "MIPS32" frequency 340000000 Hz quality 800
apb0 at irq 4 on nexus0
uart0: <16550 or compatible> on apb0
uart0: console (115200,n,8,1)
gpio0: <Atheros AR71XX GPIO driver> on apb0
gpio0: [GIANT-LOCKED]
gpio0: gpio pinmask=0x0
gpioc0: <GPIO controller> on gpio0
gpiobus0: <GPIO bus> on gpio0
ehci0: <AR71XX Integrated USB 2.0 controller> at mem 0x1b000000-0x1bffffff irq 1 on nexus0
usbus0: set host controller mode
usbus0: EHCI version 1.0
usbus0: set host controller mode
usbus0: <AR71XX Integrated USB 2.0 controller> on ehci0
pcib0 at irq 0 on nexus0
pci0: <PCI bus> on pcib0
pci0: <old, non-VGA display device> at device 0.0 (no driver attached)
arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19000fff irq 2 on nexus0
arge0: No PHY specified, using mask 16
miibus0: <MII bus> on arge0
ukphy0: <Generic IEEE 802.3u media interface> PHY 4 on miibus0
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
arge0: Ethernet address: 00:0c:42:a9:15:60
arge1: <Atheros AR71xx built-in ethernet interface> at mem 0x1a000000-0x1a000fff irq 3 on nexus0
arge1: No PHY specified, using mask 15
arge1: Ethernet address: 00:0c:42:a9:15:61
spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0
spibus0: <spibus bus> on spi0
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
Unknown SPI flash device. Vendor: 00, device id: 0000
device_attach: mx25l0 attach returned 6
ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0
Timecounters tick every 1.000 msec
usbus0: 480Mbps High Speed USB v2.0
WARNING: WITNESS option enabled, expect reduced performance.
Root mount waiting for: usbus0
ugen0.1: <Atheros> at usbus0
uhub0: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
Root mount waiting for: usbus0
uhub0: 2 ports with 2 removable, self powered

Loader variables:

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:tank
        cd9660:/dev/acd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot> 
Last modified 5 years ago Last modified on Jan 31, 2012, 8:23:45 AM