So, I have an Edimax BR-6208ac V2 router and I would like to modify the firmware to enable telnet on it. However, when I repack the firmware and upload it I get an error of it being the wrong file type. I know my repacking code works as when I didn't unsquash then squash the squashfs filesystem then packed it and uploaded it, it updated properly. But if I don't unsquash it I can't modify it.
My current theory is that it is because of the md5 checksum as it has a different md5 sum after doing that. I have tried recreating the uImage header with mkimage, I don't know how to recreate the csys header. When recreating the uImage header my firmware binary ends up with the uImage header before the csys header, it is the opposite way around in the original firmware.
The original firmware has a CSYS Header, a uImage header, LZMA compressed data and then the squashfs filesystem.
Could someone give suggestions on how to get it working properly?