TL-WR842ND v2 flash rom chip replace

I have a TL-MR3420 v2 lying around. Which has identical hardware to TL-WR842ND v2, expect for 4mb flash. I thought, why not just replace it with 8mb ROM chip and flash TL-WR842ND firmware. I have a ch341 programmer. Flash ROM W25Q64FVSIG.

Does stripped ROM will work, or I'll need full ROM dump? Does anyone have a full ROM dump of TL-WR842ND v2?

How is this related to OpenWRT?

It's a relatively simple mod though 32 MB RAM is going to cause issues. The RAM chip can be swapped with no software changes. 64 MB is the largest chip supported by the SOC, as well as the largest type made in that DDR 1 generation and form factor.

As for the flash you need to put the bootloader and ART into the new chip. The only place the ART for your particular unit exists is in the old chip, so be sure to have several backups of it. Then concat bootloader + sysupgrade OpenWrt for the new model + ART into the new chip, padding it out to the page boundaries (bootloader is exactly the first 128 kiB and ART is exactly the last 64).

If you start with only the bootloader in the new chip you can use serial to install OpenWrt, then OpenWrt to install the ART backup. The original bootloader cannot access beyond the first 4 MB of the flash, but that is not a problem unless the kernel is very large.