From d84dd91e19ec8e2a6baf3efa9ff319bf9d6f746a Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Tue, 28 Oct 2025 13:42:22 +0530 Subject: [PATCH] wait long enough for the reboot --- src/fw_images.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/fw_images.c b/src/fw_images.c index 0c38a1b..7203d4d 100644 --- a/src/fw_images.c +++ b/src/fw_images.c @@ -156,11 +156,14 @@ static void _exec_reboot(const void *arg1, void *arg2) dmuci_commit_package(config_name); sleep(3); - dmubus_call_set("rpc-sys", "reboot", UBUS_ARGS{0}, 0); - sleep(5); // Wait for reboot to happen - BBFDM_ERR("Reboot call failed with rpc-sys, trying again with system"); - dmubus_call_set("system", "reboot", UBUS_ARGS{0}, 0); - sleep(5); // Wait for reboot + dmubus_call_blocking("system", "reboot", UBUS_ARGS{0}, 0, NULL); + sleep(15); // Wait for reboot + BBFDM_ERR("Reboot call failed with system, trying again with reboot rpc-sys..."); + dmubus_call_blocking("rpc-sys", "reboot", UBUS_ARGS{0}, 0, NULL); + sleep(15); // Wait for reboot to happen + BBFDM_ERR("Reboot call failed with rpc-sys, trying again with reboot cmd ..."); + run_cmd("reboot", NULL, 0); + sleep(15); // Wait for reboot BBFDM_ERR("Reboot call failed!!!"); // Set last_reboot_cause to empty because there is a problem in the system reboot