From https://nodemcu.readthedocs.io/en/dev-esp32/
the firmware can now be run on any ESP module
Apparently the modules are not considered firmware as many are completely different.
Example: wifi on esp32 does not have wifi.sta.getip() but uses wifi.sta.on(). NTP vs TIME is totally different as well.
So, what are suggestions to maintain a single codebase or is that not even practical?