1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

build(core): clarify vendor header selection logic

This commit is contained in:
matejcik 2023-10-17 14:47:31 +02:00 committed by Martin Milata
parent e43b57f499
commit f3393211d4

View File

@ -762,14 +762,22 @@ cmake_gen = env.Command(
MODEL_IDENTIFIER = tools.get_model_identifier(TREZOR_MODEL) MODEL_IDENTIFIER = tools.get_model_identifier(TREZOR_MODEL)
BOOTLOADER_SUFFIX = MODEL_IDENTIFIER BOOTLOADER_SUFFIX = MODEL_IDENTIFIER
if BOOTLOADER_QA: if BOOTLOADER_QA:
VENDORHEADER = f'embed/vendorheader/{MODEL_IDENTIFIER}/vendorheader_dev_DO_NOT_SIGN_signed_dev.bin' BOOTLOADER_SUFFIX += '_qa'
BOOTLOADER_SUFFIX = MODEL_IDENTIFIER + '_qa'
elif PRODUCTION: # select vendor header
VENDORHEADER = f'embed/vendorheader/{MODEL_IDENTIFIER}/vendorheader_satoshilabs_signed_prod.bin' if BOOTLOADER_QA or BOOTLOADER_DEVEL:
elif BOOTLOADER_DEVEL: vendor = "dev_DO_NOT_SIGN_signed_dev"
VENDORHEADER = f'embed/vendorheader/{MODEL_IDENTIFIER}/vendorheader_dev_DO_NOT_SIGN_signed_dev.bin' elif not PRODUCTION:
vendor = "unsafe_signed_prod"
else: else:
VENDORHEADER = f'embed/vendorheader/{MODEL_IDENTIFIER}/vendorheader_unsafe_signed_prod.bin' if TREZOR_MODEL in ('T',):
vendor = "satoshilabs_signed_prod"
elif BITCOIN_ONLY == '1':
vendor = "trezor_btconly_signed_prod"
else:
vendor = "trezor_signed_prod"
VENDORHEADER = f'embed/vendorheader/{MODEL_IDENTIFIER}/vendorheader_{vendor}.bin'
if TREZOR_MODEL not in ('1',): if TREZOR_MODEL not in ('1',):