diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Makefile.rules | 3 | ||||
-rw-r--r-- | board/cr50/board.h | 4 |
3 files changed, 11 insertions, 2 deletions
@@ -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 diff --git a/Makefile.rules b/Makefile.rules index 976e0a92e2..abb1cf289d 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -238,7 +238,8 @@ dis-$(CONFIG_SHAREDLIB) += $(out)/$(SHOBJLIB)/$(SHOBJLIB).dis dis: $(dis-y) .PHONY: dis -hex-y := $(out)/RO/$(PROJECT).RO.hex $(out)/RW/$(PROJECT).RW.hex $(out)/$(PROJECT).hex +hex-y := $(out)/RW/$(PROJECT).RW.hex $(out)/$(PROJECT).hex +hex-$(CONFIG_FW_INCLUDE_RO) += $(out)/RO/$(PROJECT).RO.hex hex-$(CONFIG_RW_B) += $(out)/RW/$(PROJECT).RW_B.hex hex: $(hex-y) .PHONY: hex diff --git a/board/cr50/board.h b/board/cr50/board.h index 06fd5e1fd9..c7ddf13d13 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -28,6 +28,10 @@ #undef CONFIG_CMD_SYSJUMP #undef CONFIG_CMD_SYSLOCK +#define CONFIG_CUSTOMIZED_RO +/* TODO: find a way to drop RO build. */ +#define CONFIG_FW_INCLUDE_RO + #ifndef CR50_DEV /* Disable stuff that should only be in debug builds */ #undef CONFIG_CMD_CRASH |