summaryrefslogtreecommitdiff
path: root/extra/cr50_rma_open
Commit message (Collapse)AuthorAgeFilesLines
* cr50_rma_open: check ccd open capabilitiesMary Ruthven2018-10-011-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> (cherry picked from commit 9e50f35372b8a351e9ca4f0b8159deeedb2bd00a) Reviewed-on: https://chromium-review.googlesource.com/1256044 Reviewed-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org>
* 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>