summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2019-10-04 11:27:57 -0600
committerCommit Bot <commit-bot@chromium.org>2019-10-04 22:15:46 +0000
commit4a29d2ecf4392cb995548e8f174cc85bac8361c1 (patch)
tree5f2cc3cf8a8f9f921d29f15728236be6cf668ae3 /util
parent53690d93cfed7649cfd85c512848d41f30d40682 (diff)
downloadchrome-ec-4a29d2ecf4392cb995548e8f174cc85bac8361c1.tar.gz
flash_ec: Look for flashrom in PATH before /usr/sbin
/usr/sbin should have lower priority than $PATH. This allows pointing to a different version of flashrom by setting the path variable. It shouldn't have any impact because by default flashrom is installed in /usr/sbin. BUG=none BRANCH=none TEST=PATH=/tmp/zork:$PATH flash_ec --board=zork --image=foo.bin Change-Id: Ie656bec10145734bdec1f067b08f164afcf89e90 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1842034 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@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 32d6203bf5..e256b9509a 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -783,7 +783,7 @@ function flash_openocd() {
# helper function for using servo with flashrom
function flash_flashrom() {
- TOOL_PATH="${EC_DIR}/build/${BOARD}/util:/usr/sbin/:$PATH"
+ TOOL_PATH="${EC_DIR}/build/${BOARD}/util:$PATH:/usr/sbin"
FLASHROM=$(PATH="${TOOL_PATH}" which flashrom)
if on_servov3; then