I’ve left this guide here but it is outdated, for a much easier guide check out this video and debrick tools available here.
This guide shows how to quickly set up a DHCP server and TFTP server to allow us to upload the stock firmware to the Xiaomi 4A router and debrick it. I made the guide quickly due to a request on the OpenWrt forums, someone had asked how I had set up the server, essentially we use the DHCP and TFTP server found here and the 4A firmware found here to repair the 4A router.
This guide inspired our next video, a much larger how-to on the installation of OpenWrt and a much easier method for unbricking the router, you can find that here.