mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 12:08:59 +00:00
fix(emulator): fix bootloader emulator build on MacOS
[no changelog]
This commit is contained in:
parent
8bc3890639
commit
0bacbdf355
@ -187,7 +187,7 @@ env.Replace(
|
||||
'-g3 '
|
||||
'-nostdlib '
|
||||
'-std=gnu11 -Wall -Werror -Wpointer-arith -Wno-missing-braces -fno-common '
|
||||
'-fsingle-precision-constant -fdata-sections -ffunction-sections '
|
||||
'-fdata-sections -ffunction-sections '
|
||||
'-ffreestanding '
|
||||
'-fstack-protector-all '
|
||||
+ CCFLAGS_MOD,
|
||||
|
@ -146,13 +146,13 @@ __attribute__((noreturn)) int main(int argc, char **argv) {
|
||||
set_variant = 1;
|
||||
bitcoin_only = atoi(optarg);
|
||||
break;
|
||||
case 'f':
|
||||
case 'f': {
|
||||
uint8_t hash[BLAKE2S_DIGEST_LENGTH];
|
||||
if (!load_firmware(optarg, hash)) {
|
||||
exit(1);
|
||||
}
|
||||
bootargs_set(BOOT_COMMAND_INSTALL_UPGRADE, hash, sizeof(hash));
|
||||
break;
|
||||
} break;
|
||||
#ifdef USE_OPTIGA
|
||||
case 'l':
|
||||
// write bootloader-lock secret
|
||||
|
@ -99,7 +99,7 @@ typedef enum {
|
||||
void failed_jump_to_firmware(void);
|
||||
|
||||
CONFIDENTIAL volatile secbool dont_optimize_out_true = sectrue;
|
||||
CONFIDENTIAL volatile void (*firmware_jump_fn)(void) = failed_jump_to_firmware;
|
||||
CONFIDENTIAL void (*volatile firmware_jump_fn)(void) = failed_jump_to_firmware;
|
||||
|
||||
static void usb_init_all(secbool usb21_landing) {
|
||||
usb_dev_info_t dev_info = {
|
||||
|
@ -395,7 +395,10 @@ void process_msg_FirmwareErase(uint8_t iface_num, uint32_t msg_size,
|
||||
|
||||
static uint32_t chunk_size = 0;
|
||||
|
||||
__attribute__((section(".buf"))) uint32_t chunk_buffer[IMAGE_CHUNK_SIZE / 4];
|
||||
#ifndef TREZOR_EMULATOR
|
||||
__attribute__((section(".buf")))
|
||||
#endif
|
||||
uint32_t chunk_buffer[IMAGE_CHUNK_SIZE / 4];
|
||||
|
||||
#define CHUNK_BUFFER_PTR ((const uint8_t *const)&chunk_buffer)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user