mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
The SoC looks for two RO images at reset, and is typically configured for two RW images as well. This CL reports version strings for all those images, as well as identifying the active RO and RW copies. Since the RO image doesn't contain a version string, we create one using the epoch_, major_, minor_, and img_chk_ members of its signed header. BUG=chrome-os-partner:55558 BRANCH=none TEST=make buildall; run on Cr50 hardware The "version" command now includes information like this: RO_A: * 0.0.2/a3c3d5ea RO_B: 0.0.2/8895c9eb RW_A: cr50_v1.1.4965-a6c1c73-dirty RW_B: * cr50_v1.1.4959-2f49d5c The '*' indicates the active image. The test/tpm_test/tpmtest.py program has been updated to request the version information at startup, and it also now reports similar information, just all on one line: RO_A:* 0.0.2/a3c3d5ea RO_B: 0.0.2/8895c9eb RW_A: cr50_v1.1 ... The active images are marked with a '*' following the ':', so that the same regexp can match either format: ($ro, $rw) = m/RO_[AB]:\s*\*\s+(\S+).*RW_[AB]:\s*\*\s+(\S+)/s; Change-Id: Ic27e295d9122045b2ec5a638933924b65ecc8e43 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/362861 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>