summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authortim <tim2.lin@ite.corp-partner.google.com>2020-08-04 16:12:23 +0800
committerCommit Bot <commit-bot@chromium.org>2020-08-05 07:54:25 +0000
commit293d409879fdfba5048996742fe7f90048b2ac94 (patch)
treece1fe93f394a1e5296c8c5a487f7841096e2830b /util
parent85fd47d57d46b7783a6dc059483d6c744f9195a2 (diff)
downloadchrome-ec-293d409879fdfba5048996742fe7f90048b2ac94.tar.gz
flash_ec: ite_spi: Put FW image at the beginning of temp image
When FW image size is less than flash rom SPI size, the temp image should be placed after FW image for ite_spi programming mode. BUG=none BRANCH=none TEST=zephyr.bin(size=18.4k) is successfully burned to it8xxx2_evb to print hello world. Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Change-Id: I163d954e91d31a598d0957f7a4de67cef13223f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2335525 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/flash_ec3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec
index d6bde4ab7d..94f8423374 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -982,7 +982,8 @@ function flash_flashrom() {
T=/tmp/flash_spi_$$
DELETE_LIST+=( "${T}" )
- if [[ "${CHIP}" =~ ^npcx(|_int)_spi$ ]] ; then
+ if [[ "${CHIP}" =~ ^npcx(|_int)_spi$ ]] || \
+ [[ "${CHIP}" =~ "ite_spi" ]] ; then
{ # Patch temp image up to SPI_SIZE
cat "$IMG"
if [[ ${IMG_SIZE} -lt ${SPI_SIZE} ]] ; then