還是要感谢 略略大大提供他之前的心血
自己用过的 openocd 跟 openocd.cfg 资料
这个 redboot 还真是难刷
找了几天的资料
不知道看了多少网页
嘿嘿 程度太差 没办法
终于在今天早上不小心被我在 google 找到这篇资料
原来远在天边近在眼前
http://oldwiki.openwrt.org/OpenWrtDocs(2f)Hardware(2f)USRobotics(2f)USR8200.html
根据
Config Files for OpenOCD rev 728 using Olimex's ARM-USB-OCD JTAG unit
的资料
就能把 redboot 给刷回去
步骤为
先到下载区 找到 略略大大 发的 src.rar
然后再下载 我发的 redboot.rar
先解开 src.rar
然后再解开 redboot.rar
将 redboot 里的 文件複製到 src 裡去合并覆盖
redboot.rar 里有 两个 redboot 一个 ddwrt 里的 一个 openwrt里的
想用哪个自己选择 dd版版本号 joe8 openwrt版的是 joe4
預設我是使用 ddwrt 找到的版本
将上面两个压缩文件合并完成后直接启动 openocd
等他自己画面消失 就完成了
试设置文件的修改说明
基本控制设置 存為 openocd.cfg 这个基本上 就是略略大大发的文件再加上启动脚本
启动脚本 target_script 0 reset ixp42x.actions
写入动作脚本为 ixp42x.actions
openocd.cfg 的内容
#-----------------begin xscale-olimex-
ipx425.cfg-----------------------------
# openocd rev 728 - for flash writing
daemon configuration
telnet_port 4444
gdb_port 3333
###### 这里根据自己的 openocd 对应的介面修改
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0003
##### 介面修改的部份到此为止
jtag_speed 0
################################################################################
# reset config <signals> [combination]
# [trst-type] [srst-type] ? signals is one of none, trst only, srst
only or trst and srst.
# combination is one of srst pulls trst, trst pulls srst,combined,
separate.
# trst-type is one of trst open drain, trst push pull.
# srst-type is one of srst push pull, srst open drain.
#
# use combined on interfaces or targets that can't set TRST/SRST
separately
# reset_config trst_and_srst srst_pulls_trst
# reset_config trst_and_srst
################################################################################
reset_config trst_and_srst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask,
IDCODE)
jtag_device 7 0x1 0x7f 0x7e
# daemon_startup reset or attach
daemon_startup reset
#### target configuration
#### target <type> <startup mode>
#### target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
#target xscale big run_and_init 0 IXP42x
target xscale big reset_init 0 ixp42x
run_and_halt_time 0 30
###############################################################################
# target script <target#> <event> <scriptfile> event is either reset,
post halt or pre resume.
# JW... was this a cfg from the svn version? I hope not.
################################################################################
# target_script 0 reset ixp42x_big.init
# 使用脚本 跟设置脚本名称
target_script 0 reset ixp42x.actions
# specify 16MiB FLASH
flash bank cfi 0x50000000 0x1000000 2 2 0
working_area 0 0x800000 0x100000 nobackup
reset halt
#--------------------end xscale-olimex-ipx425.cfg-------------------
脚本 ixp42x.actions 的內容
#-----------------begin xscale-olimex-
ipx42x.actions-----------------------------
# openocd rev 728 - flash writing
wait_halt
#set big endian mode
reg XSCALE_CTRL 0xF8
#setup expansion bus CS#0, write enable, @0x50000000
#mww 0xc4000000 0xbcd23c42
mww 0xc4000000 0xbd113c42
#setup expansion bus CS#1, write enable, @0x51000000
mww 0xc4000004 0x80000002
flash probe 0
###### 424 内存只有 32M 所以打开这里
# 32 MB, CAS3
mww 0xcc000000 0x00000018
# 64 MB, CAS2
#mww 0xcc000000 0x00000002
# 64 MB, CAS3
#mww 0xcc000000 0x0000000A
### disable refresh
mww 0xcc000004 0x00000000
### nop
mww 0xcc000008 0x00000003
#######sleep 60
### set refresh value
#mww 0xcc000004 0x0000081a
mww 0xcc000004 0x00000412
### precharge all
mww 0xcc000008 0x00000002
sleep 20
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000004
mww 0xcc000008 0x00000001
mww 0xcc000008 0x00000006
sleep 200
# map SDRAM to 0x00000000
mww 0xc4000020 0x00fffffe
sleep 200
mww 0x800000 0xFEED
sleep 2000
mdw 0x800000
sleep 6000
############ 在此修改 redboot bin 文件放置的 路径跟文件名称 windows 下 例如 c:
\redboot.bin
#
# DD-Wrt 上给 424用的 redboot 版本为 joe8
# 大小也点区别 想用哪个就看个人了
flash write_image erase rb-mi424wr-ROM-1_joe8.bin 0x50000000 bin
# OpenWRT 找到的 redboot 版本为 joe4
# flash write_image erase rb-mi424wr-ROM_joe4.bin 0x50000000 bin
sleep 2000
shutdown
#-------------------end xscale-olimex-
ipx42x.actions-----------------------------