diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-07-26 11:08:55 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-29 20:39:30 +0000 |
commit | cb3adecc57273a927b4759939ce3031f6afc7f9b (patch) | |
tree | 16be2f04213073304d6bb8c4007f62d058c36f89 | |
parent | 5645d842b2c39e863f56c5da84fa9472ac4f68c7 (diff) | |
download | chrome-ec-cb3adecc57273a927b4759939ce3031f6afc7f9b.tar.gz |
zephyr: Change final output binary to ec.bin
For backwards compatibility set the final output binary to ec.bin
instead of zephyr.bin.
Remove some references to zephr.bin.
BRANCH=None
BUG=b:239887568
TEST=zmake build -a ; ls build/zephyr/*/output
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I9840699505ef97e338b5552de3237f5f6741c8e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3788136
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | docs/zephyr/zephyr_build.md | 2 | ||||
-rwxr-xr-x | util/ec_openocd.py | 2 | ||||
-rwxr-xr-x | util/flash_ec | 2 | ||||
-rw-r--r-- | zephyr/include/cros/binman.dtsi | 2 | ||||
-rw-r--r-- | zephyr/zmake/tests/test_packers.py | 4 | ||||
-rw-r--r-- | zephyr/zmake/zmake/output_packers.py | 8 |
6 files changed, 9 insertions, 11 deletions
diff --git a/docs/zephyr/zephyr_build.md b/docs/zephyr/zephyr_build.md index 8668c50e11..a80fe06d98 100644 --- a/docs/zephyr/zephyr_build.md +++ b/docs/zephyr/zephyr_build.md @@ -38,7 +38,7 @@ For example, to build the EC for `skyrim`, run: (chroot) $ zmake build skyrim ``` -The output binary will then be located at `build/zephyr/skyrim/output/zephyr.bin`. +The output binary will then be located at `build/zephyr/skyrim/output/ec.bin`. Additional output files you may find useful: diff --git a/util/ec_openocd.py b/util/ec_openocd.py index bff3e801ec..83894e58fc 100755 --- a/util/ec_openocd.py +++ b/util/ec_openocd.py @@ -141,7 +141,7 @@ def get_flash_file(board): / "zephyr" / board / "output" - / "zephyr.bin" + / "ec.bin" ).resolve() diff --git a/util/flash_ec b/util/flash_ec index 7b46353c81..e7673df071 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -676,8 +676,6 @@ fi # Possible default EC images if [ "${FLAGS_ro}" = ${FLAGS_TRUE} ] ; then EC_FILE=ec.RO.flat -elif [ "${FLAGS_zephyr}" = ${FLAGS_TRUE} ] ; then - EC_FILE=zephyr.bin else EC_FILE=ec.bin fi diff --git a/zephyr/include/cros/binman.dtsi b/zephyr/include/cros/binman.dtsi index d33092ee44..78003204de 100644 --- a/zephyr/include/cros/binman.dtsi +++ b/zephyr/include/cros/binman.dtsi @@ -7,7 +7,7 @@ #address-cells = <1>; #size-cells = <1>; binman { - filename = "zephyr.bin"; + filename = "ec.bin"; pad-byte = <0x1d>; wp-ro { compatible = "cros-ec,flash-layout"; diff --git a/zephyr/zmake/tests/test_packers.py b/zephyr/zmake/tests/test_packers.py index a038b51abd..8f9cfc9821 100644 --- a/zephyr/zmake/tests/test_packers.py +++ b/zephyr/zmake/tests/test_packers.py @@ -53,7 +53,7 @@ def test_file_size_in_bounds(data): """Test with file size limited.""" packer = FakePacker(100) with tempfile.TemporaryDirectory() as temp_dir_name: - file = pathlib.Path(temp_dir_name) / "zephyr.bin" + file = pathlib.Path(temp_dir_name) / "ec.bin" with open(file, "wb") as outfile: outfile.write(data) assert packer.check_packed_file_size(file=file, dir_map={}) == file @@ -65,7 +65,7 @@ def test_file_size_out_of_bounds(data): """Test with file size limited, and file exceeds limit.""" packer = FakePacker(100) with tempfile.TemporaryDirectory() as temp_dir_name: - file = pathlib.Path(temp_dir_name) / "zephyr.bin" + file = pathlib.Path(temp_dir_name) / "ec.bin" with open(file, "wb") as outfile: outfile.write(data) with pytest.raises(RuntimeError): diff --git a/zephyr/zmake/zmake/output_packers.py b/zephyr/zmake/zmake/output_packers.py index bc58d92ddc..7ef6d65dc5 100644 --- a/zephyr/zmake/zmake/output_packers.py +++ b/zephyr/zmake/zmake/output_packers.py @@ -108,7 +108,7 @@ class RawBinPacker(BasePacker): def pack_firmware(self, work_dir, jobclient, dir_map, version_string=""): del version_string - yield dir_map["singleimage"] / "zephyr" / "zephyr.bin", "zephyr.bin" + yield dir_map["singleimage"] / "zephyr" / "zephyr.bin", "ec.bin" class BinmanPacker(BasePacker): @@ -199,7 +199,7 @@ class BinmanPacker(BasePacker): if proc.wait(timeout=60): raise OSError("Failed to run binman") - yield work_dir / "zephyr.bin", "zephyr.bin" + yield work_dir / "ec.bin", "ec.bin" yield ro_dir / "zephyr" / "zephyr.elf", "zephyr.ro.elf" yield rw_dir / "zephyr" / "zephyr.elf", "zephyr.rw.elf" @@ -238,10 +238,10 @@ class NpcxPacker(BinmanPacker): dir_map, version_string=version_string, ): - if output_file == "zephyr.bin": + if output_file == "ec.bin": yield ( self._check_packed_file_size(path, dir_map), - "zephyr.bin", + "ec.bin", ) else: yield path, output_file |