From 86c59350f31593db277247fe5182bf62291b8ded Mon Sep 17 00:00:00 2001 From: Technobly Date: Wed, 4 May 2022 14:57:13 -0500 Subject: [PATCH] [gen2][supply secure] remove HYBRID_BUILD [sc-102216] --- communication/src/build.mk | 3 +-- hal/build.mk | 4 +--- hal/src/nRF52840/ota_module_bounds.c | 4 ---- modules/b5som/modular.mk | 6 ------ modules/boron/modular.mk | 6 ------ modules/shared/nRF52840/part1_build.mk | 6 ------ modules/tracker/modular.mk | 6 ------ system/src/build.mk | 3 +-- system/src/control/storage.cpp | 6 ------ 9 files changed, 3 insertions(+), 41 deletions(-) diff --git a/communication/src/build.mk b/communication/src/build.mk index 0e2d4552b6..e6c0cb3006 100644 --- a/communication/src/build.mk +++ b/communication/src/build.mk @@ -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 diff --git a/hal/build.mk b/hal/build.mk index e5fd9ae675..2184d43f94 100644 --- a/hal/build.mk +++ b/hal/build.mk @@ -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 diff --git a/hal/src/nRF52840/ota_module_bounds.c b/hal/src/nRF52840/ota_module_bounds.c index c13c5843ae..6ff078190d 100644 --- a/hal/src/nRF52840/ota_module_bounds.c +++ b/hal/src/nRF52840/ota_module_bounds.c @@ -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 */ diff --git a/modules/b5som/modular.mk b/modules/b5som/modular.mk index 8c45f941c3..5641284514 100644 --- a/modules/b5som/modular.mk +++ b/modules/b5som/modular.mk @@ -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 diff --git a/modules/boron/modular.mk b/modules/boron/modular.mk index 5ea051d856..c8edc5fbca 100644 --- a/modules/boron/modular.mk +++ b/modules/boron/modular.mk @@ -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 diff --git a/modules/shared/nRF52840/part1_build.mk b/modules/shared/nRF52840/part1_build.mk index 1dedd70f07..10a74253b8 100644 --- a/modules/shared/nRF52840/part1_build.mk +++ b/modules/shared/nRF52840/part1_build.mk @@ -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} diff --git a/modules/tracker/modular.mk b/modules/tracker/modular.mk index f6593cc033..3242caf863 100644 --- a/modules/tracker/modular.mk +++ b/modules/tracker/modular.mk @@ -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 diff --git a/system/src/build.mk b/system/src/build.mk index 0334b73860..be02604fc0 100644 --- a/system/src/build.mk +++ b/system/src/build.mk @@ -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 diff --git a/system/src/control/storage.cpp b/system/src/control/storage.cpp index 16f752066f..3c7d1759e7 100644 --- a/system/src/control/storage.cpp +++ b/system/src/control/storage.cpp @@ -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;