summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-01-02 15:03:42 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-05 19:10:27 +0000
commit9ce66a98b28df3e832b822bdec24e32e69d57e08 (patch)
tree8896694e47fedb83bd482a4c7da7df341e661bf2 /util
parent05b0b9774a1c255e6332dc11f644b5e176f4f365 (diff)
downloadchrome-ec-9ce66a98b28df3e832b822bdec24e32e69d57e08.tar.gz
zinger: enable RO partition write-protection
Check the flash protection at startup, if the RDP is still at level 0 (no read protection) or if the RO partition is not write protected : - set the write protection on the first 16KB of flash (4 LSB of WRP0) - push the RDP to level 1, so SWD/serial monitor needs to fully erase the part before re-writing the code or the write-protection. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=samus BUG=chrome-os-partner:34935 TEST=dump the content of the option bytes. Change-Id: I11af64365a6fbc34327b2e463eb8e2d369ffacd2 Reviewed-on: https://chromium-review.googlesource.com/238262 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/flash_ec2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec
index 934af83770..3278f1d8fd 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -333,7 +333,7 @@ function flash_stm32() {
# Reset the EC
ec_reset
# Unprotect flash, erase, and write
- ${STM32MON} -d ${EC_UART} -u -e -w "${IMG}"
+ ${STM32MON} -d ${EC_UART} -U -u -e -w "${IMG}"
}
function flash_stm32_dfu() {