fix: Orange Pi RV2 (SpacemiT K1) を SpacemiT として検出 (#11) - #12
Merged
Merged
Conversation
Ky 派生カーネルは /proc/device-tree/compatible に `ky,x1` / `ky,orangepi-rv2` を吐き、`spacemit,*` 文字列を含まないため、 既存の "spacemit" キーワードで検出できず汎用 RISC-V ロゴへ フォールバックしていた。VENDOR_KEYWORDS に "ky,x1" を追加。 "ky," 単独マッチは将来 Ky が別 SoC を採用した場合の silent miscategorization を招くため避け、"orangepi-rv2" は board 文字列 にしか出ない冗長キーワードのため採用しない。BPI-F3 等は既存の "spacemit" でヒット済みで影響なし。
将来 "ky," プレフィックスでまとめて受け入れる方向に変更された場合、 このテストが落ちて意図 (Ky 派生 distro 全部を SpacemiT 扱いしない) を 気付かせる防衛テスト。
5 tasks
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.
関連 Issue
closes #11
変更内容
VENDOR_KEYWORDSに("ky,x1", "spacemit")を追加し、Orange Pi RV2 などの Ky 派生カーネルが吐く device-tree 文字列を SpacemiT として検出できるようにした。背景
Orange Pi RV2 のカーネル (Ky 派生) は
/proc/device-tree/compatibleにky,orangepi-rv2ky,x1を、/proc/device-tree/modelにky x1 orangepi-rv2 boardを吐く。spacemit,*文字列がどこにも出ないため、既存の"spacemit"キーワードでヒットせず汎用 RISC-V ロゴへフォールバックしていた。採用しなかった案
"ky,"のような広いマッチ — Ky は SoC ベンダーではなく Orange Pi 向けディストロ/DTB 派生。将来 Ky が別社 SoC を採用した場合の silent miscategorization を避けたい"orangepi-rv2"— board 文字列にしか出ない冗長キーワード影響範囲
Banana Pi BPI-F3 など、
spacemit,k1を吐く本流カーネルのボードは既存"spacemit"キーワードでヒット済みのため影響なし。本 PR は Ky 派生 DTB を使うボードのみが対象。テスト
test_detect_orangepi_rv2_as_spacemitを追加 (実機/proc/device-tree/*文字列を入力)cargo test: 全 46 件パスcargo clippy --all-targets -- -D warnings: 警告なし実機検証
修正後 pi-rv2 にバイナリをコピーして
riscfetchを実行すると、汎用 "RISC-V" ロゴから "SpacemiT" / "RISC-V by SpacemiT" に変わる想定。