1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

chore(core/build): reuse embed_raw_binary function to embeed vendorheaders

[no changelog]
This commit is contained in:
tychovrahe 2024-09-25 11:34:10 +02:00 committed by TychoVrahe
parent d312944f1e
commit 10eaa15427
3 changed files with 21 additions and 24 deletions

View File

@ -865,15 +865,13 @@ else:
VENDORHEADER = f'embed/models/{MODEL_IDENTIFIER}/vendorheader/vendorheader_{vendor}.bin'
obj_program.extend(
env.Command(
target='embed/firmware/vendorheader.o',
source=VENDORHEADER,
action='$OBJCOPY -I binary -O elf32-littlearm -B arm'
' --rename-section .data=.vendorheader,alloc,load,readonly,contents'
' $SOURCE $TARGET', ))
tools.embed_raw_binary(
obj_program,
env,
'vendorheader',
'embed/firmware/vendorheader.o',
VENDORHEADER,
)
tools.embed_raw_binary(
obj_program,

View File

@ -246,14 +246,13 @@ else:
VENDORHEADER = f'embed/models/{MODEL_IDENTIFIER}/vendorheader/vendorheader_unsafe_signed_prod.bin'
obj_program.extend(
env.Command(
target='embed/prodtest/vendorheader.o',
source=VENDORHEADER,
action='$OBJCOPY -I binary -O elf32-littlearm -B arm'
' --rename-section .data=.vendorheader,alloc,load,readonly,contents'
' $SOURCE $TARGET', ))
tools.embed_raw_binary(
obj_program,
env,
'vendorheader',
'embed/firmware/vendorheader.o',
VENDORHEADER,
)
linkerscript_gen = env.Command(
target='memory.ld',

View File

@ -206,13 +206,13 @@ MODEL_IDENTIFIER = models.get_model_identifier(TREZOR_MODEL)
VENDORHEADER = f'embed/models/{MODEL_IDENTIFIER}/vendorheader/vendorheader_' + ('unsafe_signed_dev.bin' if ARGUMENTS.get('PRODUCTION', '0') == '0' else 'satoshilabs_signed_prod.bin')
obj_program.extend(
env.Command(
target='embed/reflash/vendorheader.o',
source=VENDORHEADER,
action='$OBJCOPY -I binary -O elf32-littlearm -B arm'
' --rename-section .data=.vendorheader,alloc,load,readonly,contents'
' $SOURCE $TARGET', ))
tools.embed_raw_binary(
obj_program,
env,
'vendorheader',
'embed/firmware/vendorheader.o',
VENDORHEADER,
)
linkerscript_gen = env.Command(
target='memory.ld',