refactor(core/build): remove special bolt layout cases
What changed, and why it matters
This commit is a straightforward build-system cleanup. It removes special-case layout feature bundles (like layout_bolt_d001 and layout_bolt_d002) and replaces them with separate, explicit display-type features (display_mono, display_rgb565, display_rgba8888). Model configuration files now list the display type directly alongside the layout type. There is no change to runtime code, no bug fix, and no security-related behavior.
No security action required. Treat as routine build-system refactoring; standard code review is sufficient.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors Cargo.toml and project.toml feature definitions across Trezor firmware build targets. It decouples layout features from display-format and framebuffer dependencies: layout_ features now only enable the corresponding trezor_lib layout, while display_ features independently enable display drivers and color-depth support. Framebuffer support is now explicitly enabled via the framebuffer feature rather than being bundled into layout features. Model TOML files are updated to declare both a layout and a display format. No source code, cryptographic, or UI logic is modified.
Changed components
core/embed/models/*/model.tomlcore/embed/projects/bootloader/Cargo.tomlcore/embed/projects/bootloader/project.tomlcore/embed/projects/firmware/Cargo.tomlcore/embed/projects/firmware/project.tomlcore/embed/projects/prodtest/Cargo.tomlcore/embed/projects/prodtest/project.tomlcore/embed/projects/unix/Cargo.tomlInspect captured patch +48 / −138
diff --git a/core/embed/models/D001/model.toml b/core/embed/models/D001/model.toml
index db20400b..fee8cebc 100644
--- a/core/embed/models/D001/model.toml
+++ b/core/embed/models/D001/model.toml
@@ -6,5 +6,6 @@ features = [
"pvd",
"framebuffer",
"secure_mode",
- "layout_bolt_d001",
+ "layout_bolt",
+ "display_rgb565",
]
diff --git a/core/embed/models/D002/model.toml b/core/embed/models/D002/model.toml
index bd7925c1..8fe72a62 100644
--- a/core/embed/models/D002/model.toml
+++ b/core/embed/models/D002/model.toml
@@ -15,5 +15,6 @@ features = [
"secure_aes",
"tamper",
"framebuffer",
- "layout_bolt_d002",
+ "layout_bolt",
+ "display_rgba8888",
]
diff --git a/core/embed/models/T2B1/model.toml b/core/embed/models/T2B1/model.toml
index 7747fe62..91cad5b0 100644
--- a/core/embed/models/T2B1/model.toml
+++ b/core/embed/models/T2B1/model.toml
@@ -10,4 +10,5 @@ features = [
"secure_mode",
"ui_empty_lock",
"layout_caesar",
+ "display_mono",
]
diff --git a/core/embed/models/T2T1/model.toml b/core/embed/models/T2T1/model.toml
index 9082154e..8c4a9b53 100644
--- a/core/embed/models/T2T1/model.toml
+++ b/core/embed/models/T2T1/model.toml
@@ -6,6 +6,7 @@ features = [
"pvd",
"secure_mode",
"layout_bolt",
+ "display_rgb565",
# Legacy coin support
"decred",
diff --git a/core/embed/models/T3B1/model.toml b/core/embed/models/T3B1/model.toml
index c31cb702..a49779a2 100644
--- a/core/embed/models/T3B1/model.toml
+++ b/core/embed/models/T3B1/model.toml
@@ -13,4 +13,5 @@ features = [
"secure_mode",
"tamper",
"layout_caesar",
+ "display_mono",
]
diff --git a/core/embed/models/T3T1/model.toml b/core/embed/models/T3T1/model.toml
index a85d9066..3ea22d42 100644
--- a/core/embed/models/T3T1/model.toml
+++ b/core/embed/models/T3T1/model.toml
@@ -13,6 +13,7 @@ features = [
"secure_mode",
"tamper",
"layout_delizia",
+ "display_rgb565",
]
[project_overrides.bootloader]
diff --git a/core/embed/models/T3W1/model.toml b/core/embed/models/T3W1/model.toml
index 61f79fea..c5b22d4d 100644
--- a/core/embed/models/T3W1/model.toml
+++ b/core/embed/models/T3W1/model.toml
@@ -28,4 +28,5 @@ features = [
"thp",
"touch_wakeup",
"layout_eckhart",
+ "display_rgba8888",
]
diff --git a/core/embed/projects/bootloader/Cargo.toml b/core/embed/projects/bootloader/Cargo.toml
index 54c56d89..27dfb56c 100644
--- a/core/embed/projects/bootloader/Cargo.toml
+++ b/core/embed/projects/bootloader/Cargo.toml
@@ -75,7 +75,7 @@ consumption_mask = ["sec/consumption_mask"]
dbg_console = ["sys/dbg_console"]
display = ["io/display"]
dma2d = ["io/dma2d", "trezor_lib/dma2d"]
-framebuffer = ["io/framebuffer"]
+framebuffer = ["io/framebuffer", "trezor_lib/framebuffer"]
haptic = ["io/haptic", "trezor_lib/haptic"]
hash_processor = ["sec/hash_processor"]
iwdg = ["sec/iwdg"]
@@ -96,39 +96,11 @@ touch = ["io/touch", "trezor_lib/touch"]
touch_wakeup = ["io/touch_wakeup", "trezor_lib/touch_wakeup"]
ui_empty_lock = ["trezor_lib/ui_empty_lock"]
-layout_bolt_d001 = [
- "trezor_lib/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
-]
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
-layout_bolt_d002 = [
- "trezor_lib/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
- "trezor_lib/ui_color_32bit",
-]
-
-layout_bolt = [
- "trezor_lib/layout_bolt",
- "trezor_lib/display_rgb565",
- ]
-
-layout_caesar = [
- "trezor_lib/layout_caesar",
- "trezor_lib/framebuffer",
- "trezor_lib/display_mono",
- ]
-
-layout_delizia = [
- "trezor_lib/layout_delizia",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
- ]
-
-layout_eckhart = [
- "trezor_lib/layout_eckhart",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
- "trezor_lib/ui_color_32bit",
- ]
+layout_bolt = ["trezor_lib/layout_bolt"]
+layout_caesar = ["trezor_lib/layout_caesar"]
+layout_delizia = ["trezor_lib/layout_delizia"]
+layout_eckhart = ["trezor_lib/layout_eckhart"]
diff --git a/core/embed/projects/bootloader/project.toml b/core/embed/projects/bootloader/project.toml
index cde69adb..7893b291 100644
--- a/core/embed/projects/bootloader/project.toml
+++ b/core/embed/projects/bootloader/project.toml
@@ -6,14 +6,15 @@ uses = [
"button",
"consumption_mask",
"display",
+ "display_mono",
+ "display_rgb565",
+ "display_rgba8888",
"dma2d",
"framebuffer",
"haptic",
"hash_processor",
"iwdg",
"layout_bolt",
- "layout_bolt_d001",
- "layout_bolt_d002",
"layout_caesar",
"layout_delizia",
"layout_eckhart",
diff --git a/core/embed/projects/firmware/Cargo.toml b/core/embed/projects/firmware/Cargo.toml
index caeb6ac7..da756187 100644
--- a/core/embed/projects/firmware/Cargo.toml
+++ b/core/embed/projects/firmware/Cargo.toml
@@ -87,7 +87,7 @@ button = ["io/button", "upymod/button", "trezor_lib/button"]
consumption_mask = ["sec/consumption_mask"]
display = ["io/display"]
dma2d = ["io/dma2d", "trezor_lib/dma2d"]
-framebuffer = ["io/framebuffer"]
+framebuffer = ["io/framebuffer", "trezor_lib/framebuffer"]
haptic = ["io/haptic", "upymod/haptic", "trezor_lib/haptic"]
hash_processor = ["sec/hash_processor"]
iwdg = ["sec/iwdg"]
@@ -121,28 +121,13 @@ decred = ["upymod/decred"]
eos = ["rtl/eos", "upymod/eos"]
nem = ["rtl/nem", "upymod/nem"]
-layout_bolt_d001 = [
- "trezor_lib/layout_bolt",
- "upymod/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_jpeg",
-]
-
-layout_bolt_d002 = [
- "trezor_lib/layout_bolt",
- "upymod/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_jpeg",
-]
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
layout_bolt = [
"trezor_lib/layout_bolt",
"upymod/layout_bolt",
- "trezor_lib/display_rgb565",
"trezor_lib/ui_blurring",
"trezor_lib/ui_jpeg",
]
@@ -150,15 +135,11 @@ layout_bolt = [
layout_caesar = [
"trezor_lib/layout_caesar",
"upymod/layout_caesar",
- "trezor_lib/framebuffer",
- "trezor_lib/display_mono",
]
layout_delizia = [
"trezor_lib/layout_delizia",
"upymod/layout_delizia",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
"trezor_lib/ui_blurring",
"trezor_lib/ui_image_buffer",
"trezor_lib/ui_overlay",
@@ -169,15 +150,11 @@ layout_delizia = [
layout_eckhart = [
"trezor_lib/layout_eckhart",
"upymod/layout_eckhart",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
"trezor_lib/ui_blurring",
"trezor_lib/ui_image_buffer",
- "trezor_lib/ui_color_32bit",
"trezor_lib/ui_overlay",
"trezor_lib/ui_jpeg",
"trezor_lib/ui_font_kerning",
"trezor_lib/hw_jpeg_decoder",
"io/hw_jpeg_decoder",
-
]
diff --git a/core/embed/projects/firmware/project.toml b/core/embed/projects/firmware/project.toml
index 514ddc47..22e351ea 100644
--- a/core/embed/projects/firmware/project.toml
+++ b/core/embed/projects/firmware/project.toml
@@ -6,14 +6,15 @@ uses = [
"button",
"consumption_mask",
"display",
+ "display_mono",
+ "display_rgb565",
+ "display_rgba8888",
"dma2d",
"framebuffer",
"haptic",
"hash_processor",
"iwdg",
"layout_bolt",
- "layout_bolt_d001",
- "layout_bolt_d002",
"layout_caesar",
"layout_delizia",
"layout_eckhart",
diff --git a/core/embed/projects/prodtest/Cargo.toml b/core/embed/projects/prodtest/Cargo.toml
index d8e4b72b..b8b38529 100644
--- a/core/embed/projects/prodtest/Cargo.toml
+++ b/core/embed/projects/prodtest/Cargo.toml
@@ -73,7 +73,7 @@ consumption_mask = ["sec/consumption_mask"]
dbg_console = ["sys/dbg_console", "trezor_lib/dbg_console"]
dma2d = ["io/dma2d", "trezor_lib/dma2d"]
display = ["io/display"]
-framebuffer = ["io/framebuffer"]
+framebuffer = ["io/framebuffer", "trezor_lib/framebuffer"]
haptic = ["io/haptic", "trezor_lib/haptic"]
hash_processor = ["sec/hash_processor"]
hw_revision = ["sec/hw_revision"]
@@ -111,39 +111,12 @@ touch_wakeup = ["io/touch_wakeup", "trezor_lib/touch_wakeup"]
tropic = ["sec/tropic", "trezor_lib/tropic"]
-layout_bolt_d001 = [
- "trezor_lib/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
-]
-
-layout_bolt_d002 = [
- "trezor_lib/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
- "trezor_lib/ui_color_32bit",
-]
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
-layout_bolt = ["trezor_lib/layout_bolt", "trezor_lib/display_rgb565"]
-
-layout_caesar = [
- "trezor_lib/layout_caesar",
- "trezor_lib/framebuffer",
- "trezor_lib/display_mono",
-]
-
-layout_delizia = [
- # "trezor_lib/layout_delizia" is not implemented for prodtest
- "trezor_lib/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
- "trezor_lib/ui_font_kerning",
-]
-
-layout_eckhart = [
- "trezor_lib/layout_eckhart",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
- "trezor_lib/ui_color_32bit",
- "trezor_lib/ui_font_kerning",
-]
+layout_bolt = ["trezor_lib/layout_bolt"]
+layout_caesar = ["trezor_lib/layout_caesar"]
+# "trezor_lib/layout_delizia" is not implemented for prodtest; reuse bolt
+layout_delizia = ["trezor_lib/layout_bolt", "trezor_lib/ui_font_kerning"]
+layout_eckhart = ["trezor_lib/layout_eckhart", "trezor_lib/ui_font_kerning"]
diff --git a/core/embed/projects/prodtest/project.toml b/core/embed/projects/prodtest/project.toml
index 9c3277b7..cd1953cf 100644
--- a/core/embed/projects/prodtest/project.toml
+++ b/core/embed/projects/prodtest/project.toml
@@ -6,6 +6,9 @@ uses = [
"button",
"consumption_mask",
"display",
+ "display_mono",
+ "display_rgb565",
+ "display_rgba8888",
"dma2d",
"framebuffer",
"haptic",
@@ -13,8 +16,6 @@ uses = [
"hw_revision",
"iwdg",
"layout_bolt",
- "layout_bolt_d001",
- "layout_bolt_d002",
"layout_caesar",
"layout_delizia",
"layout_eckhart",
diff --git a/core/embed/projects/unix/Cargo.toml b/core/embed/projects/unix/Cargo.toml
index 30bdbd14..3740a564 100644
--- a/core/embed/projects/unix/Cargo.toml
+++ b/core/embed/projects/unix/Cargo.toml
@@ -89,7 +89,7 @@ consumption_mask = ["sec/consumption_mask"]
dev_keys = ["trezor_lib/dev_keys"]
display = ["io/display"]
dma2d = ["io/dma2d", "trezor_lib/dma2d"]
-framebuffer = ["io/framebuffer"]
+framebuffer = ["io/framebuffer", "trezor_lib/framebuffer"]
haptic = ["io/haptic", "upymod/haptic", "trezor_lib/haptic"]
hash_processor = ["sec/hash_processor"]
iwdg = ["sec/iwdg"]
@@ -118,62 +118,40 @@ decred = ["upymod/decred"]
eos = ["rtl/eos", "upymod/eos"]
nem = ["rtl/nem", "upymod/nem"]
-layout_bolt = [
- "trezor_lib/layout_bolt",
- "upymod/layout_bolt",
- "trezor_lib/display_rgb565",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_jpeg",
- ]
+display_mono = ["trezor_lib/display_mono"]
+display_rgb565 = ["trezor_lib/display_rgb565"]
+display_rgba8888 = ["trezor_lib/display_rgba8888", "trezor_lib/ui_color_32bit"]
-layout_bolt_d001 = [
- "trezor_lib/layout_bolt",
- "upymod/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
- "trezor_lib/ui_blurring",
- "trezor_lib/ui_jpeg",
- ]
-
-layout_bolt_d002 = [
+layout_bolt = [
"trezor_lib/layout_bolt",
"upymod/layout_bolt",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
"trezor_lib/ui_blurring",
"trezor_lib/ui_jpeg",
- ]
+]
layout_caesar = [
"trezor_lib/layout_caesar",
"upymod/layout_caesar",
- "trezor_lib/framebuffer",
- "trezor_lib/display_mono",
- ]
+]
layout_delizia = [
"trezor_lib/layout_delizia",
"upymod/layout_delizia",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgb565",
"trezor_lib/ui_blurring",
"trezor_lib/ui_image_buffer",
"trezor_lib/ui_overlay",
"trezor_lib/ui_jpeg",
"trezor_lib/ui_font_kerning",
- ]
+]
layout_eckhart = [
"trezor_lib/layout_eckhart",
"upymod/layout_eckhart",
- "trezor_lib/framebuffer",
- "trezor_lib/display_rgba8888",
"trezor_lib/ui_blurring",
"trezor_lib/ui_image_buffer",
- "trezor_lib/ui_color_32bit",
"trezor_lib/ui_overlay",
"trezor_lib/ui_jpeg",
"trezor_lib/ui_font_kerning",
"trezor_lib/hw_jpeg_decoder",
"io/hw_jpeg_decoder",
- ]
+]
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.