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

riotboot: fix build errors #20210

Merged
merged 2 commits into from
Jan 3, 2024
Merged

riotboot: fix build errors #20210

merged 2 commits into from
Jan 3, 2024

Conversation

Enoch247
Copy link
Contributor

Contribution description

These patches fix some builds errors I experienced when playing with riotboot. The commit comments contain the details of each.

Testing procedure

Include riotboot/slots.h with riotbuild not enabled and observe that without this patch, the build will fail.

Attempt to build with an externally defined board which adds to the INCLUDES make macro and riotbuild enabled. Observe that without this patch, doing so will result in headers not being found which are located in those added include folders.

Issues/PRs references

  • none known

If external boards defined in one of the EXTERNAL_BOARD_DIRS folders
pulls in a header file external to the RIOT tree and added to the build
via the INCLUDES macro, the build will fail to find the header.

This patch adds the INCLUDES macro to the bootloader build step so that
the headers can be found.
When riotboot/slot.h is included, but riotboot is not enabled in the
build, a compiler error occures. This is because SLOT0_LEN is not
defined. This patch fixes this by surrounding the offending macrro with
a conditional compile. `riotboot_slot_size()` may still be called, in
which case it returns 0 for the size of any slot given.
@github-actions github-actions bot added Area: build system Area: Build system Area: sys Area: System labels Dec 21, 2023
@Enoch247 Enoch247 changed the title Fix riotboot riotboot: fix build errors Dec 21, 2023
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 21, 2023
@riot-ci
Copy link

riot-ci commented Dec 22, 2023

Murdock results

✔️ PASSED

9f27a5a sys/riotboot/slot: fix failed build

Success Failures Total Runtime
8098 0 8098 10m:54s

Artifacts

@benpicco benpicco enabled auto-merge January 2, 2024 17:54
@benpicco benpicco added this pull request to the merge queue Jan 2, 2024
Merged via the queue into RIOT-OS:master with commit 6d180c3 Jan 3, 2024
27 checks passed
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.01 milestone Feb 7, 2024
@Enoch247 Enoch247 deleted the fix-riotboot branch October 21, 2024 14:26
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 Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants