mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 21:25:03 +00:00
If EC-RO protects itself via the WRPx option bytes, flash_ec will fail
to reprogram it. And if EC-RO is broken/unbootable, it won't be able
to clear the WRPx option bytes itself when it sees the write protect
GPIO is not asserted.
Add the -u flag to stm32mon so that it will automatically attempt to
unprotect the flash via the option bytes.
BUG=chrome-os-partner:19723
BRANCH=none
TEST=enable write protect GPIO. Then from console, 'flashwp enable'.
Then from the chroot:
./util/flash_ec --board=pit --ro --image=build/pit/ec.RO.flat
That should successfully reflash the board.
Change-Id: Ic356d29104294d04d5e2a36dc75fd0206b89bd34
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56659