diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-10-03 14:08:35 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-08 22:23:18 -0700 |
commit | ec8b4d1de8e60d3482594ffdf19279051b880251 (patch) | |
tree | 728324f854336dff49a209905b21fdac64652dba /util/iteflash.c | |
parent | b7288876ac2500d50a49d925833382be6f1eb5fc (diff) | |
download | chrome-ec-ec8b4d1de8e60d3482594ffdf19279051b880251.tar.gz |
iteflash: do not erase by default
It could be beneficial to be able to write flash without erasing it
explicitly, for instance when programming a brand new chip, or when
testing modifications of the iteflash utility.
This patch makes sure that flash is erased only if '-e' command line
parameter is present.
The only place this utility is used by a script in Chrome OS codebase
is flash_ec, it is being updated to maintain current behavior.
BRANCH=none
BUG=none
TEST=verified that running
$ make BOARD=dragonegg -j
$ ./util/flash_ec --board=dragonegg
still succeeds when servod is running and the DUT is connected
through the servo-v2 board.
Change-Id: Ic238b895ff3324cf8c646908610ea3103d2b78c7
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1266675
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util/iteflash.c')
-rw-r--r-- | util/iteflash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/iteflash.c b/util/iteflash.c index bdbdf757f1..d0c79fa0cb 100644 --- a/util/iteflash.c +++ b/util/iteflash.c @@ -1583,7 +1583,7 @@ int main(int argc, char **argv) goto terminate; } - if (flags & FLAG_ERASE || output_filename) { + if (flags & FLAG_ERASE) { if (is8320dx) /* Do Normal Erase Function */ command_erase2(&chnd, flash_size, 0, 0); |