From 2dbdd0b909af7a59e70b154028339b3530cdbbe4 Mon Sep 17 00:00:00 2001 From: Ondrej Mikle Date: Tue, 17 Dec 2024 10:06:39 +0100 Subject: [PATCH] feat(west): add partition image for bootloader and bootloader overlays There are two overlays because one is without recovery/update and one with. [no changelog] --- west/trezor/trezor-ble/mcuboot.conf | 25 ++++++++++++++++++ .../mcuboot.conf.without_serial_recovery | 25 ++++++++++++++++++ west/trezor/trezor-ble/pm_static.yml | 26 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 west/trezor/trezor-ble/mcuboot.conf create mode 100644 west/trezor/trezor-ble/mcuboot.conf.without_serial_recovery create mode 100644 west/trezor/trezor-ble/pm_static.yml diff --git a/west/trezor/trezor-ble/mcuboot.conf b/west/trezor/trezor-ble/mcuboot.conf new file mode 100644 index 0000000000..13a3d5ed2f --- /dev/null +++ b/west/trezor/trezor-ble/mcuboot.conf @@ -0,0 +1,25 @@ +#CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000 + +CONFIG_SERIAL=y +CONFIG_UART_LINE_CTRL=y +CONFIG_UART_NRFX=y +#CONFIG_UART_INTERRUPT_DRIVEN=n + +# MCUBoot serial +CONFIG_GPIO=y +CONFIG_GPIO_NRFX_INTERRUPT=n +CONFIG_MCUBOOT_SERIAL=y +CONFIG_BOOT_SERIAL_CDC_ACM=y +CONFIG_BOOT_SERIAL_UART=y + +#CONFIG_LOG_BACKEND_UART=y + +#CONFIG_BOOT_SERIAL_DETECT_PIN=11 +#CONFIG_MCUMGR_SMP_UART=y +CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP=y +CONFIG_SINGLE_APPLICATION_SLOT=y + +CONFIG_RTT_CONSOLE=y +CONFIG_USE_SEGGER_RTT=y +CONFIG_UART_CONSOLE=n + diff --git a/west/trezor/trezor-ble/mcuboot.conf.without_serial_recovery b/west/trezor/trezor-ble/mcuboot.conf.without_serial_recovery new file mode 100644 index 0000000000..4682152457 --- /dev/null +++ b/west/trezor/trezor-ble/mcuboot.conf.without_serial_recovery @@ -0,0 +1,25 @@ +#CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000 + +#CONFIG_SERIAL=y +#CONFIG_UART_LINE_CTRL=y +#CONFIG_UART_NRFX=y +#CONFIG_UART_INTERRUPT_DRIVEN=n + +# MCUBoot serial +CONFIG_GPIO=y +CONFIG_GPIO_NRFX_INTERRUPT=n +#CONFIG_MCUBOOT_SERIAL=y +#CONFIG_BOOT_SERIAL_CDC_ACM=y +#CONFIG_BOOT_SERIAL_UART=y + +#CONFIG_LOG_BACKEND_UART=y + +#CONFIG_BOOT_SERIAL_DETECT_PIN=11 +#CONFIG_MCUMGR_SMP_UART=y +CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP=y +CONFIG_SINGLE_APPLICATION_SLOT=y + +CONFIG_RTT_CONSOLE=y +CONFIG_USE_SEGGER_RTT=y +CONFIG_UART_CONSOLE=n + diff --git a/west/trezor/trezor-ble/pm_static.yml b/west/trezor/trezor-ble/pm_static.yml new file mode 100644 index 0000000000..fdacb5a0c8 --- /dev/null +++ b/west/trezor/trezor-ble/pm_static.yml @@ -0,0 +1,26 @@ +mcuboot: + address: 0x0 + size: 0xc000 +mcuboot_pad: + address: 0xc000 + size: 0x200 +app: + address: 0x10200 + size: 0x6de00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xc000 + size: 0x6e000 +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x10200 + size: 0x6de00 +settings_storage: + address: 0x7e000 + size: 0x2000 +