diff options
author | Aseda Aboagye <aaboagye@google.com> | 2015-10-07 14:52:31 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-13 21:58:04 -0700 |
commit | d42ee9ef36fbdd54b5b18dc90215313d7f41a682 (patch) | |
tree | 91c59816c96b734d0342f8f86ac6b0b2e3e0c932 /chip/mec1322/util | |
parent | 9ed620f04bf7ba4593e45e2688194f56a796c984 (diff) | |
download | chrome-ec-d42ee9ef36fbdd54b5b18dc90215313d7f41a682.tar.gz |
glados: kunimitsu: Change image size to 100K.stabilize-smaug-7547.B
The MEC1322 is optimized for 96k code RAM and 32k data RAM, therefore
the default MEC1322 boards should follow this.
On GLaDOS and Kunimitsu, we cannot fit all of the data in data RAM,
therefore we adjust this boundary slightly.
This should not be moved further as this represents when we are truly
out of space.
128k image:
-3k loader
-1k for shmem/panic info
-24k RAM for RO/RW
-100k for RO/RW .text and .rodata
BUG=chrome-os-partner:46058
BUG=chrome-os-partner:46063
BUG=chrome-os-partner:45690
BRANCH=None
TEST=make -j buildall tests
TEST=Flash GLaDOS, verify AP and EC boot.
Change-Id: Ie53ef6dc607333968bee8f296e7c21ed629e357b
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/305362
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/mec1322/util')
-rwxr-xr-x | chip/mec1322/util/pack_ec.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chip/mec1322/util/pack_ec.py b/chip/mec1322/util/pack_ec.py index c306e34e5c..236d364b2c 100755 --- a/chip/mec1322/util/pack_ec.py +++ b/chip/mec1322/util/pack_ec.py @@ -18,7 +18,6 @@ LOAD_ADDR = 0x100000 HEADER_SIZE = 0x140 SPI_CLOCK_LIST = [48, 24, 12, 8] SPI_READ_CMD_LIST = [0x3, 0xb, 0x3b] -IMAGE_SIZE = 97 * 1024 CRC_TABLE = [0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d] @@ -133,11 +132,11 @@ def BuildTag(args): tag.append(Crc8(0, tag)) return tag -def PacklfwRoImage(rorw_file, loader_file): +def PacklfwRoImage(rorw_file, loader_file, image_size): """TODO:Clean up to get rid of Temp file and just use memory to save data""" """Create a temp file with the - first IMAGE_SIZE bytes from the rorw file and the + first image_size bytes from the rorw file and the bytes from the loader_file appended return the filename""" fo=tempfile.NamedTemporaryFile(delete=False) # Need to keep file around @@ -145,7 +144,7 @@ def PacklfwRoImage(rorw_file, loader_file): pro = fin1.read() fo.write(pro) with open(rorw_file, 'rb') as fin: - ro = fin.read(IMAGE_SIZE) + ro = fin.read(image_size) fo.write(ro) fo.close() return fo.name @@ -191,6 +190,9 @@ def parseargs(): parser.add_argument("--spi_read_cmd", type=int, help="SPI read command. 0x3, 0xB, or 0x3B.", default=0xb) + parser.add_argument("--image_size", type=int, + help="Size of a single image.", + default=(96 * 1024)) return parser.parse_args() # Debug helper routine @@ -208,7 +210,7 @@ def main(): spi_list = [] - rorofile=PacklfwRoImage(args.input, args.loader_file) + rorofile=PacklfwRoImage(args.input, args.loader_file, args.image_size) payload = GetPayload(rorofile) payload_len = len(payload) #print payload_len @@ -217,7 +219,7 @@ def main(): header_signature = SignByteArray(header, args.header_key) tag = BuildTag(args) # truncate the RW to 128k - payloadrw = GetPayloadFromOffset(args.input,IMAGE_SIZE)[:128*1024] + payloadrw = GetPayloadFromOffset(args.input,args.image_size)[:128*1024] os.remove(rorofile) # clean up the temp file spi_list.append((args.header_loc, header, "header")) |