NodeMCU
The NodeMCU is an open-source firmware and development environment based on the Lua script language for the ESP8266 wifi-enabled microcontroller. For easy development there is available the NodeMCU devkit board that map the contacts of the ESP8266 chip to easy to use pins and contains extra hardware, such as a serial port to USB adapter to flash new firmwares, update the scripts or simply communicate with a PC.
Generating a new firmware
The easiest way to generate a new firmware is to use the online service: NodeMCU Build In it, you only need to select the modules you want to be build into the firmware and then download the generated firmware binary file.
Flashing the firmware
One of the options for flashing a new fimrware into a ESP8266 under GNU/Linux is to use this tool: ESP Tool
http://lb9mg.no/2015/05/30/first-steps-with-nodemcu/