tcl/board: add Linksys WAG200G config 76/3776/3
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Wed, 21 Sep 2016 15:16:47 +0000 (11:16 -0400)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Mon, 17 Oct 2016 08:16:33 +0000 (09:16 +0100)
The Linksys WAG200G router has a TI AR7 SoC and a 4MB Flash layout
similar to the Netgear DG834v3 router [1].

Below is an example of a successful flash recovery, using a TUMPA,
connected to the MIPS EJTAG 2.6 header (JP102) of the router.

     WAG200G [2]  TUMPA [3]
     Desc  Pin    Pin  Desc
    ------------------------
     nTRST   1    3   nTRST
     TDI     3    5     TDI
     TDO     5    13    TDO
     TMS     7    7     TMS
     TCK     9    9     TCK
     nSRST  11    15    RST
     GND     2    4     GND

Note that nSRST is optional to halt the CPU, but is required to probe
the flash. For instance, recover the kernel with:

    $ sudo ./src/openocd -s tcl \
      -f interface/ftdi/tumpa.cfg \
      -f tools/firmware-recovery.tcl \
      -c 'board linksys-wag200g;
          reset_config srst_only;
          flash_part kernel /path/to/kernel.bin;
          shutdown'

[1] https://wiki.openwrt.org/toh/linksys/wag200g
[2] https://www.linux-mips.org/wiki/JTAG#JTAG_headers
[3] http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User's_Manual#20_PIN_JTAG_Connector

Change-Id: I952ba9f706e2e4f8f95ca03a5fa58f391ca030b6
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-on: http://openocd.zylin.com/3776
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
tcl/board/linksys-wag200g.cfg [new file with mode: 0644]
tcl/tools/firmware-recovery.tcl

diff --git a/tcl/board/linksys-wag200g.cfg b/tcl/board/linksys-wag200g.cfg
new file mode 100644 (file)
index 0000000..aa4887f
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# Linksys WAG200G Router
+#
+# The stock firmware Flash layout is organized as follow:
+#
+#   Start       End         Device
+#   0x90000000  0x90020000  /dev/mtdblock/2
+#   0x90020000  0x900d0000  /dev/mtdblock/1
+#   0x900d0000  0x903a0000  /dev/mtdblock/0
+#   0x903a0000  0x903e0000  /dev/mtdblock/5
+#   0x903e0000  0x903f0000  /dev/mtdblock/3
+#   0x903f0000  0x90400000  /dev/mtdblock/4
+
+set partition_list {
+    adam2      { "Adam2 bootloader"            0x90000000 0x00020000 }
+    kernel     { "Kernel"                      0x90020000 0x000b0000 }
+    rootfs     { "Root FS"                     0x900d0000 0x002d0000 }
+    lang       { "Minix language part"         0x903a0000 0x00040000 }
+    config     { "Firmware config"             0x903e0000 0x00010000 }
+    adam2env   { "Adam2 environment"           0x903f0000 0x00010000 }
+}
+
+source [find target/ti-ar7.cfg]
+
+# External 4MB MXIC 29LV320MBTC Flash (Manufacturer/Device: 0x00c2 0x227e)
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x90000000 0x00400000 2 2 $_TARGETNAME
index 6e23540f0b82d06382a015571b8eacc843aa5550..8e017ce5b3cf55d04af4b7c3f2595b5728e918ac 100644 (file)
@@ -4,6 +4,7 @@ echo "Use -c firmware_help to get help\n"
 set known_boards {
     "asus-rt-n16               ASUS RT-N16"
     "asus-rt-n66u              ASUS RT-N66U"
+    "linksys-wag200g           Linksys WAG200G"
     "linksys-wrt54gl           Linksys WRT54GL v1.1"
     "netgear-dg834v3           Netgear DG834G v3"
     "tp-link_tl-mr3020         TP-LINK TL-MR3020"

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)