From a9e791c9059a3574093fd35301aa3a403efadbde Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Thu, 21 Mar 2024 16:44:07 -0600 Subject: [PATCH] scripts: Allow flashing EC only As somewhat of a hack, allow flashing only the EC by deleting the `firmware.rom` file before running `flash.sh`. Signed-off-by: Tim Crawford --- docs/flashing.md | 2 +- scripts/flash.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/flashing.md b/docs/flashing.md index 43a247d..24762ce 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -31,7 +31,7 @@ If the EC is flashed, the system will immediately power off. ### Availability -This method is only possible when firmware is unlock. Firmware is unlocked by +This method is only possible when firmware is unlocked. Firmware is unlocked by one of two methods: - The EC feature `CONFIG_SECURITY` is unset/disabled diff --git a/scripts/flash.sh b/scripts/flash.sh index 884559a..d6af88a 100755 --- a/scripts/flash.sh +++ b/scripts/flash.sh @@ -41,7 +41,10 @@ popd >/dev/null # Copy firmware mkdir -p "${BUILD}/${BASEDIR}/firmware" -cp -v "${BUILD}/firmware.rom" "${BUILD}/${BASEDIR}/firmware" +if [ -f "${BUILD}/firmware.rom" ] +then + cp -v "${BUILD}/firmware.rom" "${BUILD}/${BASEDIR}/firmware" +fi if [ -f "${BUILD}/ec.rom" ] then cp -v "${BUILD}/ec.rom" "${BUILD}/${BASEDIR}/firmware"