Commit Graph

4 Commits

Author SHA1 Message Date
Simon Glass
af47c2554d chid: Implement selection of the compatible string
Search the available CHIDs to determine the device on which U-Boot is
running. Use this to select the correct compatible string.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-04 07:08:25 -06:00
Simon Glass
7737e3c1d5 chid: Add subcommand for dealing with variants
Add a 'chid list' command to display the values for all CHID variants.
Also add 'chid detail' to see all details about a variant.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-04 07:08:25 -06:00
Simon Glass
89d735d8f2 chid: Support calculating values for each variant
Provide a table of variants which indicates which fields are included in
each. Use this to calculate the CHID for a variant. Add some tests to
cover this.

Provide a constant for the length of a uuid.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-04 07:08:24 -06:00
Simon Glass
99b1335957 chid: Create a basic CHID header and smbios interface
Microsoft uses information from SMBIOS tables to determine the device
Windows is running on. This same approach has been adopted by fwupd and
other projects.

The information is used to create a list of Computer Hardware
Identifiers (CHIDs) which are used to select firmware builds, etc.

The EFI app needs to support this approach so it can map CHIDs to the
associated compatible string.

Introduce a header file for CHIDs and a function which can extract the
necessary information from the SMBIOS tables.

Further work will deal with actually calculating CHIDs.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-04 07:08:24 -06:00