summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Granaghan <granaghan@google.com>2023-04-25 22:47:59 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-05 11:59:14 +0000
commit5da23d54a423cdca5f82988c697ccc5d5d738428 (patch)
tree2d86b166ff544df991319897651926660385dd0b
parent0985905e094b822d6ac8e8ddc621007fed9a41db (diff)
downloadchrome-ec-factory-brya-15231.B-cr50_stab.tar.gz
gsctool: Parse X branding from factory config.factory-brya-15231.B-cr50_stab
BUG=b:275356839 TEST=localhost ~ # gsctool -aD --factory_config chassis_x_branded: false hw_x_compliance_version: 08 raw value: 1122334455667788 Change-Id: I8b75886d22f921671160aa62a02d9872933200e1 Signed-off-by: Brian Granaghan <granaghan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4477485 Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Mary Ruthven <mruthven@chromium.org> (cherry picked from commit f430733d7accad534c1f4cbf750496c5866a22e9) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4507029 Auto-Submit: Wei-Shuo Su <stevesu@google.com> Commit-Queue: Wei-Shuo Su <stevesu@google.com> Tested-by: Wei-Shuo Su <stevesu@google.com> Reviewed-by: Louis Chiu <louischiu@google.com>
-rw-r--r--extra/usb_updater/gsctool.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c
index 1ba96bb294..11bb2bcf06 100644
--- a/extra/usb_updater/gsctool.c
+++ b/extra/usb_updater/gsctool.c
@@ -3389,8 +3389,12 @@ static int process_get_factory_config(struct transfer_descriptor *td)
}
uint64_t out = be64toh(response);
+ bool is_x_branded = (out >> 4) & 1;
+ uint8_t compliance_version = out & 0xF;
- printf("%"PRIX64"\n", out);
+ printf("raw value: %016"PRIX64"\n", out);
+ printf("chassis_x_branded: %s\n", is_x_branded ? "true" : "false");
+ printf("hw_x_compliance_version: %02X\n", compliance_version);
return 0;
}