TL-WR841ND v.8 with 16mb flash

Hi all,
I have a specified router with a faulty flash(4mb).
I want to replace it with flash W25Q128 which has a volume of 16 mb.
I have a few questions:

  1. how to create to a firmvare which will see 16 MB?
  2. Do I need add the MAC address, serial number and calibration table of the Wi-Fi radio module (art) to the firmware(as in open-wrt)?
    Thanks.

Keep in mind that you only have 32 MB RAM and that flashing new firmwares can require the whole flash size in RAM (and you certainly won't find 16+ MB free RAM); in other words, consider to go with a 8 MB flash instead.

I will write down the flash memory through the spi programmer CH341A, if correctly understood what you mean.

  1. You need modify target/linux/ar71xx/image/tp-link.mk from source to generate 16mb firmware, look like:
    define Device/tl-wr841-v8
    $(Device/tplink-16mlzma)
  2. Yes. Or just using u-boot mod by @pepe2k.

Most TP-Link models have been switched to dynamically build the mtd partitions at boot time, which is done by tplinkparts.c in the kernel. That means you can flash a release build and it will automatically use your 16MB chip, making a 12MB jffs2 for your packages etc.

Extract the bootloader (first 128k) and the ART (last 64k) from the old chip. Then place them in the new chip at the beginning and end. After the bootloader, install a "sysupgrade" LEDE image. This should boot up and work with the larger chip. The stock bootloader only accesses the first 4 MB of the chip. That should not be a problem unless you build something with a compressed kernel larger than that, which is very unlikely. Booting such a large kernel would use a lot of the RAM.

The old chip can not be read, i do not have a bootloader and ART, so I'm interested in how to install a new firmware on an empty chip.