It wasn't trivial to set it up (at least for me), probably it worth to document it, so here is how you can connect and drive an SSD1306 display from Micropython running on an STM32F4 Discovery board:
Here is small program i wrote: manini [https://github.com/zgyarmati/manini]. It's for manipulating INI config files from shell scripts. I used to use crudini [https://github.com/pixelb/crudini], but it's Python, which is not always avalible on embedded systems (like OpenWrt, Buildroot) or i don't want to install it only for this. The other way would be to parse/edit the ini file directly from shell with awk and/or sed, but it's rather error prone, so i decided to roll a command line utility for this in C, based on the library minini [https://www.compuphase.com/minini.htm].
I had some problem lately with implementing a libmosquitto [ https://mosquitto.org/ ] client where i also needed to handle an other file descriptot (namely: a serial port) next to the libmosquitto client socket. Unfortunately the libmosquitto documentation is somewhat laconic on this, so i needed some experimenting and some hints from the [mosquitto-dev] mailing list. As I couldn't find a full example for this online, I think it's worth to publish it here.
When /dev/root (which is mostly a symlink to the actual block device mounted as root) is not available, instead of parsing /proc/cmdline (which is not guaranteed to contain the root= paramater), better to use the 'findmnt' tool as:
If one has an odd setup with SSH hosts regularly changing SSH host keys on a local network (like in my case regularly re-flashed embedded devices which generates SSH host keys at each first boot), it might be handy to disable the host key checking for these hosts, just add this to your ~/.ssh/config: