I am upgrading my TP Link Archer C6 v2 (EU) flash from 8MB to 16MB. I have read other discussions on this and I have a few questions regarding what needs to be flashed on 16MB chip.
These are the steps I am going to follow.
Dump the 8MB flash to a file.
Concatenate the file with itself to create a new 16MB(8+8) file, so that ART partition is at correct place. And then write it to the new 16MB flash.
Solder the new flash and enjoy.
Are these steps enough?
I also want to move to US version(so that my router is supported for longer time), what partitions will I need to preserve and which ones to overwrite with data from US version? And how to get those US version partitions?
First of all I would install a socket if you are experimenting. You can then swap the flash easily when things fail.
I don't know if there is a PXE-boot tutorial for your device, but I would look into that if experimenting.
Obviously you need to resize some partitions to claim the new space. So if someone has done this before requesting a dump or partitioning layout would save you a lot of time.
That's the extend of my knowledge, I hope it works out.
Thanks for the wonderful suggestion of mounting a socket. I searched for them, unfortunately they are not available where I live.
Do you know how I can extract the partition data from the sysupgrade.bin for a particular board?
Thanks for the quick response.
Yes the IC you pointed is the SPI flash. Its SMD not DIP. The link you shared is for DIP. If I order it from Aliexpress it will take 15 days. I will just go ahead and do some temporary jugaad with wires for testing and when it is fully working then solder it to the board.
The US bootloader can be extracted from a US factory firmware file. But you can probably boot OK with the EU bootloader. In many TP-Link the factory MAC address is in the bootloader partition so you would need to patch it back in if you replace the bootloader.
The original idea to just copy the old chip (running OpenWrt EU build) into the first 8 MB of the new chip and push the ART out to the end of the new chip should work. After booting, force upgrade to the OpenWrt US build. The ART can be installed at run-time using kmod-mtd-rw to temporarily allow writing to a protected partition.
Is MAC address part of dts? If yes, then is dts stored on a separate partition or built as part of uboot. I hope replacing US version dts from my EU version dts should do the trick? As well as modify the partitions defined in dts?
Very unlikely, then it would be applied to every device where the dtb is loaded. Afaik its u-boot that does that, which can load a config from an address, partition or file. Given that its a router, probably an address.
One last query.
This is my partition list with correct order and size for 8MB:-
131072 u-boot
65536 info
7995392 firmware
131072 tplink
65536 art
For 16MB if I fill these partitions as below:-
131072 u-boot
65536 info
16384000 firmware (append 0s after 7995392)
131072 tplink
65536 art
And force flash US version openwrt on boot.
Will this be enough?
I am hopping I wont have to touch partition tables or offsets?
I also hope I dont have to change any mac addresses or use kmod-mtd-rw to write 'art', as everything will be in correct place?
The partition table is in the OpenWrt firmware. When you boot EU firmware from a 16 MB chip, it uses the EU table thus only 8 MB of the chip is usable. When you flash US firmware it will use the US partition table.
The top part of the chip doesn't need to contain anything with this scheme-- as I said you can write the ART in at runtime from the US firmware. Of course you have to have a copy of ART saved.
I got the SOP8 test clip. But I am not able to access the flash chip. I tested my setup with a flash chip that was not soldered to anything and it worked. I checked with 2 different routers, for both I am not able to access it. Will it be accessible only when removed from board?
Yes, that's usually the case when its in circuit. However you could try to reduce the length of the wires. The shorter the connection the better, that's why I suggested the socket
As far as reading the old chip, while running OpenWrt you can extract each partition with cat /dev/mtdX > /tmp/mtdX.bin
Then cat those files together and it is a complete image of the original flash chip. Having done that, flash it into a new chip then swap the chips. A heat gun makes very short work of removing and replacing the flash chip.
The flash layout could be also on several layers. Some device pages have this well explained. If you write it via the router - it will fit. Sometimes when I have the chip unsoldered, I am using the router itself to write the new chip. If the pads are well cleaned - you won't really need a socket. The mtd utility can verify if written correctly or not. The first layer should already contain all the data.