Well, you probably can flash it corrcetly with original firmware files if you do that in "erase all userdata mode" which rewrites your partitions. However, that does wipe the device totally clean, so I suggest first boot it with a rescue kernel and make backups, if you have anything of worth there you want to save.