Skip to content

Commit

Permalink
[gen2][supply secure] remove HYBRID_BUILD [sc-102216]
Browse files Browse the repository at this point in the history
  • Loading branch information
technobly committed May 4, 2022
1 parent 1ea25a2 commit 86c5935
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 41 deletions.
3 changes: 1 addition & 2 deletions communication/src/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ CPPSRC += $(TARGET_SRC_PATH)/description.cpp
# ASM source files included in this build.
ASRC +=

# if PLATFORM_ID matches 13 23 25 or 26, and not DEBUG_BUILD=y, set LOG_LEVEL_ERROR
ifneq (,$(filter $(PLATFORM_ID), 13 23 25 26))
ifneq ($(DEBUG_BUILD),y)
ifneq ($(HYBRID_BUILD),y)
CFLAGS += -DLOG_COMPILE_TIME_LEVEL=LOG_LEVEL_ERROR
endif
endif
endif

LOG_MODULE_CATEGORY = comm
4 changes: 1 addition & 3 deletions hal/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ include $(call rwildcard,$(HAL_PLATFORM_SRC_PATH)/,sources.mk)

LOG_MODULE_CATEGORY = hal

# if PLATFORM_ID matches 13 23 25 or 26, and not DEBUG_BUILD or HYBRID_BUILD, set LOG_LEVEL_ERROR
# if PLATFORM_ID matches 13 23 25 or 26, and not DEBUG_BUILD=y, set LOG_LEVEL_ERROR
ifneq (,$(filter $(PLATFORM_ID),13 23 25 26))
ifneq ($(DEBUG_BUILD),y)
ifneq ($(HYBRID_BUILD),y)
CFLAGS += -DLOG_COMPILE_TIME_LEVEL=LOG_LEVEL_ERROR
endif
endif
endif
4 changes: 0 additions & 4 deletions hal/src/nRF52840/ota_module_bounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ PARTICLE_STATIC_ASSERT(radio_stack_start_address, MODULE_RADIO_STACK_START_ADDRE
#if defined(MODULAR_FIRMWARE) && MODULAR_FIRMWARE
// Make module_user_compat should appear in the list before module_user
const module_bounds_t* const module_bounds[] = { &module_bootloader, &module_system_part1, &module_user_compat, &module_user, &module_factory
#if defined(HYBRID_BUILD) // include the mono module so that the hybrid module validates. The reason to not do this all the time is because the
// list of modules becomes somewhat confusing (with the same address range covered by 2 distinct definitions.)
,&module_user_mono
#endif // defined(HYBRID_BUILD)
#else
const module_bounds_t* const module_bounds[] = { &module_bootloader, &module_user_mono
#endif /* defined(MODULAR_FIRMWARE) && MODULAR_FIRMWARE */
Expand Down
6 changes: 0 additions & 6 deletions modules/b5som/modular.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@ GLOBAL_DEFINES += USER_FIRMWARE_IMAGE_LOCATION=$(USER_FIRMWARE_IMAGE_LOCATION)
GLOBAL_DEFINES += MODULAR_FIRMWARE=1

export PLATFORM_ID ?= 25

ifneq (,$(filter $(PLATFORM_ID),25))
ifeq ($(HYBRID_BUILD),y)
GLOBAL_DEFINES += LOG_COMPILE_TIME_LEVEL=LOG_LEVEL_NONE
endif
endif
6 changes: 0 additions & 6 deletions modules/boron/modular.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@ GLOBAL_DEFINES += USER_FIRMWARE_IMAGE_LOCATION=$(USER_FIRMWARE_IMAGE_LOCATION)
GLOBAL_DEFINES += MODULAR_FIRMWARE=1

export PLATFORM_ID ?= 13

ifneq (,$(filter $(PLATFORM_ID),13 23))
ifeq ($(HYBRID_BUILD),y)
GLOBAL_DEFINES += LOG_COMPILE_TIME_LEVEL=LOG_LEVEL_NONE
endif
endif
6 changes: 0 additions & 6 deletions modules/shared/nRF52840/part1_build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ SYSTEM_PART1_MODULE_DEPENDENCY2=0,0,0
endif

GLOBAL_DEFINES += MODULE_VERSION=$(SYSTEM_PART1_MODULE_VERSION)
ifeq ("$(HYBRID_BUILD)", "y")
GLOBAL_DEFINES += HYBRID_BUILD=1
GLOBAL_DEFINES += MODULE_FUNCTION=$(MODULE_FUNCTION_MONO_FIRMWARE)
GLOBAL_DEFINES += MODULE_INDEX=0
else
GLOBAL_DEFINES += MODULE_FUNCTION=$(MODULE_FUNCTION_SYSTEM_PART)
GLOBAL_DEFINES += MODULE_INDEX=1
endif
GLOBAL_DEFINES += MODULE_DEPENDENCY=${SYSTEM_PART1_MODULE_DEPENDENCY}
GLOBAL_DEFINES += MODULE_DEPENDENCY2=${SYSTEM_PART1_MODULE_DEPENDENCY2}

Expand Down
6 changes: 0 additions & 6 deletions modules/tracker/modular.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@ GLOBAL_DEFINES += USER_FIRMWARE_IMAGE_LOCATION=$(USER_FIRMWARE_IMAGE_LOCATION)
GLOBAL_DEFINES += MODULAR_FIRMWARE=1

export PLATFORM_ID ?= 26

ifneq (,$(filter $(PLATFORM_ID),26))
ifeq ($(HYBRID_BUILD),y)
GLOBAL_DEFINES += LOG_COMPILE_TIME_LEVEL=LOG_LEVEL_NONE
endif
endif
3 changes: 1 addition & 2 deletions system/src/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ INCLUDE_DIRS += $(TARGET_SRC_PATH)/control/proto

LOG_MODULE_CATEGORY = system

# if PLATFORM_ID matches 13 23 25 or 26, and not DEBUG_BUILD=y, set LOG_LEVEL_ERROR
ifneq (,$(filter $(PLATFORM_ID),13 23 25 26))
ifneq ($(DEBUG_BUILD),y)
ifneq ($(HYBRID_BUILD),y)
CFLAGS += -DLOG_COMPILE_TIME_LEVEL=LOG_LEVEL_WARN
endif
endif
endif
6 changes: 0 additions & 6 deletions system/src/control/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,6 @@ int getModuleInfo(ctrl_request* req) {
if (type == PB(FirmwareModuleType_INVALID_FIRMWARE_MODULE)) {
continue;
}
#ifdef HYBRID_BUILD
// FIXME: Avoid enumerating the system module twice in case of a hybrid build
if (type == PB(FirmwareModuleType_MONO_FIRMWARE)) {
continue;
}
#endif // HYBRID_BUILD
PB(GetModuleInfoReply_Module) pbModule = {};
pbModule.type = type;
pbModule.index = module.info.module_index;
Expand Down

0 comments on commit 86c5935

Please sign in to comment.