Project

General

Profile

WZR-HP-AG300H » History » Version 3

« Previous - Version 3/5 (diff) - Next » - Current version
Alexey Trenikhin, 10/10/2012 03:16 PM


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