Skip to content

boards: declare ARCH=arm64 explicitly on five inheriting boards#9747

Merged
igorpecovnik merged 1 commit intomainfrom
boards-explicit-arch-overrides
May 2, 2026
Merged

boards: declare ARCH=arm64 explicitly on five inheriting boards#9747
igorpecovnik merged 1 commit intomainfrom
boards-explicit-arch-overrides

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

@igorpecovnik igorpecovnik commented May 2, 2026

Summary

Five board configs were inheriting their architecture either implicitly (via BOARDFAMILY → kernel-config selection) or by sourcing another board's .csc without overriding. Declare ARCH explicitly so arch-aware tooling can match them by a direct field read.

Board Why it was implicit Now
aml-t95z-plus.tvb BOARDFAMILY=meson-gxl (resolves arm64) ARCH=arm64 declared
ayn-odin2mini.csc sources ayn-odin2.csc declare -g ARCH=arm64
ayn-odin2portal.csc sources ayn-odin2.csc declare -g ARCH=arm64
ayn-thor.csc sources ayn-odin2.csc declare -g ARCH=arm64
gateway-dk.conf BOARDFAMILY=ls1046a ARCH=arm64 declared

Why

Build-matrix tooling that filters by ARCH at config-load time was missing these boards. Their resolved arch was always arm64 via inheritance, but the filter doesn't traverse the BOARDFAMILY → kernel-config → ARCH chain — it reads the field directly. Declaring ARCH here 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 configs job currently fails on the three ayn-odin2* derivative boards because the validator doesn't follow source ${SRC}/config/boards/<parent>.csc inheritance — it sees the children as missing BOARDFAMILY and KERNEL_TARGET. Those errors are pre-existing and unrelated to the ARCH change here; the fix lives in #9748. Once #9748 lands on main, this PR can rebase and CI will pass.

Test plan

  • After validate-board-config: follow source ${SRC}/config/boards inheritance #9748 merges, rebase this branch and re-run CI: Validate changed board configs passes 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

  • Chores
    • Updated board configuration files to properly declare ARM64 architecture support across multiple device models.
    • Configuration updates applied to five board variants with corrected metadata.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

📝 Walkthrough

Walkthrough

Board configuration files for five ARM-based devices are updated to explicitly declare the architecture as ARCH="arm64". One file also corrects a comment typo.

Changes

Board Architecture Declarations

Layer / File(s) Summary
Architecture Configuration
config/boards/aml-t95z-plus.tvb, config/boards/ayn-odin2mini.csc, config/boards/ayn-odin2portal.csc, config/boards/ayn-thor.csc, config/boards/gateway-dk.conf
All five board configurations add or declare ARCH="arm64" to explicitly specify the target architecture.
Comment Maintenance
config/boards/aml-t95z-plus.tvb
Inline comment for BOARDFAMILY is corrected from "s912's" to "s912s".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Five boards now know their rightful arm,
With arm64 declared in calm,
A typo fixed, the configs gleam,
Architecture dreams realized in team! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding explicit ARCH=arm64 declarations to five board configuration files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch boards-explicit-arch-overrides

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added 05 Milestone: Second quarter release size/small PR with less then 50 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions Bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels May 2, 2026
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.
@github-actions github-actions Bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Framework Framework components and removed size/small PR with less then 50 lines Ready to merge Reviewed, tested and ready for merge labels May 2, 2026
@igorpecovnik igorpecovnik changed the title boards: declare ARCH=arm64 explicitly on five inheriting boards boards: declare ARCH=arm64 explicitly + teach validator to follow source inheritance May 2, 2026
@igorpecovnik igorpecovnik force-pushed the boards-explicit-arch-overrides branch from 08fc9fa to d31891f Compare May 2, 2026 18:50
@igorpecovnik igorpecovnik changed the title boards: declare ARCH=arm64 explicitly + teach validator to follow source inheritance boards: declare ARCH=arm64 explicitly on five inheriting boards May 2, 2026
@github-actions github-actions Bot added size/small PR with less then 50 lines and removed size/medium PR with more then 50 and less then 250 lines labels May 2, 2026
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").
@igorpecovnik igorpecovnik force-pushed the boards-explicit-arch-overrides branch from d31891f to fe1b077 Compare May 2, 2026 18:56
@igorpecovnik igorpecovnik merged commit f13bc6b into main May 2, 2026
13 checks passed
@igorpecovnik igorpecovnik deleted the boards-explicit-arch-overrides branch May 2, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants