Skip to content

Conversation

mguetschow
Copy link
Contributor

Contribution description

riotboot for some reason resets the environment before a recursive make call. The new environment lacks BUILD_DIR.

Testing procedure

BUILD_DIR=test make -C tests/riotboot all fails on master with:

fatal: not a git repository: '.git'
fatal: not a git repository: '.git'
make[1]: *** [/home/mikolai/TUD/Code/RIOT/pkg/pkg.mk:132: /home/mikolai/TUD/Code/RIOT/build/pkg/cmsis/.pkg-state.git-downloaded] Error 128

With this change, it passes.

Issues/PRs references

Found while investigating #21438 (comment)

@github-actions github-actions bot added the Area: build system Area: Build system label Aug 22, 2025
@mguetschow mguetschow added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels Aug 22, 2025
@mguetschow mguetschow requested review from crasbe and maribu August 22, 2025 09:23
@maribu maribu requested a review from benpicco August 22, 2025 09:28
@maribu maribu enabled auto-merge August 22, 2025 09:28
@crasbe crasbe added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Aug 22, 2025
@crasbe
Copy link
Contributor

crasbe commented Aug 22, 2025

riotboot for some reason resets the environment before a recursive make call.

This is understandable because the environment becomes very cluttered and there might be some flags that you don't want to set for the recursive call, but it is very difficult to filter them out individually.

What's a bit odd is that the code hasn't been touched in a long time, so why did this never show up? 🤔

@mguetschow
Copy link
Contributor Author

What's a bit odd is that the code hasn't been touched in a long time, so why did this never show up? 🤔

I guess because few people know of and use BUILD_DIR :P

@maribu
Copy link
Member

maribu commented Aug 22, 2025

And also we never needed external packages in riotboot so far. But with mpaland-printf being used now with newlib, we started doing so now.

@riot-ci
Copy link

riot-ci commented Aug 22, 2025

Murdock results

✔️ PASSED

625a8a8 makefiles/boot/riotboot: pass BUILD_DIR to recursive Make call

Success Failures Total Runtime
1 0 1 02m:24s

Artifacts

@maribu maribu added this pull request to the merge queue Aug 22, 2025
Merged via the queue into RIOT-OS:master with commit 9cb6c2e Aug 22, 2025
29 checks passed
@mguetschow mguetschow deleted the riotboot-builddir branch August 25, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants