boards: declare ARCH=arm64 explicitly on five inheriting boards#9747
Merged
igorpecovnik merged 1 commit intomainfrom May 2, 2026
Merged
boards: declare ARCH=arm64 explicitly on five inheriting boards#9747igorpecovnik merged 1 commit intomainfrom
igorpecovnik merged 1 commit intomainfrom
Conversation
Contributor
📝 WalkthroughWalkthroughBoard configuration files for five ARM-based devices are updated to explicitly declare the architecture as ChangesBoard Architecture Declarations
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7 tasks
iav
approved these changes
May 2, 2026
Contributor
|
✅ This PR has been reviewed and approved — all set for merge! |
igorpecovnik
added a commit
that referenced
this pull request
May 2, 2026
…eritance `Validate changed board configs` (PR #9747 CI run 25258999953) failed on the three Ayn-Odin2 derivative boards with: ERROR: config/boards/ayn-odin2mini.csc: BOARDFAMILY: required, ... ERROR: config/boards/ayn-odin2mini.csc: KERNEL_TARGET: required, ... (same pair on ayn-odin2portal.csc and ayn-thor.csc) The validator's header explicitly says it does NOT source the file ("boards have side-effecty function bodies"), and the regex `parse_assignments` only sees top-level `KEY=value` lines. Boards that consist of one `source "${SRC}/config/boards/<parent>.csc"` line plus a handful of overrides (BOARD_NAME, BOARD_VENDOR, BOARD_MAINTAINER, ARCH) inherit BOARDFAMILY / KERNEL_TARGET / KERNEL_TEST_TARGET from the parent, so the validator saw them as missing and erred out. The errors are pre-existing — they would fire on any future change to those .csc files. PR #9747 just made them visible by being the first PR to touch an inheriting board since the validator landed. Add `collect_inherited_assignments`: when a top-level `source` line points at another file under config/boards/ (matched by a regex anchored to start-of-line so `source` calls inside function bodies — which are always indented — aren't followed), parse that file's top-level assignments and lay them behind the child's own. Child's explicit values still win via dict.setdefault. Recursion is guarded by a visited set keyed on resolved paths, so a self-source or a parent-source-child cycle terminates instead of looping. Missing source targets are silently skipped — the main required-field checks will still flag any field that ends up unset after the merge, so a typo'd source path doesn't mask a real gap. Verified against the five PR-changed files: 6 errors → 0 errors, 4 warnings → 1 warning (the unmaintained-board warning on aml-t95z-plus.tvb, which is unrelated to inheritance and was already there). Self-contained boards (musepipro.conf etc.) produce identical output to before this change.
4 tasks
08fc9fa to
d31891f
Compare
igorpecovnik
added a commit
that referenced
this pull request
May 2, 2026
…eritance `Validate changed board configs` (PR #9747 CI run 25258999953) failed on the three Ayn-Odin2 derivative boards with: ERROR: config/boards/ayn-odin2mini.csc: BOARDFAMILY: required, ... ERROR: config/boards/ayn-odin2mini.csc: KERNEL_TARGET: required, ... (same pair on ayn-odin2portal.csc and ayn-thor.csc) The validator's header explicitly says it does NOT source the file ("boards have side-effecty function bodies"), and the regex `parse_assignments` only sees top-level `KEY=value` lines. Boards that consist of one `source "${SRC}/config/boards/<parent>.csc"` line plus a handful of overrides (BOARD_NAME, BOARD_VENDOR, BOARD_MAINTAINER, ARCH) inherit BOARDFAMILY / KERNEL_TARGET / KERNEL_TEST_TARGET from the parent, so the validator saw them as missing and erred out. The errors are pre-existing — they would fire on any future change to those .csc files. PR #9747 just made them visible by being the first PR to touch an inheriting board since the validator landed. Add `collect_inherited_assignments`: when a top-level `source` line points at another file under config/boards/ (matched by a regex anchored to start-of-line so `source` calls inside function bodies — which are always indented — aren't followed), parse that file's top-level assignments and lay them behind the child's own. Child's explicit values still win via dict.setdefault. Recursion is guarded by a visited set keyed on resolved paths, so a self-source or a parent-source-child cycle terminates instead of looping. Missing source targets are silently skipped — the main required-field checks will still flag any field that ends up unset after the merge, so a typo'd source path doesn't mask a real gap. Verified against the five PR-changed files: 6 errors → 0 errors, 4 warnings → 1 warning (the unmaintained-board warning on aml-t95z-plus.tvb, which is unrelated to inheritance and was already there). Self-contained boards (musepipro.conf etc.) produce identical output to before this change.
Five board configs were inheriting their architecture either implicitly
(via BOARDFAMILY → kernel-config selection) or by sourcing another
board's .csc and never overriding it. Declare ARCH explicitly so that
arch-aware tooling (e.g. the build matrix filter that picks which
boards a release/arch target should fan out to) can match them by a
direct field read instead of having to re-evaluate the
BOARDFAMILY-to-arch chain.
Boards touched:
aml-t95z-plus.tvb BOARDFAMILY=meson-gxl → ARCH=arm64
ayn-odin2mini.csc (sources ayn-odin2.csc) → ARCH=arm64
ayn-odin2portal.csc (sources ayn-odin2.csc) → ARCH=arm64
ayn-thor.csc (sources ayn-odin2.csc) → ARCH=arm64
gateway-dk.conf BOARDFAMILY=ls1046a → ARCH=arm64
No build behaviour change for these boards: the resolved ARCH was
already arm64 via inheritance, the declaration just makes it
addressable at config-load time without sourcing the kernel config
chain.
Also clean up a stray apostrophe in aml-t95z-plus.tvb's BOARDFAMILY
comment ("s912's" → "s912s").
d31891f to
fe1b077
Compare
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
Five board configs were inheriting their architecture either implicitly (via
BOARDFAMILY→ kernel-config selection) or by sourcing another board's.cscwithout overriding. DeclareARCHexplicitly so arch-aware tooling can match them by a direct field read.aml-t95z-plus.tvbBOARDFAMILY=meson-gxl(resolves arm64)ARCH=arm64declaredayn-odin2mini.cscayn-odin2.cscdeclare -g ARCH=arm64ayn-odin2portal.cscayn-odin2.cscdeclare -g ARCH=arm64ayn-thor.cscayn-odin2.cscdeclare -g ARCH=arm64gateway-dk.confBOARDFAMILY=ls1046aARCH=arm64declaredWhy
Build-matrix tooling that filters by
ARCHat config-load time was missing these boards. Their resolved arch was always arm64 via inheritance, but the filter doesn't traverse theBOARDFAMILY→ kernel-config →ARCHchain — it reads the field directly. DeclaringARCHhere is the cheapest way to make them visible without changing the filter.No build behaviour change
The boards already built as arm64 via the inheritance chain. This commit just surfaces the field at the board-config level.
Out of scope
Originally folded into #9683 as a side-trip ("Also fold a few per-board ARCH overrides..."). Splitting it out so the desktop migration PR stays focused and these board declarations can land independently.
Depends on #9748
The
Validate changed board configsjob currently fails on the threeayn-odin2*derivative boards because the validator doesn't followsource ${SRC}/config/boards/<parent>.cscinheritance — it sees the children as missingBOARDFAMILYandKERNEL_TARGET. Those errors are pre-existing and unrelated to theARCHchange here; the fix lives in #9748. Once #9748 lands onmain, this PR can rebase and CI will pass.Test plan
Validate changed board configspasses on all five files../compile.sh BOARD=ayn-odin2mini BRANCH=current build— succeeds with arm64 toolchain (no behaviour change vs main)../compile.sh BOARD=gateway-dk BRANCH=current build— same../compile.sh BOARD=aml-t95z-plus BRANCH=legacy build— same.Summary by CodeRabbit