mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
feat(legacy): add model info to image header
This commit is contained in:
parent
335ac476a2
commit
6d2b73ea86
@ -95,6 +95,13 @@ LDFLAGS += -L$(TOP_DIR) \
|
|||||||
|
|
||||||
ZKP_PATH = $(TOP_DIR)vendor/secp256k1-zkp
|
ZKP_PATH = $(TOP_DIR)vendor/secp256k1-zkp
|
||||||
|
|
||||||
|
# hw_model = T1B1 = 0x31423154
|
||||||
|
HW_MODEL = 0x31423154
|
||||||
|
CPUFLAGS += -DHW_MODEL=$(HW_MODEL)
|
||||||
|
CPUFLAGS += -DHW_REVISION=0
|
||||||
|
CFLAGS += -DHW_MODEL=$(HW_MODEL)
|
||||||
|
CFLAGS += -DHW_REVISION=0
|
||||||
|
|
||||||
ifeq ($(EMULATOR),1)
|
ifeq ($(EMULATOR),1)
|
||||||
CFLAGS += -DEMULATOR=1
|
CFLAGS += -DEMULATOR=1
|
||||||
|
|
||||||
|
@ -20,7 +20,10 @@ g_header:
|
|||||||
.byte FIX_VERSION_MINOR // fix_vminor
|
.byte FIX_VERSION_MINOR // fix_vminor
|
||||||
.byte FIX_VERSION_PATCH // fix_vpatch
|
.byte FIX_VERSION_PATCH // fix_vpatch
|
||||||
.byte 0 // fix_vbuild
|
.byte 0 // fix_vbuild
|
||||||
. = . + 8 // reserved
|
.word HW_MODEL // type of the designated hardware
|
||||||
|
.byte HW_REVISION // revision of the designated hardware
|
||||||
|
.byte 0 // monotonic version placeholder - not used in legacy
|
||||||
|
. = . + 2 // reserved
|
||||||
. = . + 512 // hash1 ... hash16
|
. = . + 512 // hash1 ... hash16
|
||||||
. = . + 64 // sig1
|
. = . + 64 // sig1
|
||||||
. = . + 64 // sig2
|
. = . + 64 // sig2
|
||||||
|
@ -44,7 +44,10 @@ typedef struct {
|
|||||||
uint32_t codelen;
|
uint32_t codelen;
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
uint32_t fix_version;
|
uint32_t fix_version;
|
||||||
uint8_t __reserved1[8];
|
uint32_t hw_model;
|
||||||
|
uint8_t hw_revision;
|
||||||
|
uint8_t monotonic;
|
||||||
|
uint8_t __reserved1[2];
|
||||||
uint8_t hashes[512];
|
uint8_t hashes[512];
|
||||||
uint8_t sig1[64];
|
uint8_t sig1[64];
|
||||||
uint8_t sig2[64];
|
uint8_t sig2[64];
|
||||||
|
Loading…
Reference in New Issue
Block a user