tree: f6f6a80edc913e2e5845bf2f30dea4abc3d75060 [path history] [tgz]
  1. BUILD.gn
  2. OWNERS
  3. README.md
  4. cli.cc
  5. cli.h
  6. cli_test.cc
  7. hardware_verifier.proto
  8. hw_verification_spec_getter.h
  9. hw_verification_spec_getter_fake.cc
  10. hw_verification_spec_getter_fake.h
  11. hw_verification_spec_getter_impl.cc
  12. hw_verification_spec_getter_impl.h
  13. hw_verification_spec_getter_impl_test.cc
  14. log_utils.h
  15. main.cc
  16. probe_result_getter.h
  17. probe_result_getter_fake.cc
  18. probe_result_getter_fake.h
  19. probe_result_getter_impl.cc
  20. probe_result_getter_impl.h
  21. probe_result_getter_impl_test.cc
  22. test_utils.cc
  23. test_utils.h
  24. testdata/
  25. verifier.h
  26. verifier_fake.cc
  27. verifier_fake.h
  28. verifier_impl.cc
  29. verifier_impl.h
  30. verifier_impl_test.cc
hardware_verifier/README.md

Overview

Hardware Verifier is a command line tool that checks if the device is compliant. The program obtains the hardware probe result from the Rumtime Probe and compares it with the hardware verification spec. The hardware verification spec is generated from the DLM (Device Lifecycle Management) and the AVL (Approved Vendor List) services and contains both the qualification status of each hardware components and the expected hardware probe result like the total DRAM size and the display panel resolution.

Motivation

Various of benefits can be taken from the Hardware Verifier. The following list contains some potential scenarios:

  • If a hardware component were replaced by an unqualified one during the repairing process, we might want to warn the user about that.
  • We can include the verification result in the feedback report to describe the latest device's status, which should be more up-to-date then current HWID encoding.
  • In the factory, we would like to help the partner building devices with the right spec for each SKU and to prevent the partner from using the peripheral components that are not qualified.

Currently, the HWID generating flow provides similar checks. However, that check is a one-time check and only available in the manufacturing environment.

Usage

Command Line Interface (Not Implemented Yet)

Users can call the tool directly by invoking the binary with arguments:

/usr/bin/hardware_verifier \
  [--verbosity=<log_level>] \
  [--probe_result_file=<path_to_the_probe_result>] \
  [--hw_verification_spec=<path_to_the_hardware_verification_spec>] \
  [--output_format=proto|text]

The tool loads the correct probe result data and the hardware verification spec based on the given arguments. Then it outputs the verification results to the standard output.

Testing

Unit tests are provided and can be run in chroot by the following command:

FEATURES=test emerge-<board> chromeos-base/hardware_verifier

Development