Something like ESP8266_1 connects to ESP8266_2 using serial, ESP8266_1 pulls up and down the GPIO_0, GPIO_2 and RST lines of ESP8266 and starts sending the new firmware.
Most of this is not rocket science, but I am too lazy to reverse engineer esptool.py as to what exactly to send, especially the blob of program code that apparentely is sent to to communicate with the outside world.
I thought maybe someone has done this before? Or has already reverse engineered whatever esptool.py sends (and receives)?