summaryrefslogtreecommitdiff
path: root/chip/ish/build.mk
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-02-26 16:12:23 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-04 17:44:56 -0800
commit58fee9dbc2ef12bb436ceb18ad116ad2e421dd2d (patch)
tree1541271b17e285dec837291fbef22e45ace959ea /chip/ish/build.mk
parentf06b101887b370dacb6a974023edbdbdb84f3d75 (diff)
downloadchrome-ec-58fee9dbc2ef12bb436ceb18ad116ad2e421dd2d.tar.gz
makefile: add manifest header support
The ISH FW image needs to have a static manifest header prepended to built ISH image before it can be loaded on to hardware. The header we prepend is static and is the bare minimum to make the corresponding shim loader work correctly. BRANCH=none BUG=b:122371717,b:124788278 TEST=ec.bin output will chain load properly when sent to the kernel driver. Change-Id: I5458782d70308c99e297b823fd085a74480d252e Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1490671 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/ish/build.mk')
-rw-r--r--chip/ish/build.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/chip/ish/build.mk b/chip/ish/build.mk
index 7ae315c505..2af293e258 100644
--- a/chip/ish/build.mk
+++ b/chip/ish/build.mk
@@ -32,4 +32,8 @@ SCRIPTDIR:=./chip/${CHIP}/util
# Allow SPI size to be overridden by board specific size, default to 256KB.
CHIP_SPI_SIZE_KB?=256
-$(out)/$(PROJECT).bin:
+# Commands to convert $^ to $@.tmp - This will add the manifest header needed
+# to load the FW onto the ISH HW.
+cmd_obj_to_bin = $(OBJCOPY) --gap-fill=0xff -O binary $< $@.tmp1 ; \
+ ${SCRIPTDIR}/pack_ec.py -o $@.tmp -i $@.tmp1 \
+ --image_size $(_rw_size); rm -f $@.tmp1