How to: upload esp8266 firmware via Docker #15452
Unanswered
easytarget
asked this question in
ESP8266
Replies: 1 comment
-
Possibly in the wrong category; not really a question. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently the README for building the esp8266 firmware advises to use Docker for building the firmware itself, but then advises to run
make deploy
directly on the host to program the board.On my Fedora40 box, the docker build went very well, but then deploy crashed out badly:
Eg;
make deploy
is now dependent on the ESP toolchain. Kind of defeating the purpose of using Docker in the first place.. But I wondered if Docker could do it via a device mapping.Turns out to be trivial; the
--device
option in Docker plus giving the image permissions to use the device. The trick with permissions it to set the docker userGID
to that of the device you are using. eg:As expected, the serial device is owned by root but has
dialout
as it's group, simply seetting that as the docker users GID, along with the device mapping, works well:Note the addition of
:dialout
to the-u
option to set the GID as well as UID, and the addition of--device
to ensure that /dev/USB0 is accessible to the container. Since I am using /dev/ttyUSB0 and not the default device (/dev/ttyACM0) I also pass that to the make command.This works, the board then programs perfectly :-)
I plan to put in a PR against ports/esp8266/README.md for this, unless anybody has thoughts/doubts/comments?
Beta Was this translation helpful? Give feedback.
All reactions