Project

General

Profile

WZR-HP-AG300H » History » Version 4

« Previous - Version 4/5 (diff) - Next » - Current version
Alexey Trenikhin, 10/10/2012 11:00 PM
added dmesg output


WZR-HP-AG300H

  • Get zrouter and zrouter's FreeBSD source trees as described in Quickstart
  • Copy zrouter/boards/D-Link/DIR-825/* to zrouter/boards/Buffalo/WZR-HP-AG300H
  • Edit zrouter/boards/Buffalo/WZR-HP-AG300H/boards.hints
    • hint.map.* (GEOM MAP)
      hint.map.0.at="flash/spi0" 
      hint.map.0.start=0x00000000
      hint.map.0.end=0x00040000
      hint.map.0.name="bootloader" 
      hint.map.0.readonly=1
      
      hint.map.1.at="flash/spi0" 
      hint.map.1.start=0x00040000
      hint.map.1.end=0x00050000
      hint.map.1.name="bootloader-env" 
      hint.map.1.readonly=1
      
      hint.map.2.at="flash/spi0" 
      hint.map.2.start=0x00050000
      hint.map.2.end=0x00060000
      hint.map.2.name="art" 
      hint.map.2.readonly=1
      
      hint.map.3.at="flash/spi0" 
      hint.map.3.start=0x00060000
      hint.map.3.end=0x007c0000
      hint.map.3.name="upgrade" 
      
      hint.map.4.at="flash/spi0" 
      hint.map.4.start=0x00060000
      hint.map.4.end="search:0x00100000:0x10000:.!/bin/sh" 
      hint.map.4.name="kernel" 
      
      hint.map.5.at="flash/spi0" 
      hint.map.5.start="search:0x00100000:0x10000:.!/bin/sh" 
      hint.map.5.end=0x007c0000
      hint.map.5.name="rootfs" 
      
      hint.map.6.start=0x007c0000
      hint.map.6.end=0x007f0000
      hint.map.6.name="config" 
      #hint.map.6.readonly=1
      
    • Edit zrouter/boards/Buffalo/WZR-HP-AG300H/board.mk
      Specify board flash size
      BOARD_FLASH_SIZE=32M
      

      Specify board memory
      # Board have 128M of RAM
      KERNCONF_OPTIONS+=    AR71XX_REALMEM=128*1024*1024
      

      Set maximum firmware size
      # Image must not be biggest than GEOM_MAP_P2 (upgrade part.)
      FIRMWARE_IMAGE_SIZE_MAX=0x00760000
      
  • Build
    • make TARGET_PAIR=Buffalo/WZR-HP-AG300H. This will produce Buffalo_WZR-HP-AG300H.zimage under $OBJ_DIR/...
    • Prepare TFTP image. I have used buffaulo-tftp utility from OpenWRT (in future should be included into build)
      (echo -n "# Airstation FirmWareNrun u_fwNresetNN" | tr "N" "\012" | dd bs=512 count=1 conv=sync; dd if=Buffalo_WZR-HP-AG300H.zimage) > tftp.tmp
      buffalo-tftp -i tftp.tmp -o Buffalo_WZR-HP-AG300H-tftp.bin
      

      Resulting Buffalo_WZR-HP-AG300H-tftp.bin can be flashed via tftp. (I believe Buffalo_WZR-HP-AG300H.zimage can be flashed via OpenWRT upgrade utility, but I never tried)
  • flash

*dmesg


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: Mon Sep 24 20:47:24 PDT 2012
    alexey@panic:/home/alexey/ZRouter/obj/usr/home/alexey/ZRouter/zrouter/tmp/mips.mips/usr/home/alexey/ZRouter/FreeBSD/head/sys/home/alexey/ZRouter/obj/usr/home/alexey/ZRouter/zrouter/conf/Buffalo_WZR-HP-AG300H mips
real memory  = 134217728 (131072K bytes)
avail memory = 124792832 (119MB)
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
cryptosoft0: <software crypto> on nexus0
apb0 at irq 4 on nexus0
uart0: <16550 or compatible> on apb0
uart0: console (115200,n,8,1)
ohci0: <AR71XX integrated OHCI controller> on apb0
usbus0 on ohci0
gpio0: <Atheros AR71XX GPIO driver> on apb0
gpio0: [GIANT-LOCKED]
gpio0: gpio pinmask=0xfff
gpiobus0: <GPIO bus> on gpio0
gpiobus0: GPIO device with 12 pins
gpioled0: Use pinmask=0x00000001
gpioled1: Use pinmask=0x00000002
gpioled2: Use pinmask=0x00000800
gpiobutton0: Use pinmask=0x00001000
gpiobutton0: invalid pin 12, max: 11
Mapped pin 0 is not owned by child "gpiobutton0" 
gpioc0: <GPIO controller> at pin(s) 0-11 on gpiobus0
gpioled0: <GPIO led> at pin(s) 0 on gpiobus0
gpioled0: /dev/led/wps flags=0102
gpioled1: <GPIO led> at pin(s) 1 on gpiobus0
gpioled1: /dev/led/status flags=0102
gpioled2: <GPIO led> at pin(s) 11 on gpiobus0
gpioled2: /dev/led/usb flags=0102
ehci0: <AR71XX Integrated USB 2.0 controller> at mem 0x1b000000-0x1bffffff irq 1 on nexus0
usbus1: set host controller mode
usbus1: EHCI version 1.0
usbus1: set host controller mode
usbus1 on ehci0
pcib0 at irq 0 on nexus0
pcib0: found EEPROM at 0x1fff1000 on 0.17.0
pcib0: EEPROM firmware: 0x1fff1000 @ 4096 bytes
pcib0: device EEPROM 'pcib.0.bus.0.17.0.eeprom_firmware' registered
pcib0: found EEPROM at 0x1fff5000 on 0.18.0
pcib0: EEPROM firmware: 0x1fff5000 @ 4096 bytes
pcib0: device EEPROM 'pcib.0.bus.0.18.0.eeprom_firmware' registered
pci0: <PCI bus> on pcib0
pci0: <network, ethernet> at device 17.0 (no driver attached)
pci0: <network, ethernet> at device 18.0 (no driver attached)
arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19000fff irq 2 on nexus0
miibus0: <MII bus> on arge0
floatphy0 PHY 0 on miibus0
floatphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX, 1000baseSX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
arge0: Ethernet address: 62:73:64:dd:57:14
arge1: <Atheros AR71xx built-in ethernet interface> at mem 0x1a000000-0x1a000fff irq 3 on nexus0
miibus1: <MII bus> on arge1
floatphy1 PHY 0 on miibus1
floatphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX, 1000baseSX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
arge1: Ethernet address: 62:73:64:7c:34:b5
spi0: <AR71XX SPI> at mem 0x1f000000-0x1fffffff on nexus0
spibus0: <spibus bus> on spi0
mx25l0: <M25Pxx Flash Family> at cs 0 mode 0 on spibus0
mx25l0: mx25ll128, sector 65536 bytes, 256 sectors
ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ugen0.1: <Atheros> at usbus0
uhub0: <Atheros OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Atheros> at usbus1
uhub1: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
map/rootfs.uncompress: GEOM_ULZMA image found
map/rootfs.uncompress: 357 x 65536 blocks
Root mount waiting for: usbus1 usbus0
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
Trying to mount root from cd9660:/dev/map/rootfs.uncompress []...
warning: no time-of-day clock registered, system time will not be set accurately
gpio0: Will report interrupt on pin 10
WARNING: attempt to domain_add(netgraph) after domainfinalize()
lan0: link state changed to UP
bridge0: Ethernet address: f2:f6:c1:a8:d0:dd
lan0: promiscuous mode enabled
bridge0: link state changed to UP
KLD ng_ipfw.ko: depends on ipfw - not available or version mismatch
linker_load_file: Unsupported file type
wan0: link state changed to UP
/tmp: optimization changed from SPACE to TIME