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>
This commit is contained in:
Vic Yang
2015-01-09 11:11:00 -08:00
committed by ChromeOS Commit Bot
parent e4073fdb31
commit 535bbbb774
3 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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}

View File

@@ -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)