From ccf4b7e9ebfe2e66ba053a48fd41a1b07cbdf83d Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 7 Mar 2024 13:27:41 +0100 Subject: [PATCH] fix(core/rust): convert bitcoin_only to an additive feature universal_fw enables more features, as opposed to bitcoin_only removing features --- core/SConscript.bootloader | 1 - core/SConscript.bootloader_emu | 1 - core/SConscript.firmware | 4 ++-- core/SConscript.unix | 4 ++-- core/embed/rust/Cargo.toml | 3 ++- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/SConscript.bootloader b/core/SConscript.bootloader index 2c2e9a7cb2..8e673b666e 100644 --- a/core/SConscript.bootloader +++ b/core/SConscript.bootloader @@ -216,7 +216,6 @@ def cargo_build(): features = ["model_tr"] else: features = ["model_tt"] - features.append("bitcoin_only") features.append("ui") features.append("bootloader") features.extend(FEATURES_AVAILABLE) diff --git a/core/SConscript.bootloader_emu b/core/SConscript.bootloader_emu index 5ff96facd8..7339351ead 100644 --- a/core/SConscript.bootloader_emu +++ b/core/SConscript.bootloader_emu @@ -273,7 +273,6 @@ def cargo_build(): if TREZOR_MODEL in ('R', '1'): features.append('button') - features.append("bitcoin_only") features.append("ui") features.append("bootloader") diff --git a/core/SConscript.firmware b/core/SConscript.firmware index ebdeb4fbb6..999a5565fa 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -722,8 +722,8 @@ def cargo_build(): profile = '' features = ['micropython', 'protobuf', ui_layout_feature] - if BITCOIN_ONLY == '1': - features.append('bitcoin_only') + if EVERYTHING: + features.append('universal_fw') features.append('ui') features.append('translations') if PYOPT == '0': diff --git a/core/SConscript.unix b/core/SConscript.unix index f3d20cd66a..db1d8a0ad0 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -803,8 +803,8 @@ RUST_LIBPATH = f'{RUST_LIBDIR}/lib{RUST_LIB}.a' def cargo_build(): features = ['micropython', 'protobuf', ui_layout_feature] - if BITCOIN_ONLY == '1': - features.append('bitcoin_only') + if EVERYTHING: + features.append('universal_fw') features.append('ui') features.append('translations') if PYOPT == '0': diff --git a/core/embed/rust/Cargo.toml b/core/embed/rust/Cargo.toml index 93b23a5c8a..17521bf78b 100644 --- a/core/embed/rust/Cargo.toml +++ b/core/embed/rust/Cargo.toml @@ -7,7 +7,6 @@ build = "build.rs" [features] default = ["model_tt"] -bitcoin_only = [] crypto = ["zeroize"] model_tt = ["jpeg"] model_tr = [] @@ -49,7 +48,9 @@ test = [ "backlight", "optiga", "translations", + "universal_fw", ] +universal_fw = [] [lib] crate-type = ["staticlib"]