
刷写uboot art (复制文件到/tmp )
执行 mtd -r write /tmp/xx.bin u-boot #某些uboot需要断电重启
刷art命令 mtd -r write /tmp/art.bin art
刷firmware(升级固件)命令 mtd -r write /tmp/固件名.bin firmware
cat /proc/mtd #此命令用来查看各分区属性
#如下
dev: size erasesize name
mtd0: 00020000 00010000 "u-boot"
mtd1: 00140000 00010000 "kernel"
mtd2: 00690000 00010000 "rootfs"
mtd3: 00460000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 007d0000 00010000 "firmware"
root@OpenWrt:/tmp# dd if=/dev/mtd0 of=uboot.bin #备份uboot
root@OpenWrt:/tmp# dd if=/dev/mtd5 of=firmware.bin #备份firmware 系统
root@OpenWrt:/tmp# dd if=/dev/mtd4 of=art.bin#备份art 无线相关
:~#
DDWRT备份成编程器固件命令(前提是有fullash分区)
:~# dd if=/dev/mtd6 of=/tmp/741_fullflash.bin
16384+0 records in
16384+0 records out
:~#
刷成编程器固件命令(前提是有fullash分区)
:~# mtd -r write fullflash /tmp/741_fullflash.bin
16384+0 records in
16384+0 records out
:~#
编程openwrt固件时修改mach-tl-mr3x20.c(对应3420)增加一个fullash
}, {
.name = "fullflash",
.offset = 0,
.size = 0x800000,
.mask_flags = MTD_WRITEABLE,
}
.size = 0x800000, 这个是flash大小8M
去掉 .mask_flags = MTD_WRITEABLE,是分区可以写,否者只可读
区分固件是否带uboot
用Uedit32打开固件
这个是有uboot的
这个是有没有uboot的的openwrt固件
去掉固件的uboot (也就是删除固件前成128k数据)
这个是有uboot
128K*1024 =131072
固件加uboot
copy /b uboot.bin+固件.bin 新固件.bin
uboot下刷机
打开tftpd32 把固件放tftpd32设置的目录下
打开SecureCRT 波特率115200
这是7240 uboot下刷4M编程器的固件
ar7240> printenv
ar7240> setenv ipaddr 192.168.1.222
ar7240> setenv serverip 192.168.1.2 #PC设置网卡IP为192.168.1.2
ar7240> tftpboot 0x80000000 150r.bin
ar7240> erase 0x9f000000 +0x3fffff
ar7240> cp.b 0x80000000 0x9f000000 0x3fffff
ar7240> bootm
ubnt uboot刷机
tftpboot 0x80000000 1508m.bin
erase 0xbf000000 +0x3fffff
cp.b 0x80000000 0xbf000000 0x3fffff
bootm
普通的uboot 和 ubnt的uboot的刷机都搞定了
普通的uboot一个是 0x9f000000开始
,ubnt是 0xbf000000开始
刷编程器固件
setenv ipaddr 192.168.1.111
setenv serverip 192.168.1.2
tftpboot 0x80000000 741V3_factory_all.bin
erase 0x9f000000 +0x400000
cp.b 0x80000000 0x9f000000 0x400000
刷普通固件
tftpboot 0x80000000 op.bin
erase 0x9f020000 +0x400000
cp.b 0x80000000 0x9f020000 0x400000
bootm
具体其他地址位参考:
2M flash:
刷编程器固件:
tftp 0x80000000 full.bin
erase 0x9f000000 +0x200000
cp.b 0x80000000 0x9f000000 0x200000
刷uboot:
tftp 0x80000000 uboot.bin
erase 0x9f000000 +0x20000
cp.b 0x80000000 0x9f000000 0x20000
刷fw:
tftp 0x80000000 fw.bin
erase 0x9f020000 +0x1c0000
cp.b 0x80000000 0x9f020000 0x1c0000
刷art:
tftp 0x80000000 art.bin
erase 0x9f1f0000 +0x10000
cp.b 0x80000000 0x9f1f0000 0x10000
4M flash:
刷编程器固件:
tftp 0x80000000 full.bin
erase 0x9f000000 +0x400000
cp.b 0x80000000 0x9f000000 0x400000
刷uboot:
tftp 0x80000000 uboot.bin
erase 0x9f000000 +0x20000
cp.b 0x80000000 0x9f000000 0x20000
刷fw:
tftp 0x80000000 fw.bin
erase 0x9f020000 +0x3c0000
cp.b 0x80000000 0x9f020000 0x3c0000
刷art:
tftp 0x80000000 art.bin
erase 0x9f3f0000 +0x10000
cp.b 0x80000000 0x9f3f0000 0x10000
8M flash:
刷编程器固件:
tftp 0x80000000 full.bin
erase 0x9f000000 +0x800000
cp.b 0x80000000 0x9f000000 0x800000
刷uboot:
tftp 0x80000000 uboot.bin
erase 0x9f000000 +0x20000
cp.b 0x80000000 0x9f000000 0x20000
刷fw:
tftp 0x80000000 fw.bin
erase 0x9f020000 +0x7c0000
cp.b 0x80000000 0x9f020000 0x7c0000
刷art:
tftp 0x80000000 art.bin
erase 0x9f7f0000 +0x10000
cp.b 0x80000000 0x9f7f0000 0x10000


相关文章本文地址:https://blog.sxx1314.com/router-test/58.html
版权声明:若无注明,本文皆为“unix 软硬件 技术宅 ”原创,转载请保留文章出处。百度已收录















