summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-12-20 09:51:37 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-08 23:55:58 +0000
commitccb46f6d8e9c141f22c9d9cfe25dfcd1d433e8a4 (patch)
tree6f401a44d436fc7058049075d7b72253f79da27d /Makefile
parent49bfe43b905c1ca80d42b18dbed43d0a6270a012 (diff)
downloadchrome-ec-ccb46f6d8e9c141f22c9d9cfe25dfcd1d433e8a4.tar.gz
twinkie: build a combined firmware
Build a Twinkie firmware image with the regular Twinkie sniffer firmware in the RO partition and a firmware behaving as a USB PD sink in the RW partition. The user can call the "twinkie sink" command to switch the USB PD sink firmware in the RW partition (and call "reboot" if he changes his mind and wants the sniffer back). Restore the ability of building different tasklists which was broken where the tests build was simplified. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=make buildall ./board/twinkie/build_rw_variant Try "twinkie sink" command on a Twinkie with the combined firmware. Change-Id: Ie489ce97a774ae7a22ac639c49a3d6e412e62de8 Reviewed-on: https://chromium-review.googlesource.com/237221 Reviewed-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 01581fba35..d2cbd9a148 100644
--- a/Makefile
+++ b/Makefile
@@ -64,15 +64,17 @@ UC_PROJECT:=$(call uppercase,$(PROJECT))
# are dependent on particular configurations.
includes=include core/$(CORE)/include $(dirs) $(out) test
ifeq "$(TEST_BUILD)" "y"
+ _tsk_lst_file:=ec.tasklist
_tsk_lst:=$(shell echo "CONFIG_TASK_LIST CONFIG_TEST_TASK_LIST" | \
$(CPP) -P -Iboard/$(BOARD) -Itest \
-D"TASK_NOTEST(n, r, d, s)=" -D"TASK_ALWAYS(n, r, d, s)=n" \
- -D"TASK_TEST(n, r, d, s)=n" -imacros ec.tasklist \
+ -D"TASK_TEST(n, r, d, s)=n" -imacros $(_tsk_lst_file) \
-imacros $(PROJECT).tasklist)
else
+ _tsk_lst_file:=$(PROJECT).tasklist
_tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \
-Iboard/$(BOARD) -D"TASK_NOTEST(n, r, d, s)=n" \
- -D"TASK_ALWAYS(n, r, d, s)=n" -imacros ec.tasklist)
+ -D"TASK_ALWAYS(n, r, d, s)=n" -imacros $(_tsk_lst_file))
endif
_tsk_cfg:=$(foreach t,$(_tsk_lst) ,HAS_TASK_$(t))
CPPFLAGS+=$(foreach t,$(_tsk_cfg),-D$(t))