#! /usr/local/bin/jtag # Example: read whole 2M*16 flash on the AirCA8 wireless access point # (CA8-4, Repotec RP-WA0804, OvisLink WLA-5000AP, ...). # WARNING: flash writing with "flashmem" not tested yet, needs # a volunteer with a bricked box (nothing to lose if it doesn't work). # Xilinx-compatible JTAG cable, PCI parallel port recommended for speed cable ppdev /dev/parport1 DLC5 # auto-detection not possible (device id = 0x00000001) detect include atheros/ar2312/ar2312 # initialize flash controller, see linux/include/asm-mips/ar5312/ar531xreg.h poke 0x58400000 0x000e3ce1 # detect CFI flash (physical address 0x1fc00000, 16-bit access) detectflash 0x3fc00000 # read flash (32-bit access, faster - only about one hour...) readmem 0x5fc00000 0x400000 ar2312-flash.bin