2017-02-10

WZR-HP-G300NH2 migrate from OpenWRT to DD-WRT

以 wzr-hp-g300nh2-dd-wrt-webupgrade-Multi_r31221.bin 為例:

strip first 28 bytes
dd bs=1 skip-28 if=wzr-hp-g300nh2-dd-wrt-webupgrade-Multi_r31221.bin of=myfirmware.bin
Use open WebGUI to flash myfirmware.bin.

It would take about 20 mins to fully reflash and boot.


OpenWRT webgui 能接受的是以 27 05 19 56 .... 為首的非加密檔案

-----------------------------------------------------------------
TFTP and WebGUi are the best way for flash fw. mtd command is tricky and we should have enough space on the router to contain fw file, enable telnet or sshd, maybe external usb... so better avoid it.
1. If you can still on with openwrt WebGUI:
Use file wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin, strip first 28 bytes
dd bs=1 skip=28 if=wzr-hp-g300nh-dd-wrt-webupgrade-MULTI.bin of=myfirmware.bin
Use open WebGUI to flash myfirmware.bin. I've reverted back to dd-wrt by this way. It took 20 mins to fully reflash and boot.
2. TFTP
Use openwrt tftp images. Those files have 32 bytes header.
Actual flash starts at 0x20 offset
0020  27 05 19 56 8C 8E 20 49  4C 70 96 52 00 0D 86 F1  -'..V.. ILp.R....-
0030  80 06 00 00 80 06 00 00  13 72 3C FB 05 05 02 03  -.........r<.....-
0040  4D 49 50 53 20 4F 70 65  6E 57 72 74 20 4C 69 6E  -MIPS OpenWrt Lin-
0050  75 78 2D 32 2E 36 2E 33  32 2E 31 36 00 00 00 00  -ux-2.6.32.16....-
Now I can back and forth any firmware I want, just remember
openwrt WebGUI accepts RAW fw image, that starts with above bolded 5 bytes
openwrt tftp require a 28-bytes header. Spend some time to look at those files and you can modify headers as your needs.
The best way to start new upgrade path is back to factory firmware 1.60 first. Then flash it with buffalo-to-ddwrt followed by dd-wrt-webupgrade.
Hope it helps



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.