Commit ccaa03ef authored by David Hamner's avatar David Hamner

Wait for devkit, check for device before waiting and updated default msg

parent 7fbf6dd9
Pipeline #63450 failed with stages
in 1 minute and 30 seconds
......@@ -256,25 +256,27 @@ def write_uuu_script(target, image, uboot, mods):
def wait_for_librem():
def wait_for_librem(librem_msg="default"):
found = False
Ensure that the phone is switched off.
Disconnect the USB C cable.
Press and hold the Volume Up button. Keep it pressed.
Press and hold the power button for 16 seconds.
Release the the power button.
Release the Volume Up button.
Plug one end of the USB C cable into your workstation.
Plug the other end of the USB C cable into the phone.
printed_msg = False
if librem_msg == "default":
librem_msg = """
Turn all Hardware-Kill-Switches off
Remove battery
Hold volume-up
Insert the USB-c cable: (red light blinks, no green light)
Reinsert the battery: (red light is constantly on, the script will continue)\n\nSearching..."""
while not found:
returned_text = subprocess.check_output("lsusb", shell=True, universal_newlines=True)
for line in returned_text.split("\n"):
if "NXP Semiconductors" in line:
found = True
if not found and not printed_msg:
printed_msg = True
def flash_image(uuu_target, debug):
......@@ -406,7 +408,9 @@ def main():
write_uuu_script(uuu_target, image_target, uboot_target, uuu_mods)
if not args.skip_flash:
if board != "devkit":
if board == "devkit":
wait_for_librem(librem_msg="Please connect your devkit now.\nSearching...")
flash_image(uuu_target, args.debug)
except VerifyImageException as e:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment