Project

General

Profile

WZR-HP-AG300H » History » Version 3

Alexey Trenikhin, 10/10/2012 03:16 PM

1 1 Alexey Trenikhin
h1. WZR-HP-AG300H
2 1 Alexey Trenikhin
3 3 Alexey Trenikhin
* Get zrouter and zrouter's FreeBSD source trees as described in [[Quickstart]] 
4 1 Alexey Trenikhin
* Copy zrouter/boards/D-Link/DIR-825/* to zrouter/boards/Buffalo/WZR-HP-AG300H
5 1 Alexey Trenikhin
* Edit zrouter/boards/Buffalo/WZR-HP-AG300H/boards.hints
6 1 Alexey Trenikhin
** hint.map.* (GEOM MAP)
7 1 Alexey Trenikhin
<pre>
8 2 Alexey Trenikhin
hint.map.0.at="flash/spi0"
9 2 Alexey Trenikhin
hint.map.0.start=0x00000000
10 2 Alexey Trenikhin
hint.map.0.end=0x00040000
11 2 Alexey Trenikhin
hint.map.0.name="bootloader"
12 2 Alexey Trenikhin
hint.map.0.readonly=1
13 2 Alexey Trenikhin
14 2 Alexey Trenikhin
hint.map.1.at="flash/spi0"
15 2 Alexey Trenikhin
hint.map.1.start=0x00040000
16 2 Alexey Trenikhin
hint.map.1.end=0x00050000
17 2 Alexey Trenikhin
hint.map.1.name="bootloader-env"
18 2 Alexey Trenikhin
hint.map.1.readonly=1
19 2 Alexey Trenikhin
20 2 Alexey Trenikhin
hint.map.2.at="flash/spi0"
21 2 Alexey Trenikhin
hint.map.2.start=0x00050000
22 2 Alexey Trenikhin
hint.map.2.end=0x00060000
23 2 Alexey Trenikhin
hint.map.2.name="art"
24 2 Alexey Trenikhin
hint.map.2.readonly=1
25 2 Alexey Trenikhin
26 2 Alexey Trenikhin
hint.map.3.at="flash/spi0"
27 2 Alexey Trenikhin
hint.map.3.start=0x00060000
28 2 Alexey Trenikhin
hint.map.3.end=0x007c0000
29 2 Alexey Trenikhin
hint.map.3.name="upgrade"
30 2 Alexey Trenikhin
31 2 Alexey Trenikhin
hint.map.4.at="flash/spi0"
32 2 Alexey Trenikhin
hint.map.4.start=0x00060000
33 2 Alexey Trenikhin
hint.map.4.end="search:0x00100000:0x10000:.!/bin/sh"
34 2 Alexey Trenikhin
hint.map.4.name="kernel"
35 2 Alexey Trenikhin
36 2 Alexey Trenikhin
hint.map.5.at="flash/spi0"
37 2 Alexey Trenikhin
hint.map.5.start="search:0x00100000:0x10000:.!/bin/sh"
38 2 Alexey Trenikhin
hint.map.5.end=0x007c0000
39 2 Alexey Trenikhin
hint.map.5.name="rootfs"
40 2 Alexey Trenikhin
41 2 Alexey Trenikhin
hint.map.6.start=0x007c0000
42 2 Alexey Trenikhin
hint.map.6.end=0x007f0000
43 2 Alexey Trenikhin
hint.map.6.name="config"
44 2 Alexey Trenikhin
#hint.map.6.readonly=1
45 1 Alexey Trenikhin
</pre>
46 1 Alexey Trenikhin
** Edit zrouter/boards/Buffalo/WZR-HP-AG300H/board.mk
47 3 Alexey Trenikhin
Specify board flash size
48 3 Alexey Trenikhin
<pre>
49 3 Alexey Trenikhin
BOARD_FLASH_SIZE=32M
50 3 Alexey Trenikhin
</pre>
51 3 Alexey Trenikhin
Specify board memory
52 3 Alexey Trenikhin
<pre>
53 3 Alexey Trenikhin
# Board have 128M of RAM
54 3 Alexey Trenikhin
KERNCONF_OPTIONS+=	AR71XX_REALMEM=128*1024*1024
55 3 Alexey Trenikhin
</pre>
56 3 Alexey Trenikhin
Set maximum firmware size
57 3 Alexey Trenikhin
<pre>
58 3 Alexey Trenikhin
# Image must not be biggest than GEOM_MAP_P2 (upgrade part.)
59 3 Alexey Trenikhin
FIRMWARE_IMAGE_SIZE_MAX=0x00760000
60 3 Alexey Trenikhin
</pre>
61 1 Alexey Trenikhin
* Build
62 3 Alexey Trenikhin
** make TARGET_PAIR=Buffalo/WZR-HP-AG300H. This will produce Buffalo_WZR-HP-AG300H.zimage under $OBJ_DIR/...
63 3 Alexey Trenikhin
** Prepare TFTP image. I have used buffaulo-tftp utility from OpenWRT (in future should be included into build)
64 3 Alexey Trenikhin
<pre>
65 3 Alexey Trenikhin
(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
66 3 Alexey Trenikhin
buffalo-tftp -i tftp.tmp -o Buffalo_WZR-HP-AG300H-tftp.bin
67 3 Alexey Trenikhin
</pre>
68 3 Alexey Trenikhin
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)
69 1 Alexey Trenikhin
* flash
70 3 Alexey Trenikhin
** TFTP flash procedure described in http://wiki.openwrt.org/toh/buffalo/wzr-hp-ag300h