-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to Kconfig-like build configuration #3130
Comments
@nwf Nathaniel, @jmattsson Johny, this also overlaps with our discussions on #1661. What Johny and I were suggesting is to move our ESP8266 builds to an ESP-IDF (or variant) build environment with as much as the folder tree unified across the two branches. OK, our ESP8266 builds will stil need to build an ESP8266 non-OS SDK based firmware image rather than an ESP32 RTOS based one, but the more of the core components and build processes that are shared across the two variants the better, IMO. But quite a bit more planning needed before we start along this path, I think. |
Given that I'd like to move us in the direction of Lua+C modules sooner rather than later, I think pursuing this sooner rather than later is probably a good idea. The alternatives all necessitate teaching builders about the dependencies anyway, right? If we want "click button foo, get firmware image with foo.lua in LFS/SPIFFS/both and foo.c compiled in" to work. |
The next item on my TODO list now that the 5.3 stuff is merged, is indeed to switch the 8266 branch to use an IDF style build. I already prepared a non-OS SDK IDF here, and a small sample app to verify the linking etc. If you or someone else wants to help shift the esp8266 build into this format, I wouldn't turn down the help - the details are outlined in point 2 of the proposed way to merge 8266 & 32 branches (aka discussion 9). Item 3 deals with transitioning our |
Awesome! I'll try to carve out some time this weekend. :D |
Given that we have both in-C and in-Lua modules, would you @jmattsson accept a patch to the esp32 branch that renamed the symbols in https://github.com/nodemcu/nodemcu-firmware/blob/dev-esp32/components/modules/Kconfig from |
Sure, but in that case you'll also need to update the macro in |
This one doesn't make sense to me. The Unless, of course, we add some form of NodeMCU specific introspection. |
@TerryE The proposal is to move configuration out of C and into Kconfig (or, rather, to derive C configuration from Kconfig), so there will be Kconfig-namespace symbols for both in-C modules from |
Sorry. I don't agree. |
Alright, point taken. How about |
Not going to argue about that one. |
Ah, and I think I recall seeing @marcelstoer mention that the cloudbuilder supports esp32 now, so @nwf, you'll probably need to provide a patch for that one too to go in at the same time as the esp32 branch PR. And NODEMCU_{C,L}_MODULE is fine with me too. My initial choice of Kconfig variable name was simply in order to minimise the changes I had to make when moving things from |
It's been live since mid February and appears to work well. I keep the scripts here for anyone who cares: https://github.com/marcelstoer/nodemcu-custom-build/tree/master/ESP32 |
If we are going to do this then why not drop the |
|
Using the NODEMCU_ namespace prefix makes it obvious that these are not part of Lua proper (contrast, e.g., LUA_BUILTIN_STRING). Using "CMODULE" gives us room to differentiate between modules whose implementation is in C and whose implemenation is in Lua ("LMODULE"). The ESP8266 branch can adopt the same convention when it moves to Kconfig; see nodemcu#3130
Using the NODEMCU_ namespace prefix makes it obvious that these are not part of Lua proper (contrast, e.g., LUA_BUILTIN_STRING). Using "CMODULE" gives us room to differentiate between modules whose implementation is in C and whose implemenation is in Lua ("LMODULE"). The ESP8266 branch can adopt the same convention when it moves to Kconfig; see nodemcu#3130
That string is already long enough (fine for me, I like expressive identifiers) that I see no point in abbreviating "LUA" to "L". Hence, my proposal is |
I think @TerryE objected to |
The Lua runtime already uses the C and L prefixes, e.g. |
Using the NODEMCU_ namespace prefix makes it obvious that these are not part of Lua proper (contrast, e.g., LUA_BUILTIN_STRING). Using "CMODULE" gives us room to differentiate between modules whose implementation is in C and whose implemenation is in Lua ("LMODULE"). The ESP8266 branch can adopt the same convention when it moves to Kconfig; see #3130
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
user_modules.h
anduser_config.h
are a little unfortunate. Among other things, this style of configuration means:tools/update_buildinfo.sh
)We should move to something like Kconfig, where we articulate the dependencies and parameters in a machine readable language and have tools generate a
.config
file that everything downstream can source easily. Because.config
is merely a list of assertions, with no computational content, there's less risk that things go wrong (e.g. the use of#if 0
inuser_modules.h
will cause a discrepancy between actually included modules and the list of included modules).We can use this to speed up builds (skipping
mbedtls
, for example, if there's no need for it, and not building modules not requested) but more significantly the improved articulation of configuration will let tools beyond C consume it and let us, for example, decide which Lua module files land in LFS/SPIFFS more readily, I think.https://pypi.org/project/kconfiglib/ is a full Python implementation (and so works on Windows) and is already used by esp-idf upstream.
This should be very straightforward, just time consuming and invasive across the tree, with impacts on the various build tools (esp. web image builder). Given the invasiveness, if there is consensus that this is a good idea, I propose we wait until the 5.3 work has landed, first.
The text was updated successfully, but these errors were encountered: