summaryrefslogtreecommitdiff
path: root/extra/cr50_rma_open
Commit message (Collapse)AuthorAgeFilesLines
* cr50_rma_open: fix linter errorsMary Ruthven2020-02-141-193/+178
| | | | | | | | | | | | | | Fix errors from pylint. Use logging to print messages instead of print. BUG=b:149405690 BRANCH=none TEST=RMA open a device and enable testlab mode. Change-Id: I63a8b108b0f436291659f2f787ebcf72e8f4a523 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2052269 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* cr50_rma_open: port to python 3Mary Ruthven2020-02-141-43/+50
| | | | | | | | | | | | BUG=b:149405690 BRANCH=none TEST=run with python3 Change-Id: I42bcccec83c7c582450c0b599f46b3fbf0ab3f80 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2052268 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* cr50_rma_open: only disable timestamps with servodMary Ruthven2019-12-101-2/+5
| | | | | | | | | | | | | | | | cr50_rma_open can be run without servod. dut-control cr50_uart_timestamp:off fails if the script isn't running through servod. This change moves disabling timestamps, so it's only done on servod. BUG=none BRANCH=none TEST=run with and withoout servod Change-Id: Icc80d021dd7cbad8ae3632625b32b30368e5a94c Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1960919 Reviewed-by: Evan Green <evgreen@chromium.org>
* cr50_rma_open: Disable UART timestampsEvan Green2019-12-071-1/+2
| | | | | | | | | | | | | | | | | The log timestamps are unexpected by the script, and cause issues. Send a dut-control command to disable UART timestamps. Also fix the regex in the board ID portion to accept a colon as well as a comma, whichever comes first. BUG=None TEST=Try cr50_rma_unlock.py BRANCH=None Change-Id: Ie9e54e65b86c52aef120fa3249453bfc090cf6f0 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1921703 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* Unify #! use in python scriptsStefan Reinauer2019-10-011-1/+1
| | | | | | | | | | | | | | | | | | Right now we have several different versions of #! in our python scripts. Unify them all and specify that we are using python2. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> BUG=none BRANCH=none TEST=make buildall Change-Id: Iab33a3f5d4b827451a55542bcee8837b00da7867 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1817948 Commit-Queue: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* cr50_rma_open: check ccd open capabilitiesMary Ruthven2018-09-261-4/+16
| | | | | | | | | | | | | | | | | | OpenNoDevMode and OpenFromUSB will be set to Always during rma unlock. This will make open accessible from usb without dev mode. Update the testlab enable part of the script to check these before telling the user to enter dev mode. BUG=none BRANCH=none TEST=none Change-Id: I69fb7cdb9e33aa21ae1537e935046529c987edbc Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1208228 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* cr50_rma_open: update for new open requirementsMary Ruthven2018-08-021-13/+71
| | | | | | | | | | | | | | | | | | | | Cr50 can only be opened from the AP and the device has to be in dev mode before open can be run. Update cr50_rma_open to require dev mode and run ccd open from the AP. 0.3.9 will have ccd in the prod image. Update the script, so it can enable testlab mode on prod images. BUG=none BRANCH=none TEST=run rma open process with 0.4.9 Change-Id: If14851a274233b471f8de86c9ed2a2b4808d131b Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1157182 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* cr50_rma_open: add support for new challenge formatMary Ruthven2018-06-141-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | We started printing the challenge as generated challenge: ABHNDKD4Q7P6KHTKPN9E7...full challenge instead of ABHND KD4Q7 P6KHT KPN9E 7FSQX P249S PCP64 LVA8S W4XCH 7PZX6 FVWN5 QTUSK U3KBJ HH7RQ SEE5T JX78X add support for extracting the challenge from both formats. BUG=none BRANCH=none TEST=try to open tot image, 0.4.7 image, and 0.3.4 image Change-Id: I99a81f1f78284b21777242d27edaa474a0f12367 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1088130 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* cr50_rma_open: add support for testlab modeMary Ruthven2018-05-041-0/+87
| | | | | | | | | | | | | | | | | | Devices going into the testlab should have testlab mode enabled if possible. Add support for enabling testlab mode on prepvt images. BUG=none BRANCH=none TEST=make sure script complains when testlab mode isn't enabled on prepvt image and passes ok when testlab mode isn't enabled on prod images. Run testlab enable to make sure it works. Change-Id: I623cac192fed31241d08a9d25e46e705cbbeb908 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1040357 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* cr50_rma_open: add support for checking prepvt and prod versionsMary Ruthven2018-05-021-4/+11
| | | | | | | | | | | | | | | | | | | RMA support through the cr50 console is only a part images starting with 0.4.5. Check that the prepvt version is greater than or equal to 0.4.5. Versions 0.4.4 are greater than the prod version 0.3.3, but you can't use it to do RMA open through the console. It can only be done through the AP. BUG=none BRANCH=none TEST=none Change-Id: I7e08cc5dbc9f910686ea5917be755170c0587ee4 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1040356 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* cr50_rma_open: add servod supportMary Ruthven2018-04-241-3/+50
| | | | | | | | | | | | | | | | | Add support for finding the cr50 uart given a servo port or being given a servo console using -d. If servod is using ccd to run, we need to do ccd_reset after the authcode reboot. Add support for that as well. BUG=none BRANCH=none TEST=none Change-Id: I972ce60a2e67cc68b604d550579fb2e99db8ac08 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1025267 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* cr50_rma_open: check write protect tooMary Ruthven2018-04-191-36/+100
| | | | | | | | | | | | | | | | | | Cr50 RMA Open will disable write protect. Make sure it is disabled. If it isn't, manually disable write protect after rma_auth. If cr50 reboots or loses write protect, cr50_rma_open can now be used to force disable it again with cr50_rma_open -w. BUG=none BRANCH=none TEST=none Change-Id: I096cff51ae20b8a4cfbfa92892a011ff48f4cc49 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1016023 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* extra: add cr50 rma open utilityMary Ruthven2018-04-051-0/+376
The testlab will be running rma open on a bunch of devices. This change adds a script for them to use. The script handles things like finding the cr50 console and converting the rma_auth output into a full challenge url. The user can click on the url and generate the authcode. They can input the generated authcode back into the script. The script will check 'ccd' output to make sure rma open succeeds. BUG=none BRANCH=none TEST=on a reef and bob running 3.4, run the entire cr50_rma_open process. Verify RMA open succeeds Change-Id: I2c9aef565351b65848f29083cd1e2c1f6e77e2a4 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/994417 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>