mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 21:20:28 +01:00
Wait for the firmware upgrade
This commit is contained in:
parent
38399ab501
commit
f2bff8491a
2 changed files with 3 additions and 1 deletions
|
|
@ -660,11 +660,12 @@ int bbf_fw_image_download(const char *url, const char *auto_activate, const char
|
|||
goto end;
|
||||
}
|
||||
|
||||
sleep(30); // Wait for the image to become available
|
||||
// Reboot the device if auto activation is true
|
||||
if (activate) {
|
||||
sleep(30); // Wait for the image to become available
|
||||
if (dmubus_call_set("system", "reboot", UBUS_ARGS{0}, 0) != 0)
|
||||
res = -1;
|
||||
sleep(10); // Wait for reboot to take action
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
|
|||
|
|
@ -1407,6 +1407,7 @@ static int operate_DeviceInfoFirmwareImage_Activate(char *refparam, struct dmctx
|
|||
return CMD_FAIL;
|
||||
|
||||
res = dmubus_call_set("rpc-sys", "reboot", UBUS_ARGS{0}, 0);
|
||||
sleep(10); // Wait for reboot to happen
|
||||
}
|
||||
|
||||
return res ? CMD_FAIL : CMD_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue