fix(build): allow kalimba board to configure, drop dead duplicate dispatch - #48
Open
HoneyTyagii wants to merge 1 commit into
Open
fix(build): allow kalimba board to configure, drop dead duplicate dispatch#48HoneyTyagii wants to merge 1 commit into
HoneyTyagii wants to merge 1 commit into
Conversation
…patch The board dispatch chain contained a stray message(FATAL_ERROR) inside the kalimba branch, so selecting -DEBLDR_BOARD=kalimba always aborted configure with 'Unknown board: kalimba' even though the port exists and had just been registered. The same block also carried a full second copy of the board dispatch (cortex_m3 .. kalimba) that was unreachable dead code, since every name in it already matched an earlier branch. Remove the misplaced FATAL_ERROR and the duplicate branch block, leaving a single dispatch chain where each of the 83 board ports is matched exactly once, followed by the intended else() fallback for unknown boards. Add scripts/check_board_config.sh, a configure-only regression check that asserts every board under boards/ configures and that an unknown board name is still rejected.
HoneyTyagii
requested review from
hshanmug12,
maheshmunnangi and
srpatcha
as code owners
August 26, 2026 17:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Selecting
-DEBLDR_BOARD=kalimbaalways failed at configure time withUnknown board: kalimba, even thoughboards/kalimba/exists and the branch had already registered the port. The cause was a straymessage(FATAL_ERROR ...)sitting inside thekalimbabranch of the board dispatch inCMakeLists.txt. The same region also contained a full second copy of the board dispatch (cortex_m3throughkalimba) that was unreachable dead code.This PR fixes the dispatch and adds a configure-only regression check.
Type of Change
Changes
CMakeLists.txt: remove the misplacedmessage(FATAL_ERROR "Unknown board: ...")from inside thekalimbabranch, and delete the duplicate, unreachable dispatch block that followed it. The result is a single dispatch chain in which each of the 83 board ports is matched exactly once, terminated by the intendedelse()fallback that rejects unknown board names.scripts/check_board_config.sh: new configure-only regression check. It asserts that every board directory underboards/configures successfully with-DEBLDR_BOARD=<name>, and that an unknown board name is still rejected with a fatal error. No cross toolchains are required (configure only, no compilation).Testing
Verification performed (CMake 4.4.2, GCC 16.2.1, Linux x86_64 host build):
cmake -DEBLDR_BOARD=kalimbaaborts withCMake Error ... Unknown board: kalimba.cmake -DEBLDR_BOARD=kalimbaconfigures cleanly, andcmake --build <dir> --target board_kalimbacompiles the port.boards/configure successfully (checked one by one).-DEBLDR_BOARD=does_not_exist) is still rejected with the fatalUnknown boarderror.scripts/check_board_config.shreportsRESULT: FAILon unmodifiedmaster(it catches the kalimba regression) andRESULT: PASSwith this PR applied.-DEBLDR_BUILD_TESTS=ONandctestgive the same result asmaster: all tests pass except the pre-existingtest_recoverylink failure (undefinedeos_boot_log_*symbols), which exists onmasterindependently of this change and is addressed by separate open PRs.Pre-Submission Checklist
Related Issues
N/A. No open issue tracks this; found while exploring the codebase.
Screenshots / Logs
Reproduction on
master:After the fix:
Additional Notes
scripts/check_board_config.shis ready to be wired into CI (for example the lint/host job in.github/workflows/build.yml) if maintainers want it to run automatically; I left that out to keep this change minimal.