summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2021-09-29 18:59:29 -0700
committerCommit Bot <commit-bot@chromium.org>2021-09-30 17:21:18 +0000
commitc13fecc4b009ea4ec6583896cea4cea07390df68 (patch)
treed5e9efc766db9ae3259914870b1686873fbdcb12 /Makefile
parent9fbc265dbcf7a98c46a55c6eac7667e16117eaef (diff)
downloadchrome-ec-c13fecc4b009ea4ec6583896cea4cea07390df68.tar.gz
cr50: make CONFIG_FW_INCLUDE_RO work properly
CONFIG_FW_INCLUDE_RO option controls wherever RO is built. This option didn't work properly and RO was always built. Fix this behavior. However, when RO is not built RW image should include some 16KB stub. This is not added yet, so for Cr50 we still set CONFIG_FW_INCLUDE_RO. Also, corrected behavior of CONFIG_CUSTOMIZED_RO which earlier was not properly taken into account and behavior depended on custom-ro_objs variable state which always added some common files so actual result was that CONFIG_CUSTOMIZED_RO is effectively on for chip/g. BUG=none TEST=make buildall -j; make BOARD=cr50 & flash Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I31599170050b360fad5c61dd1f81844bb315e1d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3195319 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index acabb9a2b3..79e282871f 100644
--- a/Makefile
+++ b/Makefile
@@ -319,7 +319,7 @@ dirs+=$(shell find driver -type d)
common_dirs=util
custom-ro_objs-y += $(custom-board-ro_objs-y)
-ifeq ($(custom-ro_objs-y),)
+ifneq ($(CONFIG_CUSTOMIZED_RO),y)
ro-common-objs := $(sort $(foreach obj, $(all-obj-y), $(out)/RO/$(obj)))
ro-only-objs := $(sort $(foreach obj, $(all-obj-ro), $(out)/RO/$(obj)))
ro-objs := $(sort $(ro-common-objs) $(ro-only-objs))
@@ -361,7 +361,11 @@ $(rw-eps) $(out)/RW/str_blob: $(rw-es)
$(rw-objs): $(out)/RW/str_blob $(rw-eps)
endif
+ifeq ($(CONFIG_FW_INCLUDE_RO),y)
deps := $(ro-deps) $(rw-deps) $(deps-y)
+else
+deps := $(rw-deps) $(deps-y)
+endif
.PHONY: ro rw
$(config): $(out)/$(PROJECT).bin