forked from trezor/trezor-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessages-bootloader.proto
44 lines (39 loc) · 1.08 KB
/
messages-bootloader.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
syntax = "proto2";
package hw.trezor.messages.bootloader;
// Sugar for easier handling in Java
option java_package = "com.satoshilabs.trezor.lib.protobuf";
option java_outer_classname = "TrezorMessageBootloader";
/**
* Request: Ask device to erase its firmware (so it can be replaced via FirmwareUpload)
* @start
* @next FirmwareRequest
*/
message FirmwareErase {
optional uint32 length = 1; // length of new firmware
}
/**
* Response: Ask for firmware chunk
* @next FirmwareUpload
*/
message FirmwareRequest {
required uint32 offset = 1; // offset of requested firmware chunk
required uint32 length = 2; // length of requested firmware chunk
}
/**
* Request: Send firmware in binary form to the device
* @next FirmwareRequest
* @next Success
* @next Failure
*/
message FirmwareUpload {
required bytes payload = 1; // firmware to be loaded into device
optional bytes hash = 2; // hash of the payload
}
/**
* Request: Perform a prodtest on T1
* @next Success
* @next Failure
*/
message ProdTestT1 {
optional bytes payload = 1; // payload to be used in prodtest
}