From 76a765adbc8d6e20ed8adcd4839132017304e7d6 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sat, 24 May 2014 10:04:14 +0400 Subject: [PATCH] tcl: add ASUS RT-N66U config CFI flashing verified with real hardware. RAM configuration wasn't attempted. Change-Id: I9185ab71430d799793befef708a15f62edba1663 Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/2153 Tested-by: jenkins Reviewed-by: Andreas Fritiofson --- tcl/board/asus-rt-n66u.cfg | 19 +++++++++++++++++++ tcl/target/bcm4706.cfg | 7 +++++++ tcl/tools/firmware-recovery.tcl | 1 + 3 files changed, 27 insertions(+) create mode 100644 tcl/board/asus-rt-n66u.cfg create mode 100644 tcl/target/bcm4706.cfg diff --git a/tcl/board/asus-rt-n66u.cfg b/tcl/board/asus-rt-n66u.cfg new file mode 100644 index 00000000..4b255cf9 --- /dev/null +++ b/tcl/board/asus-rt-n66u.cfg @@ -0,0 +1,19 @@ +# +# http://wikidevi.com/wiki/Asus_RT-N66U +# + +echo "ATTENTION: you need to solder a 4.7-10k pullup resistor to pin 21 of flash IC" +echo "to enable JTAG, see http://wl500g.info/album.php?albumid=28&attachmentid=8991 ," +echo "there is an unpopulated footprint near U8.\n" + +set partition_list { + CFE { Bootloader 0xbc000000 0x00040000 } + firmware { "Kernel+rootfs" 0xbc040000 0x01fa0000 } + nvram { "Config space" 0xbdfe0000 0x00020000 } +} + +source [find target/bcm4706.cfg] + +# External 32MB NOR Flash (Spansion S29GL256P10TF101 +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME cfi 0xbc000000 0x02000000 2 2 $_TARGETNAME diff --git a/tcl/target/bcm4706.cfg b/tcl/target/bcm4706.cfg new file mode 100644 index 00000000..10b32c77 --- /dev/null +++ b/tcl/target/bcm4706.cfg @@ -0,0 +1,7 @@ +set _CHIPNAME bcm4706 +set _CPUID 0x1008c17f + +jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUID + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME mips_m4k -endian little -chain-position $_TARGETNAME diff --git a/tcl/tools/firmware-recovery.tcl b/tcl/tools/firmware-recovery.tcl index 45311490..0f2bc2ab 100644 --- a/tcl/tools/firmware-recovery.tcl +++ b/tcl/tools/firmware-recovery.tcl @@ -3,6 +3,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-wrt54gl Linksys WRT54GL v1.1" "netgear-dg834v3 Netgear DG834G v3" "bt-homehubv1 BT HomeHub v1" -- 2.39.5