diff options
author | Raul E Rangel <rrangel@chromium.org> | 2018-08-28 13:04:11 -0600 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-09-10 21:16:41 +0000 |
commit | cbf90345d9f4d364dd6f0d1341d38a71491df7e3 (patch) | |
tree | 684ad3220432834280bbb3b326e86ca583f87db0 | |
parent | 9285db3f7d3fd50743df80b0dd1e28da46b5d2e1 (diff) | |
download | chrome-ec-cbf90345d9f4d364dd6f0d1341d38a71491df7e3.tar.gz |
flash_ec: Look for npcx_monitor.bin in the same dir as ec.bin
crrev.com/1194646 makes it so chromeos-ec installs the monitor.bin as
part of the build. The script just needs to be updated to use it. This
will allow using flash_ec for downloaded firmware or firmware built
using emerge chromeos-ec.
BUG=b:113288489
BRANCH=none
TEST=emerge-grunt chromeos-ec && flash_ec --board=grunt
Change-Id: Ie92b75a750dbf8ce4e01eafec7a01479915b1270
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1194354
Reviewed-by: Jett Rink <jettrink@chromium.org>
(cherry picked from commit 16839242bf1309feabbdc4ba52d4b19ede8dbd0a)
Reviewed-on: https://chromium-review.googlesource.com/1211736
-rwxr-xr-x | util/flash_ec | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec index 9f6ee74736..0fc8856d75 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -1049,6 +1049,16 @@ function flash_npcx_uut() { BUILD_PATH="${EC_DIR}/build/${BOARD}" MONITOR_PATH="${BUILD_PATH}/chip/npcx/spiflashfw" MON="${MONITOR_PATH}/npcx_monitor.bin" + + if [[ ! -f "$MON" ]]; then + MON="$(dirname "$IMG")/npcx_monitor.bin" + fi + + if [[ ! -f "$MON" ]]; then + echo "Failed to find npcx_monitor.bin" + exit 1 + fi + # The start address to restore monitor firmware binary MON_ADDR="0x200C3020" |