Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilata committed Jan 8, 2025
1 parent f145d8a commit 3041bcd
Show file tree
Hide file tree
Showing 42 changed files with 89 additions and 87 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,23 @@ jobs:
strategy:
fail-fast: false
matrix:
# model: [T1B1, T2T1, T2B1, T3B1, T3T1] # TODO update exprs below
model: ["1", "T", "R", T3B1, T3T1]
model: ["1", T2T1, T2B1, T3B1, T3T1]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git checkout ${{ github.head_ref || github.ref_name }}
- run: ./build-docker.sh ${{ matrix.model == '1' && '--skip-core' || '--skip-legacy' }} --models ${{ matrix.model }} ${{ github.head_ref || github.ref_name }}
- run: ./build-docker.sh ${{ matrix.model == '1' && '--skip-core' || '--skip-legacy' }} --models ${{ matrix.model }} --targets bootloader,firmware,prodtest ${{ github.head_ref || github.ref_name }}
- name: Show fingerprints
run: |
echo "model **${{ matrix.model }}** commit \`${{ github.sha }}\` (fingerprint, sha256)" >> $GITHUB_STEP_SUMMARY
rm -rf build/*-bitcoinonly/bootloader
for file in build/*/*/*.fingerprint; do
if [ -f "$file" ]; then
origfile="${file%.fingerprint}"
fingerprint=$(tr -d '\n' < $file)
echo "\`$fingerprint\` $origfile" >> $GITHUB_STEP_SUMMARY
sha256=$(sha256sum $file | head -c 64)
echo "\`$fingerprint\` \`$sha256\` $origfile" >> $GITHUB_STEP_SUMMARY
fi
done
cat $GITHUB_STEP_SUMMARY
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/core-hw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
model: [T2T1, T2B1]
coins: [universal, btconly]
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || 'R' }}
TREZOR_MODEL: ${{ matrix.model }}
TREZOR_PYTEST_SKIP_ALTCOINS: ${{ matrix.coins == 'btconly' && '1' || '0' }}
PYTEST_TIMEOUT: 1200
PYOPT: 0
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
matrix:
model: [T2T1, T2B1]
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || 'R' }}
TREZOR_MODEL: ${{ matrix.model == 'T2T1' }}
PYTEST_TIMEOUT: 1200
PYOPT: 0
DISABLE_OPTIGA: 1
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
model: [T2T1, T3B1, T3T1, T3W1]
model: [T2B1, T2T1, T3B1, T3T1, T3W1]
coins: [universal, btconly]
type: ${{ fromJSON(github.event_name == 'schedule' && '["normal", "debuglink", "production"]' || '["normal", "debuglink"]') }}
include:
Expand All @@ -65,7 +65,7 @@ jobs:
- model: T3W1
type: production
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model == 'D001' && 'DISC1' || matrix.model }}
TREZOR_MODEL: ${{ matrix.model == 'D001' && 'DISC1' || matrix.model }}
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
PYOPT: ${{ matrix.type == 'debuglink' && '0' || '1' }}
PRODUCTION: ${{ matrix.type == 'production' && '1' || '0' }}
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
- type: normal
asan: asan
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model }}
TREZOR_MODEL: ${{ matrix.model }}
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
PYOPT: ${{ matrix.type == 'debuglink' && '0' || '1' }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
- type: normal
asan: asan
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model }}
TREZOR_MODEL: ${{ matrix.model }}
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
PYOPT: ${{ matrix.type == 'debuglink' && '0' || '1' }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
model: [T2T1, T3B1, T3T1, T3W1]
asan: ${{ fromJSON(needs.param.outputs.asan) }}
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model }}
TREZOR_MODEL: ${{ matrix.model }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
LSAN_OPTIONS: "suppressions=../../asan_suppressions.txt"
steps:
Expand All @@ -209,7 +209,7 @@ jobs:
model: [T2T1, T3B1, T3T1, T3W1]
asan: ${{ fromJSON(needs.param.outputs.asan) }}
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model }}
TREZOR_MODEL: ${{ matrix.model }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
RUSTC_BOOTSTRAP: ${{ matrix.asan == 'asan' && '1' || '0' }}
RUSTFLAGS: ${{ matrix.asan == 'asan' && '-Z sanitizer=address' || '' }}
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
lang: ${{ fromJSON(needs.param.outputs.test_lang) }}
env:
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model }}
TREZOR_MODEL: ${{ matrix.model }}
TREZOR_PYTEST_SKIP_ALTCOINS: ${{ matrix.coins == 'btconly' && '1' || '0' }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
PYTEST_TIMEOUT: ${{ matrix.asan == 'asan' && 600 || 400 }}
Expand Down Expand Up @@ -451,7 +451,7 @@ jobs:
if: false # NOTE manual job, comment out to run
runs-on: ubuntu-latest
env:
TREZOR_MODEL: T
TREZOR_MODEL: T2T1
TREZOR_MEMPERF: 1
PYOPT: 0
PYTEST_TIMEOUT: 900
Expand Down
4 changes: 2 additions & 2 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function help_and_die() {
echo " --skip-legacy - do not build legacy"
echo " --repository path/to/repo - checkout the repository from the given path/url"
echo " --no-init - do not recreate docker environments"
echo " --models - comma-separated list of models. default: --models R,T"
echo " --models - comma-separated list of models. default: --models T2B1,T2T1,T3T1"
echo " --targets - comma-separated list of targets for core build. default: --targets boardloader,bootloader,firmware"
echo " --help"
echo
Expand All @@ -69,7 +69,7 @@ OPT_BUILD_LEGACY=1
OPT_BUILD_NORMAL=1
OPT_BUILD_BITCOINONLY=1
INIT=1
MODELS=(R T T3T1)
MODELS=(T2B1 T2T1 T3T1)
CORE_TARGETS=(boardloader bootloader firmware)

REPOSITORY="file:///local"
Expand Down
6 changes: 3 additions & 3 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ BITCOIN_ONLY ?= 0
BOOTLOADER_QA ?= 0
BOOTLOADER_DEVEL ?= 0
DISABLE_OPTIGA ?= 0
TREZOR_MODEL ?= T
TREZOR_MODEL ?= T2T1
TREZOR_MEMPERF ?= 0
ADDRESS_SANITIZER ?= 0
CMAKELISTS ?= 0
Expand All @@ -50,11 +50,11 @@ OPENOCD_INTERFACE ?= stlink
# OpenOCD transport default. Alternative: jtag
OPENOCD_TRANSPORT ?= hla_swd

ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T))
ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T2T1))
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
MODEL_FEATURE = model_ford
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),R))
else ifeq ($(TREZOR_MODEL),$(filter $(TREZOR_MODEL),T2B1))
MCU = STM32F4
OPENOCD_TARGET = target/stm32f4x.cfg
MODEL_FEATURE = model_buick
Expand Down
2 changes: 1 addition & 1 deletion core/SConscript.boardloader
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import tools, models

TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
MODEL_IDENTIFIER = models.get_model_identifier(TREZOR_MODEL)
Expand Down
2 changes: 1 addition & 1 deletion core/SConscript.bootloader
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import os
import shlex
import tools, models, ui

TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
BOOTLOADER_QA = ARGUMENTS.get('BOOTLOADER_QA', '0') == '1'
PRODUCTION = 0 if BOOTLOADER_QA else ARGUMENTS.get('PRODUCTION', '0') == '1'
Expand Down
2 changes: 1 addition & 1 deletion core/SConscript.bootloader_ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import tools, models, ui

TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
MODEL_IDENTIFIER = models.get_model_identifier(TREZOR_MODEL)
Expand Down
2 changes: 1 addition & 1 deletion core/SConscript.bootloader_emu
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import os
import shlex
import tools, models, ui

TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
HW_REVISION = 'emulator'

Expand Down
16 changes: 8 additions & 8 deletions core/SConscript.firmware
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ PRODUCTION = ARGUMENTS.get('PRODUCTION', '0') == '1'
BOOTLOADER_QA = ARGUMENTS.get('BOOTLOADER_QA', '0') == '1'
BOOTLOADER_DEVEL = ARGUMENTS.get('BOOTLOADER_DEVEL', '0') == '1'
EVERYTHING = BITCOIN_ONLY != '1'
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
PYOPT = ARGUMENTS.get('PYOPT', '1')
DISABLE_OPTIGA = ARGUMENTS.get('DISABLE_OPTIGA', '0') == '1'
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
SCM_REVISION = ARGUMENTS.get('SCM_REVISION', None)
THP = ARGUMENTS.get('THP', '0') == '1' # Trezor-Host Protocol
MODEL_IDENTIFIER = models.get_model_identifier(TREZOR_MODEL)
MODEL_IDENTIFIER = models.get_model_identifier(TREZOR_MODEL) # TODO normalize always
BENCHMARK = ARGUMENTS.get('BENCHMARK', '0') == '1'
DISABLE_ANIMATION = ARGUMENTS.get('TREZOR_DISABLE_ANIMATION', '0') == '1'

Expand Down Expand Up @@ -79,8 +79,8 @@ CPPDEFINES_MOD += [
('USE_ETHEREUM', '1' if EVERYTHING else '0'),
('USE_MONERO', '1' if EVERYTHING else '0'),
('USE_CARDANO', '1' if EVERYTHING else '0'),
('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL == "T") else '0'),
('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL == "T") else '0'),
('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL == "T2T1") else '0'),
('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL == "T2T1") else '0'),
('DISABLE_ANIMATION', '1' if DISABLE_ANIMATION else '0'),
]
SOURCE_MOD += [
Expand Down Expand Up @@ -647,7 +647,7 @@ if FROZEN:
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Cardano*.py'))

if TREZOR_MODEL == "T":
if TREZOR_MODEL == "T2T1":
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Eos*.py'))
Expand All @@ -661,7 +661,7 @@ if FROZEN:
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/DebugMonero*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Monero*.py'))

if TREZOR_MODEL == "T":
if TREZOR_MODEL == "T2T1":
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py'))
Expand All @@ -684,7 +684,7 @@ if FROZEN:

SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/webauthn/*.py'))

if TREZOR_MODEL == "T":
if TREZOR_MODEL == "T2T1":
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/decred.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/bitcoinlike.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/zcash_v4.py'))
Expand Down Expand Up @@ -818,7 +818,7 @@ if BOOTLOADER_QA or BOOTLOADER_DEVEL:
elif not PRODUCTION:
vendor = "unsafe_signed_prod"
else:
if TREZOR_MODEL in ('T',):
if TREZOR_MODEL in ('T2T1',):
vendor = "satoshilabs_signed_prod"
elif BITCOIN_ONLY == '1':
vendor = "trezor_btconly_signed_prod"
Expand Down
8 changes: 4 additions & 4 deletions core/SConscript.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PRODUCTION = ARGUMENTS.get('PRODUCTION', '0') == '1'
BOOTLOADER_QA = ARGUMENTS.get('BOOTLOADER_QA', '0') == '1'
BOOTLOADER_DEVEL = ARGUMENTS.get('BOOTLOADER_DEVEL', '0') == '1'
EVERYTHING = BITCOIN_ONLY != '1'
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
PYOPT = ARGUMENTS.get('PYOPT', '1')
DISABLE_OPTIGA = ARGUMENTS.get('DISABLE_OPTIGA', '0') == '1'
Expand Down Expand Up @@ -77,8 +77,8 @@ CPPDEFINES_MOD += [
('USE_ETHEREUM', '1' if EVERYTHING else '0'),
('USE_MONERO', '1' if EVERYTHING else '0'),
('USE_CARDANO', '1' if EVERYTHING else '0'),
('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL == "T") else '0'),
('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL == "T") else '0'),
('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL == "T2T1") else '0'),
('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL == "T2T1") else '0'),
]
SOURCE_MOD_CRYPTO += [
'vendor/trezor-crypto/address.c',
Expand Down Expand Up @@ -365,7 +365,7 @@ if BOOTLOADER_QA or BOOTLOADER_DEVEL:
elif not PRODUCTION:
vendor = "unsafe_signed_prod"
else:
if TREZOR_MODEL in ('T',):
if TREZOR_MODEL in ('T2T1',):
vendor = "satoshilabs_signed_prod"
elif BITCOIN_ONLY == '1':
vendor = "trezor_btconly_signed_prod"
Expand Down
2 changes: 1 addition & 1 deletion core/SConscript.prodtest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import tools, models, ui

TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
PRODUCTION = ARGUMENTS.get('PRODUCTION', '0') == '1'
BOOTLOADER_DEVEL = ARGUMENTS.get('BOOTLOADER_DEVEL', '0') == '1'
Expand Down
2 changes: 1 addition & 1 deletion core/SConscript.reflash
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import tools, models, ui

TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1')
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)

Expand Down
12 changes: 6 additions & 6 deletions core/SConscript.unix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import tools, models, ui

BITCOIN_ONLY = ARGUMENTS.get('BITCOIN_ONLY', '0')
EVERYTHING = BITCOIN_ONLY != '1'
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T2T1') # FIXME also normalize
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
HW_REVISION ='emulator'
THP = ARGUMENTS.get('THP', '0') == '1' # Trezor-Host Protocol
Expand Down Expand Up @@ -78,8 +78,8 @@ CPPDEFINES_MOD += [
('USE_ETHEREUM', '1' if EVERYTHING else '0'),
('USE_MONERO', '1' if EVERYTHING else '0'),
('USE_CARDANO', '1' if EVERYTHING else '0'),
('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL == "T") else '0'),
('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL == "T") else '0'),
('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL == "T2T1") else '0'),
('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL == "T2T1") else '0'),
]
SOURCE_MOD += [
'embed/upymod/trezorobj.c',
Expand Down Expand Up @@ -703,7 +703,7 @@ if FROZEN:
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Cardano*.py'))

if TREZOR_MODEL == "T":
if TREZOR_MODEL == "T2T1":
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Eos*.py'))
Expand All @@ -717,7 +717,7 @@ if FROZEN:
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/DebugMonero*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Monero*.py'))

if TREZOR_MODEL == "T":
if TREZOR_MODEL == "T2T1":
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py'))
Expand All @@ -741,7 +741,7 @@ if FROZEN:

SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/webauthn/*.py'))

if TREZOR_MODEL == "T":
if TREZOR_MODEL == "T2T1":
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/decred.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/bitcoinlike.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/zcash_v4.py'))
Expand Down
2 changes: 1 addition & 1 deletion core/embed/io/display/backlight/stm32/backlight_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void backlight_pwm_deinit(backlight_action_t action) {
return;
}

#ifdef TREZOR_MODEL_T
#ifdef TREZOR_MODEL_T2T1
// This code is for backward compatibility with the older
// bootloader/firmware on model T that used different
// PWM settings and relies on proper settings from the
Expand Down
2 changes: 1 addition & 1 deletion core/embed/io/display/st-7789/display_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void display_deinit(display_content_mode_t mode) {
backlight_pwm_deinit(mode == DISPLAY_RESET_CONTENT ? BACKLIGHT_RESET
: BACKLIGHT_RETAIN);

#ifdef TREZOR_MODEL_T
#ifdef TREZOR_MODEL_T2T1
// This ensures backward compatibility with legacy bootloader/firmware
// that relies on this hardware settings from the previous boot stage
if (mode == DISPLAY_RESET_CONTENT) {
Expand Down
Loading

0 comments on commit 3041bcd

Please sign in to comment.