Upgrading TPLink TL-WR840N v5 flash chip
Tuyen D. Le February 11, 2019 [Router] #TL-WR840NI will show you how to upgrade TP-Link flash chip on TP-Link from 4mb to 8mb.
1. Pre-requirement
- New flash chip: I used Winbond 8MiB GD25Q64CSIG
- Soldering iron: desolder old flash chip and re-solder new flash chip
- ROM programer and IC socket: I am using CH-341A (~ 5$)
- One PC/Laptop
2. Let's do it
2.1 Desolder old flash chip
Hot air soldering station is ideally suited for desoldering flash. If you not, you can follow this video to do this.
2.2 Program new flash chip
Firstly, you need to choose new flash chip you want to replace. Why I chose Winbond GD25Q64CSIG
for replacement, see table bellow:
Description | Original | Mod |
---|---|---|
flash | GigaDevice GD25Q32B (4MB) | Winbond GD25Q64CSIG (8MB) |
firmware | TL-WR840N(VN)_V5_170517 | openwrt-18.06.1-ramips-mt76x8-tl-wr841n-v13-squashfs-sysupgrade |
I see the name of flash chip is the same, so I didn't checked datasheet for compatible.
Secondly, you need to choose OpenWRT firmware. Why I used openwrt-18.06.1-ramips-mt76x8-tl-wr841n-v13-squashfs-sysupgrade instead of openwrt-18.06.1-ramips-mt76x8-tl-wr840n-v5-squashfs-sysupgrade?
Because it used the same CPU and different in flash and RAM chip.
Description | TP-LINK TL-WR841N v13.x | TP-LINK TL-WR840N v5 |
---|---|---|
CPU | MediaTek MT7628NN (580MHz) | MediaTek MT7628NN @575MHz |
RAM | Winbond W9751G6JB-25 (64MB) | ESMT M14D5121632A (64MB) |
Flash | GigaDevice GD25Q64CSIG (8MB) | GigaDevice GD25Q32B (4MB) |
👉 You are able to use openwrt-18.06.1-ramips-mt76x8-tl-wr840n-v5-squashfs-sysupgrade with 8MB flash chip, your router still booting but you can not any configuration after reboot. You may got error Your image is probably too big, leaving not enough space for jffs2
.
In the first time, I faced this problem. I can not save any configuration after reboot. If you look at boot log, it read:
)
)
)
)
)
)
No /overlay
will be mounted:
If everything is good, it should be like this:
Now, you have new flash chip and suitable firware, but you can not use this firware to program new flash chip. Because RAW flash need more partion than firmware such as: bootloader and art. See more in here
You can use bellow shell script to generate firmware for any flash with different capacity.
flash_size_in_MB=8
sysupgrade_OpenWRT="openwrt-18.06.1-ramips-mt76x8-tl-wr840n-v5-squashfs-sysupgrade.bin"
art_file="upload_openwrt_art.bin"
boot_loader="upload_openwrt_mtd0.bin"
sysupgrade_OpenWRT_size=
art_file_size=
boot_loader_size=
padcount=
|
parameter | Description |
---|---|
flash_size_in_MB | new flash chip capacity |
sysupgrade_OpenWRT | OpenWRT image (firmware) |
art_file | ART partion from original flash, the last 64k block of the chip no matter what the chip size. |
boot_loader | bootloader, the first 128kB from original flash |
Output firmware | sysupgrade_OpenWRT_dump.bin, you can use this to program your new flash chip |
If you don't want to use this script, you can create image by yourself. You may to need hex editor like HxDen to do this.
All file which I used in here
2.3 Re-solder new flash chip
After use CH341A to program new flash chip, you can re-solder new flash chip on target board.
👉 If your board can not booting, don't worry. You can use Clip Socket Adapter to try program flash again with out desolder chip.
3. Enjoy
👉 I used the firmware from TL-WR841N v13.x. Except for LED ,everything work well (Wi-Fi, Ethernet, Router feature).