trezor-firmware icon indicating copy to clipboard operation
trezor-firmware copied to clipboard

T1 core port does not generate image with correct vendor header

Open hiviah opened this issue 2 years ago • 0 comments

Building T1 core port at current master 459270ef3ffe691a2e017aa8d6ccdd7178fefff9 with

make PYOPT=0 BITCOIN_ONLY=1 V=1 TREZOR_MODEL=1 PRODUCTION=0 VERBOSE=1 build_firmware

does not generate proper vendor header.

The FW runs, but any communication with WebUSB causes exception

255281000 session DEBUG Restarting main loop
255338000 trezor.workflow DEBUG setting a new default: <generator>
255341000 trezor.loop DEBUG spawn new task: <generator object 'homescreen' at 20013b90>
255343000 trezor.workflow DEBUG start default: <generator object 'homescreen' at 20013b90>
265186000 trezor.wire DEBUG 0:0 receive: <Initialize>
265188000 trezor.loop DEBUG spawn new task: <generator object 'handle_Initialize' at 200189b0>
265191000 trezor.workflow DEBUG start: <generator object 'handle_Initialize' at 200189b0>
265211000 trezor.loop ERROR exception:
Traceback (most recent call last):
  File "trezor/loop.py", line 186, in _step
  File "apps/base.py", line 130, in handle_Initialize
  File "apps/base.py", line 39, in get_features
RuntimeError: Failed to read vendor header.
265214000 trezor.workflow DEBUG close: <generator object 'handle_Initialize' at 200189b0>
265217000 trezor.workflow DEBUG default already started
265223000 trezor.wire ERROR exception:
Traceback (most recent call last):
  File "trezor/wire/__init__.py", line 341, in _handle_single_message
  File "trezor/loop.py", line 533, in __iter__
  File "trezor/loop.py", line 186, in _step
  File "apps/base.py", line 130, in handle_Initialize
  File "apps/base.py", line 39, in get_features
RuntimeError: Failed to read vendor header.
265226000 trezor.wire DEBUG 0:0 write: Failure
265241000 trezor.loop DEBUG finish: <generator object 'handle_session' at 20013ea0>
265244000 session DEBUG Restarting main loop

Therefore any communication like simple trezorctl list or trezorctl get-features results in error. USB UART however works.

Simple workaround to test is to change the vendor header reported in core/src/apps/base.py:get_featuresis to change fw_vendor="SomeFixedString"

hiviah avatar Aug 16 '22 12:08 hiviah