diff options
author | Vic Yang <victoryang@google.com> | 2015-01-09 11:11:00 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-16 22:58:02 +0000 |
commit | 535bbbb7749d846d48d17f4f9f6d12701e489d2f (patch) | |
tree | a41f32809e7dc3fd09a267c4d38fe387fc196943 | |
parent | e4073fdb31b02c26c5d7f8a81a58bc5a393f0384 (diff) | |
download | chrome-ec-535bbbb7749d846d48d17f4f9f6d12701e489d2f.tar.gz |
mec1322: Specify SPI flash size in KB
For boards without a shared SPI, it's reasonable to use a SPI flash
smaller than 1MB. Change the script to allow this.
BRANCH=None
BUG=chrome-os-partner:35308
TEST=Build strago and check the size of ec.spi.bin.
Change-Id: Iabf7065d158be5f82c55e182e430858a12b18b6e
Signed-off-by: Vic Yang <victoryang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/241111
Tested-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>
-rw-r--r-- | board/strago/build.mk | 2 | ||||
-rw-r--r-- | chip/mec1322/build.mk | 2 | ||||
-rwxr-xr-x | chip/mec1322/util/pack_ec.py | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/board/strago/build.mk b/board/strago/build.mk index 4a0bc00f08..d6559b43c9 100644 --- a/board/strago/build.mk +++ b/board/strago/build.mk @@ -8,7 +8,7 @@ # the IC is SMSC MEC1322 / external SPI is 4MB / external clock is crystal CHIP:=mec1322 -CHIP_SPI_SIZE_MB:=4 +CHIP_SPI_SIZE_KB:=4096 board-y=board.o # As this file is read more than once, must put the rules diff --git a/chip/mec1322/build.mk b/chip/mec1322/build.mk index 0c6284c420..abd69b227d 100644 --- a/chip/mec1322/build.mk +++ b/chip/mec1322/build.mk @@ -30,4 +30,4 @@ SCRIPTDIR:=./chip/${CHIP}/util cmd_pack_package = ${SCRIPTDIR}/pack_ec.py -o $@ -i $^ \ --payload_key ${SCRIPTDIR}/rsakey_sign_payload.pem \ --header_key ${SCRIPTDIR}/rsakey_sign_header.pem \ - --spi_size ${CHIP_SPI_SIZE_MB} + --spi_size ${CHIP_SPI_SIZE_KB} diff --git a/chip/mec1322/util/pack_ec.py b/chip/mec1322/util/pack_ec.py index 46aebe5564..360b7a5914 100755 --- a/chip/mec1322/util/pack_ec.py +++ b/chip/mec1322/util/pack_ec.py @@ -143,8 +143,8 @@ def main(): help="PEM key file for signing payload", default="rsakey_sign_payload.pem") parser.add_argument("-s", "--spi_size", type=int, - help="Size of the SPI flash in MB", - default=4) + help="Size of the SPI flash in KB", + default=4096) parser.add_argument("-l", "--header_loc", type=int, help="Location of header in SPI flash", default=0x170000) @@ -162,7 +162,7 @@ def main(): default=0xb) args = parser.parse_args() - spi_size = args.spi_size * 1024 * 1024 + spi_size = args.spi_size * 1024 spi_list = [] payload = GetPayload(args.input) |