diff --git a/src/snagrecover/firmware/firmware.py b/src/snagrecover/firmware/firmware.py index 8aa3432..7d24ec0 100644 --- a/src/snagrecover/firmware/firmware.py +++ b/src/snagrecover/firmware/firmware.py @@ -74,8 +74,7 @@ def am62x_run(dev: usb.core.Device, fw_name: str, fw_blob: bytes): print("Downloading file...") dfu_cmd.download_and_run(fw_blob, partid, offset=0, size=len(fw_blob)) print("Done") - if fw_name == "tispl": - # run tispl firmware + if fw_name == "u-boot": print("Sending detach command...") dfu_cmd.detach(partid) diff --git a/src/snagrecover/recoveries/am62x.py b/src/snagrecover/recoveries/am62x.py index 1609e42..f8a2b98 100644 --- a/src/snagrecover/recoveries/am62x.py +++ b/src/snagrecover/recoveries/am62x.py @@ -18,6 +18,17 @@ def main(): usb_addr = parse_usb_addr(recovery_config["firmware"]["tiboot3"]["usb"]) dev = get_usb(usb_addr) - run_firmware(dev, "u-boot") + run_firmware(dev, "tispl") + run_firmware(dev, "u-boot") + + time.sleep(2) + + # For newer versions of U-Boot, only SPL will run from the + # previous commands and the u-boot firmware should be sent + # one more time. + + dev = get_usb(usb_addr, error_on_fail=False) + if dev is not None: + run_firmware(dev, "u-boot")