tree: 6e61e6913a33020f21097dab1fdc43ad65749038 [path history] [tgz]
  1. init/
  2. proto/
  3. testdata/
  4. BUILD.gn
  5. cli.cc
  6. cli.h
  7. cli_test.cc
  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. observer.cc
  17. observer.h
  18. OWNERS
  19. probe_result_getter.h
  20. probe_result_getter_fake.cc
  21. probe_result_getter_fake.h
  22. probe_result_getter_impl.cc
  23. probe_result_getter_impl.h
  24. probe_result_getter_impl_test.cc
  25. README.md
  26. test_utils.cc
  27. test_utils.h
  28. verifier.h
  29. verifier_fake.cc
  30. verifier_fake.h
  31. verifier_impl.cc
  32. verifier_impl.h
  33. 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