diff --git a/subsys/mgmt/hawkbit/Kconfig b/subsys/mgmt/hawkbit/Kconfig index e2011fd4cad..6b806f28a80 100644 --- a/subsys/mgmt/hawkbit/Kconfig +++ b/subsys/mgmt/hawkbit/Kconfig @@ -145,6 +145,22 @@ config HAWKBIT_STATIC_CERT_TAG endif +choice HAWKBIT_REBOOT_MODE + prompt "Reboot mode after update" + default HAWKBIT_REBOOT_WARM + +config HAWKBIT_REBOOT_WARM + bool "Warm reboot after update" + help + Do a warm reboot after the update. + +config HAWKBIT_REBOOT_COLD + bool "Cold reboot after update" + help + Do a cold reboot after the update. + +endchoice + module = HAWKBIT module-str = Log Level for hawkbit module-help = Enables logging for hawkBit code. diff --git a/subsys/mgmt/hawkbit/hawkbit.c b/subsys/mgmt/hawkbit/hawkbit.c index 854500850b6..6b42cbf78fe 100644 --- a/subsys/mgmt/hawkbit/hawkbit.c +++ b/subsys/mgmt/hawkbit/hawkbit.c @@ -1190,7 +1190,7 @@ static bool send_request(enum http_method method, enum hawkbit_http_request type void hawkbit_reboot(void) { LOG_PANIC(); - sys_reboot(SYS_REBOOT_WARM); + sys_reboot(IS_ENABLED(CONFIG_HAWKBIT_REBOOT_COLD) ? SYS_REBOOT_COLD : SYS_REBOOT_WARM); } static bool check_hawkbit_server(void)