feat(core): introduce EXTAPP_SUPPORT build option
What changed, and why it matters
This commit adds a new build-time switch called EXTAPP_SUPPORT. When turned off (the default), it prevents the 'app_loading' feature from being compiled into firmware for the T3W1 model. This is purely a build-system/configuration change and does not alter runtime behavior, fix a bug, or change any security-critical code path on its own.
No security action required. Treat as a normal build-feature toggle. If reviewing a larger feature branch, evaluate the security of the app_loading feature itself separately.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change introduces an EXTAPP_SUPPORT make/environment variable, defaulting to 0, and threads it through three SCons build scripts. The only functional effect is gating the addition of the ‘app_loading’ feature to FEATURES_WANTED behind both the T3W1 model check and EXTAPP_SUPPORT == ‘1’. Previously, app_loading was enabled unconditionally for T3W1. No runtime code, APIs, or security boundaries are modified.
Changed components
core/Makefilecore/SConscript.firmwarecore/SConscript.kernelcore/SConscript.unixInspect captured patch +9 / −3
diff --git a/core/Makefile b/core/Makefile
index 6f259e0d..e66eddad 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -48,6 +48,7 @@ TREZOR_DISABLE_ANIMATION ?= $(if $(filter 0,$(PYOPT)),1,0)
STORAGE_INSECURE_TESTING_MODE ?= 0
UI_PERFORMANCE_OVERLAY ?= 0
DBG_CONSOLE ?=
+EXTAPP_SUPPORT ?= 0
# If set, VCP writes will be blocking, in order to allow reliable debug data transmission over VCP.
# Disabled by default, to prevent debug firmware from getting stuck while writing log messages (if the host is not reading them).
@@ -144,6 +145,7 @@ SCONS_VARS = \
UI_PERFORMANCE_OVERLAY="$(UI_PERFORMANCE_OVERLAY)" \
BLOCK_ON_VCP="$(BLOCK_ON_VCP)" \
DBG_CONSOLE="$(DBG_CONSOLE)" \
+ EXTAPP_SUPPORT="$(EXTAPP_SUPPORT)"
ifdef DISABLE_OPTIGA
SCONS_VARS += DISABLE_OPTIGA="$(DISABLE_OPTIGA)"
diff --git a/core/SConscript.firmware b/core/SConscript.firmware
index 34e16832..f8f0d6c1 100644
--- a/core/SConscript.firmware
+++ b/core/SConscript.firmware
@@ -26,6 +26,7 @@ DISABLE_ANIMATION = ARGUMENTS.get('TREZOR_DISABLE_ANIMATION', '0') == '1'
BLOCK_ON_VCP = ARGUMENTS.get('BLOCK_ON_VCP', '0') == '1'
UI_PERFORMANCE_OVERLAY = ARGUMENTS.get('UI_PERFORMANCE_OVERLAY', '0') == '1'
DBG_CONSOLE = ARGUMENTS.get('DBG_CONSOLE', '')
+EXTAPP_SUPPORT = ARGUMENTS.get('EXTAPP_SUPPORT', '0') == '1'
STORAGE_INSECURE_TESTING_MODE = ARGUMENTS.get('STORAGE_INSECURE_TESTING_MODE', '0') == '1'
if STORAGE_INSECURE_TESTING_MODE and PRODUCTION:
@@ -88,7 +89,7 @@ if PYOPT == '0':
if DBG_CONSOLE != "":
FEATURES_WANTED += ["dbg_console"]
-if TREZOR_MODEL in ['T3W1']:
+if TREZOR_MODEL in ['T3W1'] and EXTAPP_SUPPORT:
FEATURES_WANTED += ["app_loading"]
CCFLAGS_MOD = ''
diff --git a/core/SConscript.kernel b/core/SConscript.kernel
index 812657c4..0d089a11 100644
--- a/core/SConscript.kernel
+++ b/core/SConscript.kernel
@@ -18,6 +18,7 @@ DISABLE_TROPIC = ARGUMENTS.get('DISABLE_TROPIC', '0') == '1'
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
THP = ARGUMENTS.get('THP', '0') == '1' # Trezor-Host Protocol
DBG_CONSOLE = ARGUMENTS.get('DBG_CONSOLE', '')
+EXTAPP_SUPPORT = ARGUMENTS.get('EXTAPP_SUPPORT', '0') == '1'
STORAGE_INSECURE_TESTING_MODE = ARGUMENTS.get('STORAGE_INSECURE_TESTING_MODE', '0') == '1'
if STORAGE_INSECURE_TESTING_MODE and PRODUCTION:
@@ -82,7 +83,7 @@ if DBG_CONSOLE != "":
if not TREZOR_MODEL in ['T3W1', 'D002']:
FEATURES_WANTED += ["secure_mode"]
-if TREZOR_MODEL in ['T3W1']:
+if TREZOR_MODEL in ['T3W1'] and EXTAPP_SUPPORT:
FEATURES_WANTED += ["app_loading"]
if DISABLE_OPTIGA:
diff --git a/core/SConscript.unix b/core/SConscript.unix
index 6bcb389f..28964f1c 100644
--- a/core/SConscript.unix
+++ b/core/SConscript.unix
@@ -18,6 +18,8 @@ FROZEN = ARGUMENTS.get('TREZOR_EMULATOR_FROZEN', 0)
RASPI = os.getenv('TREZOR_EMULATOR_RASPI') == '1'
MICROPY_ENABLE_SOURCE_LINE = ARGUMENTS.get('MICROPY_ENABLE_SOURCE_LINE', '1')
DBG_CONSOLE = ARGUMENTS.get('DBG_CONSOLE', '')
+EXTAPP_SUPPORT = ARGUMENTS.get('EXTAPP_SUPPORT', '0') == '1'
+
if BENCHMARK and PYOPT != '0':
print("BENCHMARK=1 works only with PYOPT=0.")
@@ -57,7 +59,7 @@ if BITCOIN_ONLY == '0':
if not DISABLE_TROPIC:
FEATURES_WANTED.append('tropic')
-if TREZOR_MODEL in ['T3W1']:
+if TREZOR_MODEL in ['T3W1'] and EXTAPP_SUPPORT:
FEATURES_WANTED += ["app_loading"]
if not models.has_emulator(TREZOR_MODEL):
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.