summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-04-01 11:54:57 +1100
committerCommit Bot <commit-bot@chromium.org>2021-04-06 21:12:31 +0000
commitbc22dfda4c5a003ead902664d82ad5e495290ca4 (patch)
tree9f162be3d5fc7a3f4c8beaa5c139c1e1182da790
parentf38daf612e9bd788791191dfd17940d757d303fa (diff)
downloadchrome-ec-stabilize-13904.67.B-cr50_stab.tar.gz
The cr50 serial number is based on the devid, so the serial number can be found using the sysinfo devid output. The serial number is the devid without '0x's, capitalized, and the space is replaced with a '-'. echo ${DEVID//0x/} | tr '[:lower:]' '[:upper:]' | tr ' ' '-' No scripts or tests use serialno. This command saves 208 bytes. BUG=b:181999426 TEST=none Change-Id: Ib6629ceb9cfa001d8c758077119717f29116cb15 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799442 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--chip/g/usb.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/chip/g/usb.c b/chip/g/usb.c
index cf2e0245da..377eb8a470 100644
--- a/chip/g/usb.c
+++ b/chip/g/usb.c
@@ -1553,26 +1553,4 @@ static void usb_load_serialno(void)
usb_set_serial(devid_str);
}
DECLARE_HOOK(HOOK_INIT, usb_load_serialno, HOOK_PRIO_DEFAULT - 1);
-
-static int command_serialno(int argc, char **argv)
-{
- struct usb_string_desc *sd = usb_serialno_desc;
- char buf[CONFIG_SERIALNO_LEN];
- int rv = EC_SUCCESS;
- int i;
-
- if (argc != 1) {
- ccprintf("Setting serial number\n");
- rv = usb_set_serial(argv[1]);
- }
-
- for (i = 0; i < CONFIG_SERIALNO_LEN; i++)
- buf[i] = sd->_data[i];
- ccprintf("Serial number: %s\n", buf);
- return rv;
-}
-
-DECLARE_CONSOLE_COMMAND(serialno, command_serialno,
- "[value]",
- "Read and write USB serial number");
#endif