I have successfully modified the factory image for my WDR4300 to use 16M flash, now I am trying to modify sysupgrade as well, but there are a few things I don't understand about the file.
I see that factory and sysupgrade images are the same, but there is a self-proclaimed "fake certificate" at the end of sysupgrade: (non-ASCII characters are removed)
{ "metadata_version": "1.1", "compat_version": "1.0", "supported_devices":["tplink,tl-wdr4300-v1","tl-wdr4300"], "version": { "dist": "OpenWrt", "version": "24.10.0", "revision": "r28427-6df0e3d02a", "target": "ath79/generic", "board": "tplink_tl-wdr4300-v1" } }
FWx0..E..#fake certificateFWx0..
I don't know what this is and if I can just paste it back at the end of my file after modification.
What is this "fake certificate"? (I guess openwrt checks if it has the correct file for the device)
I tried also figuring out the checksum using mktplinkfw
but it says the checksum is invalid for the official sysupgrade file straight from the openwrt page.
Why is the sysupgrade checksum invalid?
There are some DEADC0DE
markers after the end of the firmware squashfs at 0x63E000 and 0x640000(right before the fake cert). I just found that these trigger reformatting of the overlay.
I would like to replace the contents and just keep the header at the beginning and certificate at the end of the file.