本帖最后由 林中木 于 2016-7-24 16:45 编辑
最后闲的慌,将老路由贝尔金F7d 4302折腾成只靠电脑无法救活的半砖,经过了各种翻阅教程,综合各方方法,最后成功救活。因为每个人的路由不同,实际情形也不同,固记录下来,希望能给新手一些帮助。
一、准备材料 1. 固件(firmware)损坏,CFE完好的路由一台(注:固件相当于电脑的C盘,CFE相当于BIOS)。也就是传说中的“半砖”(一般意义上的“真砖”即二者俱坏,需要JTAG线或写码器直接对芯片操作)。部分半砖仍然可以通过电脑浏览器web解决; 2. 电脑一台(这是废话); 3. 软件两个:SecureCRT和tftpd32(注意不是tftp,当然tftp也能,但我这个方法不是); 4. USB-TTL线一根。
二、准备刷机 1. 安装好TTL线的驱动,设备管理器里面可以看到,记下COM号; 2. TTL连接上路由器(此时不加电); 4302的接口顺序为(盗的图) 3.打开SecureCRT,如下图操作(盗的图); 4.打开SecureCRT,点击左上角连接。如果左上显示绿色则为连接成功,如果不是绿色,请检查接口、接口定义及线材质量(注意图片中是红色,因为我是事后写的记录); 5.CRT软件中,左上文件-记录会话,将session.log保存一下; 6.(1)此时给路由器加电(之前一直没有通电),CRT里面已经开始疯狂冒出字符,是一些关于路由器信息(CFE版本好低,这也是我按照其他教程无法成功的原因,很多命令不认)及实时的启动信息;4302及时按下空格键,其他路由可能是p,或者tpl,或者ctrl+c(自己查资料或者看上面的反馈信息)
下面是我的启动信息:
Decompressing...done Decompressing...done InitArena InitDevs. Bootpartition size = 131072(0x20000) CPUtype 0x19740: 453MHz Totmem: 65536 KBytes
CFEmem: 0x80700000 - 0x8079A640 (632384) Data: 0x80731730 - 0x80733AF0 (9152) BSS: 0x80733AF0 - 0x80734640 (2896) Heap: 0x80734640 - 0x80798640 (409600) Stack: 0x80798640 - 0x8079A640 (8192) Text: 0x80700000 - 0x80731730 (202544)
Copyingboot params.....DONE
Bootloader version 0.06e boot_version 0.06e Projectname : WG8017F22 1-LF-AK Press space bar to cancel startup... Startup canceled
CFE> 因为我按了空格,所以路由不再继续启动…… (2)输入help得到以下反馈(可用命令很少) CFE> help Availablecommands:
et Broadcom Ethernet utility. nvram NVRAM utility. reboot Reboot. flash Update a flash memory device go Verify and boot OS image. boot Load an executable file intomemory and execute it load Load an executable file into memory withoutexecuting it save Save a region of memory to aremote file via TFTP param Set router parameters. ifconfig Configure the Ethernet interface help Obtain help for CFE commands
Formore information about a command, enter 'help command-name'
(3)输入nvram show,得到以下反馈;(我只标示一个重点出来) wl1_crypto=aes wl1_amsdu=auto wl0.7_hwaddr=96:44:52:95:AA:C8 lan_gateway=192.168.2.1 dhcpd3_startip= usb_ohci=0 virtual**_server2_c2c=0 此为路由地址(大家善用ctrl+f,找出正确的地址,也不一定就是gateway,多注意数字及lan) (4)输入help flash,得到以下反馈;(本操作是让你复制命令单词的) CFE>helpflash
SUMMARY
Update a flash memory device
USAGE
flash [options] filename [flashdevice]
Copies data from a source file name ordevice to a flash memory device. The source device can be a disk file (FATfilesystem), a remote file (TFTP) or a flash device. The destination device may be a flash oreeprom. If the destination device is your bootflash (usually flash0), the flash command will restart the firmware afterthe flash update is complete
OPTIONS
-noerase Don't erase flash before writing -offset=* Begin programming at this offset in theflash device -size=* Size of source device when programmingfrom flash to flash -noheader Override header verification, flash binarywithout checking
-mem Use memory as source instead of adevice
三、开始刷机 1. 此时的路由器是TTL线网线都与电脑相连; 2. 固定网卡ip为192.168.2.100(注意按照二-6-(3)灵活更改地址),掩码255.255.255.0; 3.打开TFTPD32软件,将bin文件(请严格核实正确的bin文件,我使用的是dd-wrt.v24-17201_NEWD-2_K2.6_mini_f7d4302.bin)修改为简单名,如1.bin。复制到TFTPD32软件的文件夹里面(与软件同一个文件夹) 注意IP地址那一栏,按照以上操作这个时候应该是192.168.2.100(或者你设置的其他本机ip) 4.如果第二部分,没有关闭CRT那么直接输入以下命令(如果关了,重复步奏二一直到(6)直到你的对话框末段为CFE>,其他情形一样) CFE>flash -noerase -noheader 192.168.2.100:/1.bin flash1.trx (4302可以直接复制) CFE> flash空格-noerase空格-noheader空格192.168.2.100:/1.bin空格flash1.trx(标红部分按照实际情形修改) 成功开始刷入固件,得到以下反馈 Reading192.168.2.100:/1.bin: Done. 3436544 bytes read Programming...done.3436544 bytes written ***command status = 0
最后输入go,成功救活路由器。
|