Do you like this post? A regular project like the PlaneSpotter Color
takes many hours of my free time to develop and maintain. Would you offer me a beer for my hard work if I was your neighbour? Modern technology called teleportation makes it easy to send me a beer. Just click here
. Thank you!
When you get started with wonderful world of the ESP8266 your first step might have been to play around with the AT command firmware. Then you might have chosen one of the pre-built multi purpose firmwares, such as the NodeMCU or the NodeLua image. Then, the next logical step is to build a firmware yourself. But honestly, I was a bit afraid of this one, since it seemed all very Linux oriented and I wanted to run it on my Mac. Until I found zoobab’s Dockerfile
. I had heard about Docker before but never used it myself. This tutorial will walk you through the whole process from “Nada to Tadaa!”
1. Install docker
Since docker is only truly native on Linux you might want to use another tool to get docker running under Windows and Mac OS X. It’s called boot2docker and uses a tiny Linux image running inside VirtualBox to get docker running on your non-linux OS.
Note: while this worked without any problems on my Mac I had some (still unsolved) issues on Windows 7. Probably they were caused by pre-installed Git and VirtualBox. If possible remove these two applications before you install boot2docker and let the installer take care of re-installing them.
To test the successful installation run:
from the boot2docker command line.
2. Create the docker container
If you didn’t have git before starting this walkthrough you will have now: boot2docker should have installed it. That’s why you can now execute
git clone https://github.com/squix78/esp8266-docker-buildbox.git
docker build -t local/buildbox .
This last step might take a while (or two): in my case it took almost 20 minutes. But the good thing is that you’ll only have to do it once.
3. Run the docker container and compile your first firmware
Now it’s time to start the container:
docker run -i -t local/buildbox /bin/bash
Will start the container. Now you get to compile your first firmware by
su - esp8266
If everything worked out you’ll have to files in the firmware folder: 0x00000.bin and 0x40000.bin! Congratulations, you just built your first ESP8266!
Note: Now you’d still have to get the images somehow to your ESP8266. I will update this post shortly and describe how you can do that…
Did you like this post? Consider supporting me with a virtual coffee or beer.