diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de577b..53546e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [Unreleased] + +### Fixed +- Detect Orange Pi RV2 (SpacemiT K1) as SpacemiT vendor. Ky-derived kernels expose `ky,x1` / `ky,orangepi-rv2` in `/proc/device-tree/compatible` instead of `spacemit,*`, so the existing `spacemit` keyword missed them and the board fell back to the generic RISC-V logo. + ## [2.3.0] - 2026-04-06 ### Added diff --git a/crates/riscfetch-cli/src/vendors.rs b/crates/riscfetch-cli/src/vendors.rs index b86b4d2..5d85a51 100644 --- a/crates/riscfetch-cli/src/vendors.rs +++ b/crates/riscfetch-cli/src/vendors.rs @@ -92,6 +92,7 @@ const VENDOR_KEYWORDS: &[(&str, &str)] = &[ ("cv1800", "sophgo"), ("sg2000", "sophgo"), ("ch32v", "wch"), + ("ky,x1", "spacemit"), // Vendor names (generic, checked after specific keywords) ("eswin", "eswin"), ("ultrarisc", "ultrarisc"), @@ -242,6 +243,22 @@ mod tests { assert_eq!(detect_vendor("Some Unknown Board", "unknown,board"), None); } + #[test] + fn test_detect_orangepi_rv2_as_spacemit() { + assert_eq!( + detect_vendor("ky x1 orangepi-rv2 board", "ky,orangepi-rv2 ky,x1"), + Some("spacemit") + ); + } + + #[test] + fn test_ky_orangepi_alone_does_not_match() { + // We deliberately key on "ky,x1" only. A bare "ky,orangepi-rv2" without + // "ky,x1" is rejected so future Ky-derived boards on non-SpacemiT SoCs + // are not silently miscategorized. + assert_eq!(detect_vendor("", "ky,orangepi-rv2"), None); + } + #[test] fn test_all_vendors_have_info() { for (aliases, display_name, subtitle) in VENDORS {