zephyr/serial_recovery: fix serial device binding
zephyr changes the way in which it provide name of
serial device used by serial recover.
see: https://github.com/zephyrproject-rtos/zephyr/pull/18752
This path introduce build time configuration of device name
which is set to exact the same device which was set before.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig
index d7c92bc..e0a7c02 100644
--- a/boot/zephyr/Kconfig
+++ b/boot/zephyr/Kconfig
@@ -248,6 +248,18 @@
Logic value of the detect pin which triggers serial recovery
mode.
+# Workaround for not being able to have commas in macro arguments
+DT_CHOSEN_Z_CONSOLE := zephyr,console
+
+config RECOVERY_UART_DEV_NAME
+ string "UART Device Name for Recovery UART"
+ default "$(dt_chosen_label,$(DT_CHOSEN_Z_CONSOLE))" if HAS_DTS
+ default "UART_0"
+ depends on BOOT_SERIAL_UART
+ help
+ This option specifies the name of UART device to be used for
+ serial recovery.
+
endif # MCUBOOT_SERIAL
endmenu