makefiles/docker: add support for tinybuild and smallbuild #21844
+87
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR is a first draft to add support for tinybuild and smallbuild in the RIOT build system and automagically selects the right image to use depending on the featureset.
Doing this as a bash-script inside of the make recipe isn't super nice, but I couldn't come up with anything better tbh.
The better solution would be to craft a Dockerfile that distinguishes between the platforms and possibly also gets
$(CPU_ARCH)and$(USEMODULE)as parameters. Then it would be easier to keep the platforms in sync, because it's in theriotdockerrepository and not here. Something likebuild-dispatcher.There is Multi-Stage building in Docker, but I have no experience with that and for the
build-dispatcherimage, we'd have to pull Alpine Linux again I guess? So there would be a size penalty.Testing procedure
To test whether the switch-case distinguishes correctly between the variants, I just replaced the
dockercommand withecho:Select the legacy
riotbuild:Issues/PRs references
Depends on RIOT-OS/riotdocker#259.