TP-LINK TD-W8970v1 16M mod

Everyone that have/had the TP-LINK TD-W8970v1 router with installed OpenWrt noticed that there is about 2MB (with installed LuCI) of free space to install additional packages for extending router functions. It is possible to extend the memory with extroot method but there is another method to extend the internal memory: replacing the SPI flash. After replacing the flash there is about 10MB (including LuCI) for additional packages.

Building OpenWrt from sources

The prepared firmware with OpenWrt v19.07.5 is available here. If you will download the firmware, you can skip the build process.

https://janfla.slask.pl/wp-content/uploads/openwrt/tdw-8970v1/tdw8970v1-16m-19.07.5.bin

Make sure that all dependencies needed for building OpenWrt, the list is here. If all of dependencies are installed then you can start building the OpenWrt image.

  1. Clone the OpenWrt repository to your local destination
    git clone https://github.com/openwrt/openwrt.git
  2. Enter the cloned OpenWrt directory and switch to desired branch, e.g.
    cd openwrt
    git checkout v19.07.5
  3. Get the patch for TD-W8970v1 16M mod and apply it according to the selected version.
    git apply /path/to/19.07.patch

    Patches:

  4. Prepare the sources for building
    ./scripts/feeds update -a
    ./scripts/feeds install -a
  5. Generate config for building:
    make menuconfig

    Select lantiq as target system and TP-LINK TD-W8970-16M as target profile.

  6. Run make to build the firmware.

 

SPI flash replacement

This procedure allows you to replace the SPI flash with a bigger one, this mod requires the a different version of u-boot, you also must have a backup of the calibration partition. It also requires good skills in soldering and desoldering SMD components.

You will need:

  • A full flash backup.
  • An soic clamp or a socket to program the new flash.
  • A Winbond W25Q128FV.
  • Soldering iron, solder and solder wick.

Steps to replace the rom:

  1. Remove the flash chip, use the clamp or the socket to extract data if not done previously
  2. Clean the pads
  3. Use the clamp or the socket to read the data from old SPI flash.
  4. Use the clamp or the socket to write the modified u-boot on address 0x0. The modified u-boot is available here.
  5. Solder the new SPI flash.
  6. Connect the serial to USB device to router (use TX, RX and GND pins only). Also conenct the ethernet cable directly to the computer.
  7. Setup static IP address on the computer to 192.168.2.2
  8. Open the terminal, access the USB serial device. You can use screen command to access the serial:
    screen /dev/ttyUSB0 115200 8n1

    Start the router and abort the boot by pressing any key. Make sure that atftp server is running on your computer.

  9. Install the new firmware
    setenv ipaddr 192.168.2.1
    setenv serverip 192.168.2.2
    tftpboot 0x81000000 sysupgrade.bin
    sf erase 0x20000 0xfa0000
    sf write 0x81000000 0x20000 0xfa0000
    reset
  10. Extract radio settings from old SPI flash dump
    dd if=oldSPI.bin of=radio.bin bs=1 skip=8192000 #skip 0x7d0000 bytes
  11. After reset abor the boot by pressing any key
    tftpboot 0x81000000 radio.bin
    setenv ipaddr 192.168.2.1 
    setenv serverip 192.168.2.2
    sf erase 0xfd0000 0x30000
    sf write 0x81000000 0xfd0000 0x30000
    reset
    
    

And that’s all!

Source

2 thoughts on “TP-LINK TD-W8970v1 16M mod

  1. Hello, great tutorial, found it with OpenWrt wiki, I have got received this router from my friend, the flash wasn’t readable with CH341 programmer, I was able to load OpenWrt and get it working through WRT wiki, but the wireless is not usable cause of art partition lost. Can you help me? Thanks.

    1. I cannot read the old flash at all. Sorry if I have written or understood something wrong.

Comments are closed.