Skip to content
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

Feature request: A more flexible way to configure builds. #2990

Open
mk-pmb opened this issue Dec 31, 2019 · 10 comments
Open

Feature request: A more flexible way to configure builds. #2990

mk-pmb opened this issue Dec 31, 2019 · 10 comments

Comments

@mk-pmb
Copy link
Contributor

mk-pmb commented Dec 31, 2019

Missing feature

An easy way to generate app/include/user_*.h from config presets that can inherit and override each other. At the very minimum, let's do that Debian priority config thingy where a bash script sources all [0-9][0-9][0-9]*.rc from some directory in alphabetical order. (And I say bash because in that case we should use a config dictionary, not export top level environment variables.)

Justification

Look at the sed commands in nodemcu-custom-build. They're clearly a cry for help. While I might help with making the sed stuff more readable, I'd prefer we dig deeper, to the root of the problem.

Workarounds

I'm currently trying to roll my own 3rd party config wizard, but with the current user header files approach it's a mess to even confirm compatibility of firmware and wizard versions.

My approach

… would be to combine this with #2989, add a top-level directory build-config.default with some lua files that describe available options, and a top-level directory build-config.custom where users can put numbered subdirs with numbered config override lua files. (Having the subdirs should make it easier to docker-mount or symlink independent config patch collections without messing up their internal numbering.)
Since I'm new to LUA, in case LUA turns out too cumbersome, I might use python or bash as a temporary draft just so we have a better basis to talk about.
Would that be a good start?

@marcelstoer
Copy link
Member

Look at the sed commands in nodemcu-custom-build. They're clearly a cry for help.

Not really, no. Everything we do here in the firmware project should focus on what developers need and what they are already familiar with. If that makes it difficult for my cloud builder and the Docker image then so be it. I can easily accept that as it's a very special niche use case.

This is not to say that the firmware config mechanism with its .h files couldn't be improved. Apart from Terry's very helpful inline code/config comments very little changed since we took over maintenance from the original authors in summer 2015.

@mk-pmb
Copy link
Contributor Author

mk-pmb commented Jan 4, 2020

Anyone who uses custom config, has an expectation about the results, and can verify it, please help me learn what people really want customized, and (soon) whether my Github cloud builder can deliver it, by sharing your config files.
My idea is to first get it working with legacy config methods, then figure out nicer ones.

@uDude
Copy link

uDude commented Jan 11, 2020

I have an old note to use kconfig for this since it is the default in the linux kernel, busybox, LFS, and others. I literally just saw the note and was looking to see if any discussion on the topic had occurred.

@danielmconrad
Copy link

I came here to propose the same idea as @mk-pmb. A docker image that’s dependent on having a local copy of a git repo is very unconventional. If the firmware were configurable via an rc file, it would allow others to put together a full end-to-end application development environment. I know I may be biased, but I believe that happy app developers usually means good things for the ecosystem.

@mk-pmb
Copy link
Contributor Author

mk-pmb commented Mar 23, 2020

@danielmconrad, thanks for chiming in! :-)
I'm not sure if you found it already: nodemcu-firmware-build-as-github-action can already build firmwares based on just config files in a Github repo. The config file format is still very close to the original (mostly just filename changes), and not as modular and flexible as I hope I can make it, but a step towards. I will definitely try to take it further once I have more time.

@stale
Copy link

stale bot commented Mar 19, 2021

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.

@stale stale bot added the stale label Mar 19, 2021
@mk-pmb
Copy link
Contributor Author

mk-pmb commented Mar 20, 2021

I'm still interested.

@stale stale bot removed the stale label Mar 20, 2021
@uDude
Copy link

uDude commented Mar 25, 2021 via email

@stale
Copy link

stale bot commented Apr 16, 2022

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.

@stale stale bot added the stale label Apr 16, 2022
@mk-pmb
Copy link
Contributor Author

mk-pmb commented Apr 16, 2022

Haven't had time to make progress, but I think it's still a good idea.

@stale stale bot removed the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants