Add support for the mcumgr echo command in serial boot mode

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig
index b3a5ac7..3478234 100644
--- a/boot/zephyr/Kconfig
+++ b/boot/zephyr/Kconfig
@@ -583,6 +583,11 @@
 	 on some hardware that has long erase times, to prevent long wait
 	 times at the beginning of the DFU process.
 
+config BOOT_MGMT_ECHO
+	bool "Enable echo command"
+	help
+	  if enabled, support for the mcumgr echo command is being added.
+
 menuconfig ENABLE_MGMT_PERUSER
 	bool "Enable system specific mcumgr commands"
 	help
diff --git a/boot/zephyr/include/mcuboot_config/mcuboot_config.h b/boot/zephyr/include/mcuboot_config/mcuboot_config.h
index 26d2bcb..c2d6672 100644
--- a/boot/zephyr/include/mcuboot_config/mcuboot_config.h
+++ b/boot/zephyr/include/mcuboot_config/mcuboot_config.h
@@ -173,6 +173,10 @@
 #define MCUBOOT_MGMT_CUSTOM_IMG_LIST
 #endif
 
+#ifdef CONFIG_BOOT_MGMT_ECHO
+#define MCUBOOT_BOOT_MGMT_ECHO
+#endif
+
 #ifdef CONFIG_BOOT_IMAGE_ACCESS_HOOKS
 #define MCUBOOT_IMAGE_ACCESS_HOOKS
 #endif