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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the README for building the esp8266 firmware advises to use Docker for building the firmware itself, but then advises to run
make deploydirectly 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 deployis 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
--deviceoption in Docker plus giving the image permissions to use the device. The trick with permissions it to set the docker userGIDto that of the device you are using. eg:As expected, the serial device is owned by root but has
dialoutas it's group, simply seetting that as the docker users GID, along with the device mapping, works well:Note the addition of
:dialoutto the-uoption to set the GID as well as UID, and the addition of--deviceto 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