|
楼主 |
发表于 2019-2-26 20:34
|
显示全部楼层
本帖最后由 jiuweiljp 于 2019-2-26 21:40 编辑
特别注意:文件尺寸不同的U-boot 不能用这个方法刷。
例:
root@OpenWrt:/tmp# cat /proc/mtd
dev: size erasesize name
mtd0: 00010000 00010000 "u-boot"
mtd1: 0015330c 00010000 "kernel"
mtd2: 0068ccf4 00010000 "rootfs"
mtd3: 003e0000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 007e0000 00010000 "firmware"
我的这个u-boot 占用空间是0x10000 也就是64KB,而我上传的uboot是93KB占用空间是0x20000 128KB。
如果刷写后出现错误提示:
root@OpenWrt:/tmp# mtd write breed-qca956x-uart_rx18_tx20-reset1.bin u-boot
Unlocking u-boot ...
Writing from breed-qca956x-uart_rx18_tx20-reset1.bin to u-boot ... [e]Failed to erase block
失败了,注意这时候千万不要重启路由器。
把备份或正确的u-boot再刷进去就行了。
root@OpenWrt:/tmp# mtd write breed-qca9561-wdr6500v2-r1080.bin u-boot
Unlocking u-boot ...
Writing from breed-qca9561-wdr6500v2-r1080.bin to u-boot ...
刷写成功!
如果有人问不同尺寸的u-boot怎么刷呢?
1、最简单的用u-boot 中用控制台刷,tftp或Y-modem。(要你路由的uboot中有这些功能才行,一般都有我见过没有tftp,但有Ymodem的)
2、编程器(相对简单)
3、breed web(路由的bootload已经改成breed)
4、用jtag(有难度)
千万别蛮干啊!!!
|
|