[Concept,21/25] sandbox: Provide hwid files for testing

Message ID 20250903133639.3235920-22-sjg@u-boot.org
State New
Headers
Series Selection of devicetree using CHIDs |

Commit Message

Simon Glass Sept. 3, 2025, 1:36 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Provide a few test devices for use with sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 board/sandbox/hwids/compatible.hwidmap | 12 ++++++++++++
 board/sandbox/hwids/test-device-1.txt  | 21 +++++++++++++++++++++
 board/sandbox/hwids/test-device-2.txt  | 19 +++++++++++++++++++
 3 files changed, 52 insertions(+)
 create mode 100644 board/sandbox/hwids/compatible.hwidmap
 create mode 100644 board/sandbox/hwids/test-device-1.txt
 create mode 100644 board/sandbox/hwids/test-device-2.txt
  

Patch

diff --git a/board/sandbox/hwids/compatible.hwidmap b/board/sandbox/hwids/compatible.hwidmap
new file mode 100644
index 00000000000..10dd29aed43
--- /dev/null
+++ b/board/sandbox/hwids/compatible.hwidmap
@@ -0,0 +1,12 @@ 
+# SPDX-License-Identifier: GPL-2.0+
+
+# compatible map for sandbox testing
+
+# Maps filenames in this directory to compatible strings used by Linux
+# for devicetrees.
+
+# Format:
+# filename (without .json suffix): compatible_string
+
+test-device-1: sandbox,test-device-1
+test-device-2: sandbox,test-device-2
\ No newline at end of file
diff --git a/board/sandbox/hwids/test-device-1.txt b/board/sandbox/hwids/test-device-1.txt
new file mode 100644
index 00000000000..ed7334c6f21
--- /dev/null
+++ b/board/sandbox/hwids/test-device-1.txt
@@ -0,0 +1,21 @@ 
+Computer Information
+--------------------
+BiosVendor: U-Boot
+BiosVersion: 2025.09
+BiosMajorRelease: 25
+BiosMinorRelease: 9
+FirmwareMajorRelease: ff
+FirmwareMinorRelease: ff
+Manufacturer: Sandbox Corp
+Family: Sandbox_Family
+ProductName: Sandbox Computer
+ProductSku: SANDBOX-SKU
+EnclosureKind: 2
+BaseboardManufacturer: Sandbox Boards
+BaseboardProduct: Sandbox Motherboard
+Hardware IDs
+------------
+{753cbd77-c567-521e-8931-e615613198f1}   <- Manufacturer + Family + ProductName + ProductSku + BiosVendor + BiosVersion + BiosMajorRelease + BiosMinorRelease
+{479402d0-272b-5214-9300-e59e3b4d606e}   <- Manufacturer + Family + ProductName + BiosVendor + BiosVersion + BiosMajorRelease + BiosMinorRelease
+{3148892e-ac5e-5277-9abf-366a685445c2}   <- Manufacturer + ProductName + BiosVendor + BiosVersion + BiosMajorRelease + BiosMinorRelease
+{48aede6f-65db-51a5-8905-fdabdbc0685e}   <- Manufacturer + Family + ProductName
diff --git a/board/sandbox/hwids/test-device-2.txt b/board/sandbox/hwids/test-device-2.txt
new file mode 100644
index 00000000000..8743ec9d285
--- /dev/null
+++ b/board/sandbox/hwids/test-device-2.txt
@@ -0,0 +1,19 @@ 
+Computer Information
+--------------------
+BiosVendor: Another Corp
+BiosVersion: V2.1
+BiosMajorRelease: 2
+BiosMinorRelease: 1
+FirmwareMajorRelease: 02
+FirmwareMinorRelease: 01
+Manufacturer: Another Corp
+Family: Another Family
+ProductName: Test Device 2
+ProductSku: TEST-SKU-002
+EnclosureKind: b
+BaseboardManufacturer: Another
+BaseboardProduct: TestBoard2
+Hardware IDs
+------------
+{87654321-8765-4321-1234-987654321098}   <- Manufacturer + Family + ProductName + ProductSku + BiosVendor + BiosVersion + BiosMajorRelease + BiosMinorRelease
+{98765432-9876-5432-2345-098765432109}   <- Manufacturer + Family + ProductName + BiosVendor + BiosVersion + BiosMajorRelease + BiosMinorRelease
\ No newline at end of file