Flash memory Upgrade ...what could go wrong

Sure, here's a more polished version of your forum post:


Hello everyone!

Last year, I sought help in this topic regarding my TP-Link TD-W9980.

Despite the mishap I described in that thread, the router has been running smoothly since then. However, the onboard flash storage is extremely limited (only 8MB), which doesn't leave much room for installing additional packages. At one point, I even ran into an issue where the device couldn't save a configuration file because the storage was full!

I'm considering upgrading the flash chip by replacing it with a 16MB version of the same part number. While I’m confident in my soldering skills, I'm unsure about the software side of things, which is where I'd appreciate some guidance.

Has anyone tried something similar? What challenges might I face with OpenWrt when upgrading the flash storage? From what I've read in other forum threads and blog posts (I know this post is for another model, i wonder how possible is to perfom the same to the 9980 i have) , mentioned needing to recompile firmware and modify bootloaders after such upgrades. Does this mean I’d need to compile custom firmware for each new OpenWrt version moving forward?

Any insights or advice would be greatly appreciated!

Thanks in advance!


ps I have SPI flash programmers , SoIC8 clips and all that stuff.

You need to edit dts, and most notably relocate (copy data) system partition at the end of flash to new end of flash...

2 Likes

Hello Brada4!

So, if I understand correctly, the process would start by dumping the existing flash IC, then using a hex editor (or dd for those command line aficionados) to rearrange the partitions.

However, I’m a bit confused at this point. When looking at the partition table, the last partition is labeled as "radio." Is this the system partition you were referring to?

Also, regarding the dts file (I’m assuming you’re referring to the Device Tree Source file), would the changes involve specifying the new boot address and instructing the system on how to handle the larger flash size?

Thanks again for the help!

All 3-4 partitions after the firmware/rootfs area. Wiki says config, romfile, rom, radio

It would mean adjusting the location and size of each affected partition in the DTS. Your device has no own DTS, right? But is hijacking the td-w8980 DTS, right?

Then it is likely about these lines, which you need to adjust according to how you copied the contents. Curiously, the DTS is different than the mtd contents shown in the wiki article, so you may need to first look with a hex editor or so, what data and how much data is actually at the end of the chip...

i guess.

so the upgrade prosses would be as follows:

  1. teardown router , de-solder the eeprom , dump its contents.
  2. Make a new larger .hex file copy the contents of the dump acordingly (system partition , aka config, romfile, rom, radio as per what wiki says)
  3. clone the openwrt repo similar to what this post shows
  4. Go on the dts file and edit the start/end addresses
  5. compile , bake it on the new eeprom
  6. enjoy your new upgraded router

riiight?