Firmware for hardware-upgraded router

Hello, people. I have the small problem: relatively recently I was bought the router TP-Link MR 3220 V2, next I was changed factory firmware on Open WRT. After a while, I decided to upgrade flash memory (not a RAM), upgrade was successfully, but I don't understand, how to compile firmware for my updated device. What can I do?