diff --git a/core/SConscript.kernel b/core/SConscript.kernel index aff585b0b1..61598225ee 100644 --- a/core/SConscript.kernel +++ b/core/SConscript.kernel @@ -386,15 +386,14 @@ obj_program.extend( ' --rename-section .data=.vendorheader,alloc,load,readonly,contents' ' $SOURCE $TARGET', )) -if TREZOR_MODEL not in ('DISC1', 'DISC2'): - tools.embed_compressed_binary( - obj_program, - env, - 'bootloader', - 'embed/bootloaders/bootloader.o', - f'embed/models/{MODEL_IDENTIFIER}/bootloaders/bootloader_{BOOTLOADER_SUFFIX}.bin', - 'kernel' - ) +tools.embed_compressed_binary( + obj_program, + env, + 'bootloader', + 'embed/bootloaders/bootloader.o', + f'embed/models/{MODEL_IDENTIFIER}/bootloaders/bootloader_{BOOTLOADER_SUFFIX}.bin', + 'kernel' + ) linkerscript_gen = env.Command( target='memory.ld', diff --git a/core/embed/models/D001/bootloaders/bootloader_D001.bin b/core/embed/models/D001/bootloaders/bootloader_D001.bin new file mode 100755 index 0000000000..4c7ee73a37 Binary files /dev/null and b/core/embed/models/D001/bootloaders/bootloader_D001.bin differ diff --git a/core/embed/models/D001/bootloaders/bootloader_D001_qa.bin b/core/embed/models/D001/bootloaders/bootloader_D001_qa.bin new file mode 120000 index 0000000000..176fb5968c --- /dev/null +++ b/core/embed/models/D001/bootloaders/bootloader_D001_qa.bin @@ -0,0 +1 @@ +./bootloader_D001.bin \ No newline at end of file diff --git a/core/embed/models/D001/bootloaders/bootloader_hashes.h b/core/embed/models/D001/bootloaders/bootloader_hashes.h new file mode 100644 index 0000000000..a15df2473d --- /dev/null +++ b/core/embed/models/D001/bootloaders/bootloader_hashes.h @@ -0,0 +1,17 @@ +#ifndef BOOTLOADER_HASHES_H +#define BOOTLOADER_HASHES_H + +// Auto-generated file, do not edit. + +// clang-format off +// bootloader_D001.bin version 2.1.10.0 +#define BOOTLOADER_D001_00 {0x23, 0xc6, 0xcb, 0x1f, 0xcb, 0xaf, 0x2b, 0x0c, 0x25, 0x7c, 0xeb, 0x23, 0xbd, 0x60, 0xfd, 0x2f, 0x24, 0xde, 0xc9, 0x23, 0x4a, 0x02, 0x42, 0x9e, 0x2c, 0xc4, 0xa3, 0x59, 0x83, 0x1e, 0x04, 0x50} +#define BOOTLOADER_D001_FF {0xf2, 0x2a, 0xd2, 0xa4, 0x3c, 0xed, 0xf0, 0xa0, 0x9f, 0xcc, 0xeb, 0x56, 0x65, 0x18, 0xe6, 0xb5, 0xbe, 0xfe, 0x9d, 0x46, 0xa4, 0xff, 0x99, 0xbf, 0xc6, 0x78, 0xe5, 0xb6, 0x27, 0xa1, 0x1e, 0xdb} + +// bootloader_D001_qa.bin version 2.1.10.0 +#define BOOTLOADER_D001_QA_00 {0x23, 0xc6, 0xcb, 0x1f, 0xcb, 0xaf, 0x2b, 0x0c, 0x25, 0x7c, 0xeb, 0x23, 0xbd, 0x60, 0xfd, 0x2f, 0x24, 0xde, 0xc9, 0x23, 0x4a, 0x02, 0x42, 0x9e, 0x2c, 0xc4, 0xa3, 0x59, 0x83, 0x1e, 0x04, 0x50} +#define BOOTLOADER_D001_QA_FF {0xf2, 0x2a, 0xd2, 0xa4, 0x3c, 0xed, 0xf0, 0xa0, 0x9f, 0xcc, 0xeb, 0x56, 0x65, 0x18, 0xe6, 0xb5, 0xbe, 0xfe, 0x9d, 0x46, 0xa4, 0xff, 0x99, 0xbf, 0xc6, 0x78, 0xe5, 0xb6, 0x27, 0xa1, 0x1e, 0xdb} + +// clang-format on + +#endif diff --git a/core/embed/models/D001/model_D001.h b/core/embed/models/D001/model_D001.h index 9fd97c4947..87aa313783 100644 --- a/core/embed/models/D001/model_D001.h +++ b/core/embed/models/D001/model_D001.h @@ -1,10 +1,12 @@ #ifndef MODELS_MODEL_D001_H_ #define MODELS_MODEL_D001_H_ -#define MODEL_NAME "T" -#define MODEL_FULL_NAME "Trezor Model T" +#include "bootloaders/bootloader_hashes.h" + +#define MODEL_NAME "D001" +#define MODEL_FULL_NAME "Trezor DIY 1" #define MODEL_INTERNAL_NAME "D001" -#define MODEL_INTERNAL_NAME_TOKEN T +#define MODEL_INTERNAL_NAME_TOKEN D001 #define MODEL_INTERNAL_NAME_QSTR MP_QSTR_D001 #define MODEL_USB_MANUFACTURER "Trezor DIY" #define MODEL_USB_PRODUCT MODEL_FULL_NAME diff --git a/core/embed/models/D002/bootloaders/bootloader_D002.bin b/core/embed/models/D002/bootloaders/bootloader_D002.bin new file mode 100755 index 0000000000..9186629693 Binary files /dev/null and b/core/embed/models/D002/bootloaders/bootloader_D002.bin differ diff --git a/core/embed/models/D002/bootloaders/bootloader_D002_qa.bin b/core/embed/models/D002/bootloaders/bootloader_D002_qa.bin new file mode 120000 index 0000000000..c3fe0f6837 --- /dev/null +++ b/core/embed/models/D002/bootloaders/bootloader_D002_qa.bin @@ -0,0 +1 @@ +./bootloader_D002.bin \ No newline at end of file diff --git a/core/embed/models/D002/bootloaders/bootloader_hashes.h b/core/embed/models/D002/bootloaders/bootloader_hashes.h new file mode 100644 index 0000000000..f54b3ff29a --- /dev/null +++ b/core/embed/models/D002/bootloaders/bootloader_hashes.h @@ -0,0 +1,17 @@ +#ifndef BOOTLOADER_HASHES_H +#define BOOTLOADER_HASHES_H + +// Auto-generated file, do not edit. + +// clang-format off +// bootloader_D002.bin version 2.1.10.0 +#define BOOTLOADER_D002_00 {0xb1, 0x26, 0x63, 0x47, 0xc1, 0x9a, 0x99, 0xb3, 0xea, 0x77, 0x40, 0xc3, 0xdf, 0x40, 0x96, 0x90, 0xb4, 0xeb, 0x41, 0x7e, 0x60, 0x4f, 0xc9, 0xfb, 0xda, 0xee, 0x3c, 0x3f, 0x10, 0x74, 0xb3, 0xb6} +#define BOOTLOADER_D002_FF {0x6d, 0xee, 0x9b, 0x95, 0x31, 0x3e, 0x2a, 0x04, 0xdd, 0x6f, 0x37, 0x67, 0xda, 0x4f, 0x9a, 0xaa, 0x1b, 0x05, 0x99, 0x52, 0x5f, 0x1e, 0x20, 0xc2, 0x77, 0x50, 0xe0, 0x19, 0xd0, 0x78, 0xb0, 0xf8} + +// bootloader_D002_qa.bin version 2.1.10.0 +#define BOOTLOADER_D002_QA_00 {0xb1, 0x26, 0x63, 0x47, 0xc1, 0x9a, 0x99, 0xb3, 0xea, 0x77, 0x40, 0xc3, 0xdf, 0x40, 0x96, 0x90, 0xb4, 0xeb, 0x41, 0x7e, 0x60, 0x4f, 0xc9, 0xfb, 0xda, 0xee, 0x3c, 0x3f, 0x10, 0x74, 0xb3, 0xb6} +#define BOOTLOADER_D002_QA_FF {0x6d, 0xee, 0x9b, 0x95, 0x31, 0x3e, 0x2a, 0x04, 0xdd, 0x6f, 0x37, 0x67, 0xda, 0x4f, 0x9a, 0xaa, 0x1b, 0x05, 0x99, 0x52, 0x5f, 0x1e, 0x20, 0xc2, 0x77, 0x50, 0xe0, 0x19, 0xd0, 0x78, 0xb0, 0xf8} + +// clang-format on + +#endif diff --git a/core/embed/models/D002/model_D002.h b/core/embed/models/D002/model_D002.h index b5b52f3c72..5a3ce0d14f 100644 --- a/core/embed/models/D002/model_D002.h +++ b/core/embed/models/D002/model_D002.h @@ -1,13 +1,14 @@ #ifndef MODELS_MODEL_DISC2_H_ #define MODELS_MODEL_DISC2_H_ +#include "bootloaders/bootloader_hashes.h" #include "sizedefs.h" -#define MODEL_NAME "T" -#define MODEL_FULL_NAME "Trezor Model T" +#define MODEL_NAME "D002" +#define MODEL_FULL_NAME "Trezor DIY 2" #define MODEL_INTERNAL_NAME "D002" #define MODEL_INTERNAL_NAME_TOKEN D002 -#define MODEL_NAME_QSTR MP_QSTR_T +#define MODEL_NAME_QSTR MP_QSTR_D002 #define MODEL_INTERNAL_NAME_QSTR MP_QSTR_D001 #define MODEL_USB_MANUFACTURER "Trezor DIY" #define MODEL_USB_PRODUCT MODEL_FULL_NAME