From 0666e6ea9ab82042d1b5674e0ae3034c5b0593c4 Mon Sep 17 00:00:00 2001 From: cepetr Date: Fri, 16 Aug 2024 12:11:38 +0200 Subject: [PATCH] refactor(core/embed): rename boot_args to bootuils [no changelog] --- core/SConscript.bootloader_emu | 2 +- core/SConscript.unix | 2 +- core/embed/bootloader/emulator.c | 2 +- core/embed/bootloader/main.c | 2 +- core/embed/bootloader/messages.c | 2 +- core/embed/extmod/modtrezorutils/modtrezorutils.c | 2 +- core/embed/lib/error_handling.c | 2 +- core/embed/prodtest/main.c | 2 +- core/embed/trezorhal/{boot_args.h => bootutils.h} | 6 +++--- core/embed/trezorhal/stm32f4/{boot_args.c => bootutils.c} | 2 +- core/embed/trezorhal/stm32u5/boot_args.c | 1 - core/embed/trezorhal/stm32u5/bootutils.c | 1 + core/embed/trezorhal/unix/{boot_args.c => bootutils.c} | 2 +- core/site_scons/models/stm32f4_common.py | 2 +- core/site_scons/models/stm32u5_common.py | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) rename core/embed/trezorhal/{boot_args.h => bootutils.h} (92%) rename core/embed/trezorhal/stm32f4/{boot_args.c => bootutils.c} (98%) delete mode 120000 core/embed/trezorhal/stm32u5/boot_args.c create mode 120000 core/embed/trezorhal/stm32u5/bootutils.c rename core/embed/trezorhal/unix/{boot_args.c => bootutils.c} (98%) diff --git a/core/SConscript.bootloader_emu b/core/SConscript.bootloader_emu index 9adc1a846..a3baaf070 100644 --- a/core/SConscript.bootloader_emu +++ b/core/SConscript.bootloader_emu @@ -145,7 +145,7 @@ SOURCE_BOOTLOADER = [ ] SOURCE_TREZORHAL = [ - 'embed/trezorhal/unix/boot_args.c', + 'embed/trezorhal/unix/bootutils.c', 'embed/trezorhal/unix/common.c', 'embed/trezorhal/unix/fault_handlers.c', 'embed/trezorhal/unix/flash.c', diff --git a/core/SConscript.unix b/core/SConscript.unix index acd8e0285..bcf5d635c 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -418,7 +418,7 @@ SOURCE_MICROPYTHON = [ ] SOURCE_UNIX = [ - 'embed/trezorhal/unix/boot_args.c', + 'embed/trezorhal/unix/bootutils.c', 'embed/trezorhal/unix/common.c', 'embed/trezorhal/unix/flash_otp.c', 'embed/trezorhal/unix/flash.c', diff --git a/core/embed/bootloader/emulator.c b/core/embed/bootloader/emulator.c index d69d56dd7..24fbfd620 100644 --- a/core/embed/bootloader/emulator.c +++ b/core/embed/bootloader/emulator.c @@ -2,8 +2,8 @@ #include #include TREZOR_BOARD -#include "boot_args.h" #include "bootui.h" +#include "bootutils.h" #include "common.h" #include "display.h" #include "flash.h" diff --git a/core/embed/bootloader/main.c b/core/embed/bootloader/main.c index ade9fcbb8..4080c5089 100644 --- a/core/embed/bootloader/main.c +++ b/core/embed/bootloader/main.c @@ -20,7 +20,7 @@ #include #include -#include "boot_args.h" +#include "bootutils.h" #include "common.h" #include "display.h" #include "display_utils.h" diff --git a/core/embed/bootloader/messages.c b/core/embed/bootloader/messages.c index 5006afb85..2239880af 100644 --- a/core/embed/bootloader/messages.c +++ b/core/embed/bootloader/messages.c @@ -24,7 +24,7 @@ #include #include "messages.pb.h" -#include "boot_args.h" +#include "bootutils.h" #include "common.h" #include "flash.h" #include "image.h" diff --git a/core/embed/extmod/modtrezorutils/modtrezorutils.c b/core/embed/extmod/modtrezorutils/modtrezorutils.c index a18aaeea1..f779864ef 100644 --- a/core/embed/extmod/modtrezorutils/modtrezorutils.c +++ b/core/embed/extmod/modtrezorutils/modtrezorutils.c @@ -30,7 +30,7 @@ #include #include "blake2s.h" -#include "boot_args.h" +#include "bootutils.h" #include "common.h" #include "flash.h" #include "unit_variant.h" diff --git a/core/embed/lib/error_handling.c b/core/embed/lib/error_handling.c index e4f8227fb..0906598d2 100644 --- a/core/embed/lib/error_handling.c +++ b/core/embed/lib/error_handling.c @@ -22,7 +22,7 @@ #include #endif -#include "boot_args.h" +#include "bootutils.h" #include "display.h" #include "error_handling.h" #include "mini_printf.h" diff --git a/core/embed/prodtest/main.c b/core/embed/prodtest/main.c index a40d06ad8..af08a9122 100644 --- a/core/embed/prodtest/main.c +++ b/core/embed/prodtest/main.c @@ -25,7 +25,7 @@ #include STM32_HAL_H #include "board_capabilities.h" -#include "boot_args.h" +#include "bootutils.h" #include "button.h" #include "common.h" #include "display.h" diff --git a/core/embed/trezorhal/boot_args.h b/core/embed/trezorhal/bootutils.h similarity index 92% rename from core/embed/trezorhal/boot_args.h rename to core/embed/trezorhal/bootutils.h index 4fd4c1d51..6a6d2f842 100644 --- a/core/embed/trezorhal/boot_args.h +++ b/core/embed/trezorhal/bootutils.h @@ -1,5 +1,5 @@ -#ifndef TREZORHAL_BOOT_ARGS_H -#define TREZORHAL_BOOT_ARGS_H +#ifndef TREZORHAL_BOOTUTILS_H +#define TREZORHAL_BOOTUTILS_H #include #include @@ -40,4 +40,4 @@ void __attribute__((noreturn)) trezor_shutdown(void); void __attribute__((noreturn)) svc_reboot_to_bootloader(void); void __attribute__((noreturn)) svc_reboot(void); -#endif // TREZORHAL_BOOT_ARGS_H +#endif // TREZORHAL_BOOTUTILS_H diff --git a/core/embed/trezorhal/stm32f4/boot_args.c b/core/embed/trezorhal/stm32f4/bootutils.c similarity index 98% rename from core/embed/trezorhal/stm32f4/boot_args.c rename to core/embed/trezorhal/stm32f4/bootutils.c index 52bd44955..d069545d1 100644 --- a/core/embed/trezorhal/stm32f4/boot_args.c +++ b/core/embed/trezorhal/stm32f4/bootutils.c @@ -1,5 +1,5 @@ -#include "../boot_args.h" +#include "../bootutils.h" #include #include diff --git a/core/embed/trezorhal/stm32u5/boot_args.c b/core/embed/trezorhal/stm32u5/boot_args.c deleted file mode 120000 index ea7e8b6c2..000000000 --- a/core/embed/trezorhal/stm32u5/boot_args.c +++ /dev/null @@ -1 +0,0 @@ -../stm32f4/boot_args.c \ No newline at end of file diff --git a/core/embed/trezorhal/stm32u5/bootutils.c b/core/embed/trezorhal/stm32u5/bootutils.c new file mode 120000 index 000000000..cdb656edf --- /dev/null +++ b/core/embed/trezorhal/stm32u5/bootutils.c @@ -0,0 +1 @@ +../stm32f4/bootutils.c \ No newline at end of file diff --git a/core/embed/trezorhal/unix/boot_args.c b/core/embed/trezorhal/unix/bootutils.c similarity index 98% rename from core/embed/trezorhal/unix/boot_args.c rename to core/embed/trezorhal/unix/bootutils.c index b9765d43e..f88e76de3 100644 --- a/core/embed/trezorhal/unix/boot_args.c +++ b/core/embed/trezorhal/unix/bootutils.c @@ -1,5 +1,5 @@ -#include "../boot_args.h" +#include "../bootutils.h" #include #include diff --git a/core/site_scons/models/stm32f4_common.py b/core/site_scons/models/stm32f4_common.py index 36df4244d..3c4194504 100644 --- a/core/site_scons/models/stm32f4_common.py +++ b/core/site_scons/models/stm32f4_common.py @@ -41,7 +41,7 @@ def stm32f4_common_files(env, defines, sources, paths): sources += [ "embed/trezorhal/stm32f4/board_capabilities.c", - "embed/trezorhal/stm32f4/boot_args.c", + "embed/trezorhal/stm32f4/bootutils.c", "embed/trezorhal/stm32f4/common.c", "embed/trezorhal/stm32f4/entropy.c", "embed/trezorhal/stm32f4/fault_handlers.c", diff --git a/core/site_scons/models/stm32u5_common.py b/core/site_scons/models/stm32u5_common.py index 8bce578f0..123f904fe 100644 --- a/core/site_scons/models/stm32u5_common.py +++ b/core/site_scons/models/stm32u5_common.py @@ -50,7 +50,7 @@ def stm32u5_common_files(env, defines, sources, paths): sources += [ "embed/trezorhal/stm32u5/board_capabilities.c", - "embed/trezorhal/stm32u5/boot_args.c", + "embed/trezorhal/stm32u5/bootutils.c", "embed/trezorhal/stm32u5/common.c", "embed/trezorhal/stm32u5/entropy.c", "embed/trezorhal/stm32u5/fault_handlers.c",