diff --git a/scripts/serial_command.py b/scripts/serial_command.py index 175a379..c7da679 100644 --- a/scripts/serial_command.py +++ b/scripts/serial_command.py @@ -98,7 +98,8 @@ def transfer(cli, firmware, *, dtb=False, kernel=False, rootfs=False, rootfs_siz if rootfs and len(image) > 0x1800000: raise RuntimeError("RootFS exceeds the non-overlapping RAM buffer capacity (0x1800000)") # Invalidate any previous transfer length before attempting a new transfer. - cli.command("setenv filesize") + cli.command("setenv filesize 0") + cli.command("printenv filesize", r"^filesize=0$") output = cli.command( f"tftp {address:#x} {filename}", r"^Bytes transferred = \d+", timeout=120,