Fix error "SSH execute command timedout!" on flashing firmware

This commit is contained in:
remittor
2021-11-18 21:23:48 +03:00
parent f40af2cea1
commit 931235aaeb
2 changed files with 15 additions and 4 deletions
+3 -2
View File
@@ -471,14 +471,15 @@ if fw_num is not None:
if not kernel.cmd or not rootfs.cmd:
die("Flashing recipe unknown!")
gw.set_timeout(12)
gw.upload(kernel.fn_local, kernel.fn_remote)
gw.upload(rootfs.fn_local, rootfs.fn_remote)
print('Writing kernel image to addr {} ...'.format("0x%08X" % kernel.addr))
print(" " + kernel.cmd)
gw.run_cmd(kernel.cmd)
gw.run_cmd(kernel.cmd, timeout = 12)
print('Writing rootfs image to addr {} ...'.format("0x%08X" % rootfs.addr))
print(" " + rootfs.cmd)
gw.run_cmd(rootfs.cmd)
gw.run_cmd(rootfs.cmd, timeout = 40)
print("The firmware has been successfully flashed!")