Skip to content

boot: zephyr: Remove reference to old Kconfigs #2401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions boot/zephyr/boards/nrf52_minimal_footprint.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,25 @@ CONFIG_BOOT_SIGNATURE_KEY_FILE="root-ec-p256.pem"
# by reliability reason.
CONFIG_BOOT_UPGRADE_ONLY=y

# CONFIG_BOARD_ENABLE_DCDC is not set
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52832_QFAA=y
CONFIG_ARM=y
CONFIG_ARM_MPU=n
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_THREAD_STACK_INFO=n
# CONFIG_TICKLESS_KERNEL is not set
CONFIG_FLASH=y

CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_DEBUG=n
CONFIG_EARLY_CONSOLE=n
CONFIG_PRINTK=n
CONFIG_LOG=n

CONFIG_SYS_CLOCK_EXISTS=n

# Drivers and peripherals
CONFIG_I2C=n
CONFIG_WATCHDOG=n
CONFIG_GPIO=n
CONFIG_PINMUX=n
CONFIG_SPI=n
CONFIG_SERIAL=n

Expand All @@ -49,13 +46,11 @@ CONFIG_DYNAMIC_INTERRUPTS=n
CONFIG_IRQ_OFFLOAD=n

# Memory protection
CONFIG_MEMORY_PROTECTION=n
CONFIG_THREAD_CUSTOM_DATA=n
CONFIG_FPU=n

# Boot
CONFIG_BOOT_BANNER=n
CONFIG_BOOT_DELAY=0

# Console
CONFIG_STDOUT_CONSOLE=n
2 changes: 0 additions & 2 deletions boot/zephyr/boards/nrf54l15dk_nrf54l05_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ CONFIG_BOOT_MAX_IMG_SECTORS=256
# Ensure that the SPI NOR driver is disabled by default
CONFIG_SPI_NOR=n

CONFIG_FPROTECT=y

CONFIG_BOOT_WATCHDOG_FEED=n

# Ensure the fastest RRAM write operations
Expand Down
2 changes: 0 additions & 2 deletions boot/zephyr/boards/nrf54l15dk_nrf54l10_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ CONFIG_BOOT_MAX_IMG_SECTORS=256
# Ensure that the SPI NOR driver is disabled by default
CONFIG_SPI_NOR=n

CONFIG_FPROTECT=y

CONFIG_BOOT_WATCHDOG_FEED=n

# Ensure the fastest RRAM write operations
Expand Down
35 changes: 8 additions & 27 deletions boot/zephyr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,8 @@ const struct boot_uart_funcs boot_funcs = {
#include <arm_cleanup.h>
#endif

/* CONFIG_LOG_MINIMAL is the legacy Kconfig property,
* replaced by CONFIG_LOG_MODE_MINIMAL.
*/
#if (defined(CONFIG_LOG_MODE_MINIMAL) || defined(CONFIG_LOG_MINIMAL))
#define ZEPHYR_LOG_MODE_MINIMAL 1
#endif

/* CONFIG_LOG_IMMEDIATE is the legacy Kconfig property,
* replaced by CONFIG_LOG_MODE_IMMEDIATE.
*/
#if (defined(CONFIG_LOG_MODE_IMMEDIATE) || defined(CONFIG_LOG_IMMEDIATE))
#define ZEPHYR_LOG_MODE_IMMEDIATE 1
#endif

#if defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
!defined(ZEPHYR_LOG_MODE_MINIMAL)
#if defined(CONFIG_LOG) && !defined(CONFIG_LOG_MODE_IMMEDIATE) && \
!defined(CONFIG_LOG_MODE_MINIMAL)
#ifdef CONFIG_LOG_PROCESS_THREAD
#warning "The log internal thread for log processing can't transfer the log"\
"well for MCUBoot."
Expand All @@ -128,8 +114,8 @@ K_SEM_DEFINE(boot_log_sem, 1, 1);
/* synchronous log mode doesn't need to be initalized by the application */
#define ZEPHYR_BOOT_LOG_START() do { } while (false)
#define ZEPHYR_BOOT_LOG_STOP() do { } while (false)
#endif /* defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
* !defined(ZEPHYR_LOG_MODE_MINIMAL)
#endif /* defined(CONFIG_LOG) && !defined(CONFIG_LOG_MODE_IMMEDIATE) && \
* !defined(CONFIG_LOG_MODE_MINIMAL)
*/

BOOT_LOG_MODULE_REGISTER(mcuboot);
Expand Down Expand Up @@ -427,8 +413,8 @@ static void do_boot(struct boot_rsp *rsp)
}
#endif

#if defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
!defined(CONFIG_LOG_PROCESS_THREAD) && !defined(ZEPHYR_LOG_MODE_MINIMAL)
#if defined(CONFIG_LOG) && !defined(CONFIG_LOG_MODE_IMMEDIATE) && \
!defined(CONFIG_LOG_PROCESS_THREAD) && !defined(CONFIG_LOG_MODE_MINIMAL)
/* The log internal thread for log processing can't transfer log well as has too
* low priority.
* Dedicated thread for log processing below uses highest application
Expand All @@ -446,12 +432,7 @@ void boot_log_thread_func(void *dummy1, void *dummy2, void *dummy3)
log_init();

while (1) {
#if defined(CONFIG_LOG1) || defined(CONFIG_LOG2)
/* support Zephyr legacy logging implementation before commit c5f2cde */
if (log_process(false) == false) {
#else
if (log_process() == false) {
#endif
if (boot_log_stop) {
break;
}
Expand Down Expand Up @@ -485,8 +466,8 @@ void zephyr_boot_log_stop(void)
*/
(void)k_sem_take(&boot_log_sem, K_FOREVER);
}
#endif /* defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
* !defined(CONFIG_LOG_PROCESS_THREAD) && !defined(ZEPHYR_LOG_MODE_MINIMAL)
#endif /* defined(CONFIG_LOG) && !defined(CONFIG_LOG_MODE_IMMEDIATE) && \
* !defined(CONFIG_LOG_PROCESS_THREAD) && !defined(CONFIG_LOG_MODE_MINIMAL)
*/

#if defined(CONFIG_BOOT_SERIAL_ENTRANCE_GPIO) || defined(CONFIG_BOOT_SERIAL_PIN_RESET) \
Expand Down
2 changes: 1 addition & 1 deletion boot/zephyr/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CONFIG_FLASH=y
# CONFIG_I2C is not set

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
CONFIG_LOG_MODE_MINIMAL=y
### Ensure Zephyr logging changes don't use more resources
CONFIG_LOG_DEFAULT_LEVEL=0
### Use info log level by default
Expand Down
Loading