2018-07-04 14:44:26 +00:00
|
|
|
syntax = "proto2";
|
2018-07-29 14:17:00 +00:00
|
|
|
package hw.trezor.messages.bootloader;
|
2018-07-04 14:44:26 +00:00
|
|
|
|
|
|
|
// 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)
|
2018-07-16 14:51:03 +00:00
|
|
|
* @start
|
2018-07-04 14:44:26 +00:00
|
|
|
* @next FirmwareRequest
|
|
|
|
*/
|
|
|
|
message FirmwareErase {
|
|
|
|
optional uint32 length = 1; // length of new firmware
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Response: Ask for firmware chunk
|
|
|
|
* @next FirmwareUpload
|
|
|
|
*/
|
|
|
|
message FirmwareRequest {
|
2023-03-31 12:34:20 +00:00
|
|
|
required uint32 offset = 1; // offset of requested firmware chunk
|
|
|
|
required uint32 length = 2; // length of requested firmware chunk
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Request: Send firmware in binary form to the device
|
2018-07-16 14:51:03 +00:00
|
|
|
* @next FirmwareRequest
|
2018-07-04 14:44:26 +00:00
|
|
|
* @next Success
|
|
|
|
* @next Failure
|
|
|
|
*/
|
|
|
|
message FirmwareUpload {
|
|
|
|
required bytes payload = 1; // firmware to be loaded into device
|
|
|
|
optional bytes hash = 2; // hash of the payload
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2024-02-20 11:03:59 +00:00
|
|
|
* Request: Perform a prodtest on T1
|
2018-07-04 14:44:26 +00:00
|
|
|
* @next Success
|
|
|
|
* @next Failure
|
|
|
|
*/
|
2024-02-20 11:03:59 +00:00
|
|
|
message ProdTestT1 {
|
|
|
|
optional bytes payload = 1; // payload to be used in prodtest
|
2018-07-04 14:44:26 +00:00
|
|
|
}
|