Skip to content

Commit 595fa39

Browse files
committed
tmp
1 parent 145f79e commit 595fa39

1 file changed

Lines changed: 36 additions & 21 deletions

File tree

wallet/TREZOR_SUPPORT.md

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ From the Trezor perspective, there are two types of firmware: a) the official on
1313
Since Mintlayer is not officially supported by Trezor, the firmware we provide falls into the latter category. This has certain implications:
1414
- When installing the firmware, the device will show the warning "UNSAFE, DO NOT USE!".
1515
- When installing custom firmware over the official one, **the device will be wiped clean**. Make sure you have a backup of your seed phrase.
16-
- When installing custom firmware over different custom firmware, the device will **not** be wiped clean. This makes it succeptible to the so-called "evil maid attack",
16+
- When installing custom firmware over different custom firmware, the device will **not** be wiped clean. This makes it susceptible to the so-called "evil maid attack",
1717
where the attacker has physical access to your device. It goes like this:
1818
* The "maid" temporarily steals your device and installs on it firmware that she has built herself; it looks identical to the previously installed firmware, but also logs the PIN and the passphrase entered by the user. Then she puts the device back.
1919
* You use the device.
@@ -24,19 +24,17 @@ where the attacker has physical access to your device. It goes like this:
2424
* keep your device in a safe place;
2525
* preferably, use a dedicated device with a dedicated seed phrase and PIN specifically for Mintlayer;
2626
- In order to install custom firmware on a Trezor Safe family device (e.g. Safe 3 or Safe 5), you have to [unlock the bootloader first](https://trezor.io/learn/security-privacy/how-trezor-keeps-you-safe/unlocking-the-bootloader-on-trezor-safe-devices);
27-
this is an irreversible operation after which the device authenticity check will no longer work. This means that every time you use Trezor Suite, you will be presented with a warning "Your device may have been compromised" (unless you disable
28-
the authenticity check in the Trezor Suite's device settings).
27+
this is an irreversible operation after which the device authenticity check will no longer work.
28+
This means that every time you use Trezor Suite, you will be presented with a warning "Your device may have been compromised"
29+
(unless you disable the authenticity check in the Trezor Suite's device settings).
2930

30-
### Building and flashing the firmware
31-
32-
#### A note about versioning
31+
### A note about versioning
3332

3433
Firmware built from the Mintlayer fork has two version numbers:
3534
- A version number assigned by Trezor; this is the original release that we've based our release upon
3635
and this is what is shown to you on the device screen when you flash the firmware.
37-
- An additional version number assigned by us, to which we refer as "Mintlayer firmware version".
38-
It is obtainable via `trezorctl mintlayer get-firmware-info` and it's what
39-
our wallets display in their UI.
36+
- An additional version number assigned by us, to which we refer as "Mintlayer firmware version";
37+
this is what our wallets display in their UI.
4038

4139
The table of correspondence between the two versions can be found in the [firmware repository](https://github.com/mintlayer/mintlayer-trezor-firmware/blob/mintlayer-master/README.md).
4240

@@ -50,7 +48,23 @@ Note: if you've built Core wallets directly from `master` instead of using a spe
5048
you'll probably won't be able to use a specific release for the firmware either.
5149
Instead, you'll have to build it from `mintlayer-master`.
5250

53-
#### How to build
51+
### Flashing the firmware
52+
53+
If you are interested in a particular release, you may just go to [the firmware releases page](https://github.com/mintlayer/mintlayer-trezor-firmware/releases),
54+
download the `.bin` file corresponding to your device model and install it via Trezor Suite:
55+
- Inside Trezor Suite go to "Settings" -> "Device" -> "Danger area" -> "Install custom firmware" and click "Install".
56+
- Follow the instructions that will appear on your screen.
57+
58+
Note:
59+
- Trezor Safe 3 comes in two revisions, A and B, that look identical but require different firmware.\
60+
Determining the revision of your particular device is not very trivial, unfortunately:
61+
* If you have `trezorctl` installed[^1], you may run `trezorctl get-features` (after having connected
62+
the device to the PC and having entered the PIN) and then look for the `internal_model` value in the output.
63+
* In any case, the device won't allow you to install wrong firmware, so you may try the one for revision A
64+
and if that fails, try the one for revision B instead.
65+
- Trezor Model One is not supported.
66+
67+
#### Building the firmware from source using `Nix`
5468

5569
##### Get the source code
5670

@@ -117,17 +131,13 @@ The possible values are:
117131
| T3B1 | Safe 3 revision B |
118132
| T3T1 | Safe 5 |
119133

120-
Note:
121-
- Trezor Safe 3 revision A and B look identical. To determine the revision of your particular device,
122-
first connect the device (which means, both connect it physically and enter the PIN) and then run:
123-
```sh
124-
nix-shell --run "poetry run trezorctl get-features"
125-
```
126-
Look for the `internal_model` value in the output.
127-
- Trezor Model One is not supported.
134+
So in the example above we're building it for Safe 5.
128135

129136
##### Flash the firmware
130137

138+
The file `core/build/firmware/firmware.bin` in the source directory will be the firmware that you've just built,
139+
so you can go ahead and install it via Trezor Suite.
140+
131141
First you need to put your device into bootloader mode. To do so
132142
- On Safe 3, hold the left button when connecting the USB cable.
133143
- On Model T and Safe 5, swipe across the screen when connecting the USB cable.
@@ -138,8 +148,13 @@ Now you can flash the firmware by running:
138148
```sh
139149
nix-shell --run "poetry run make -C core upload"
140150
```
151+
[^2]
152+
153+
[^1]: If you instead decide to build the firmware from source using the `Nix` approach,
154+
you'll be able to run `trezorctl` directly from the source directory like this:
155+
`nix-shell --run "poetry run trezorctl get-features"`.
141156

142-
Note: instead of executing `nix-shell --run "poetry run the_command"` every time, you can enter
143-
the nix-shell by running `nix-shell`
157+
[^2]: instead of executing `nix-shell --run "poetry run YOUR_COMMAND"` every time,
158+
you can enter the nix-shell by running `nix-shell`
144159
and then inside the nix-shell enter poetry shell by running `poetry shell`.
145-
After this, you can run the commands directly, e.g. `trezorctl get-features`.
160+
After this, you can run `YOUR_COMMAND` directly, e.g. `make -C core upload` or `trezorctl get-features`.

0 commit comments

Comments
 (0)