build(core): exclude D001/D002-related bytecode
What changed, and why it matters
This commit adds two internal hardware model codes, D001 and D002, to a build script that strips out MicroPython bytecode for certain Trezor models. It is a build-system change with no obvious security relevance on its own; it simply ensures the new models are treated the same as existing ones during firmware packaging.
No security action required based on this commit alone. Treat as routine build-system maintenance; verify in CI that D001/D002 firmware builds still produce expected frozen MicroPython artifacts.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change extends the MODELS list in core/site_scons/site_tools/micropython/init.py to include D001 and D002. The surrounding code appears to run a sed pipeline over frozen MicroPython source files to remove typing imports and likely exclude bytecode for listed models. Without additional context, this is a build configuration update for new hardware variants and does not introduce or fix a vulnerability in the diff itself.
Changed components
core/site_scons/site_tools/micropython/__init__.pyInspect captured patch +1 / −1
diff --git a/core/site_scons/site_tools/micropython/__init__.py b/core/site_scons/site_tools/micropython/__init__.py
index 083f38fe..d354404d 100644
--- a/core/site_scons/site_tools/micropython/__init__.py
+++ b/core/site_scons/site_tools/micropython/__init__.py
@@ -98,7 +98,7 @@ def generate(env):
r"-e 's/from typing import/# &/'",
]
- MODELS = ["T2T1", "T2B1", "T3T1", "T3B1", "T3W1"]
+ MODELS = ["T2T1", "T2B1", "T3T1", "T3B1", "T3W1", "D001", "D002"]
for internal_model in MODELS:
model_matches = env["TREZOR_MODEL"] == internal_model
Why this scored 11/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.