I’m following these instructions to reflash my librem 5 (Evergreen batch, still on the version before byzantium). I’m running this script:
# using already downloaded images
./scripts/librem5-flash-image --dir ~/data/librem-images --skip-download
and I am getting this output/error as I plug in the usb-c cable (while holding volume-up button):
2024-01-28 10:37:27 INFO Looking for librem5r4 luks byzantium image
2024-01-28 10:37:28 INFO Found disk image Build 16154 'luks librem5r4 byzantium image' from Sat Jan 27 21:47:30 2024
2024-01-28 10:37:29 INFO Found uboot Build 85 from Thu Aug 25 07:22:41 2022
2024-01-28 10:37:29 INFO Downloading to /home/user/data/librem-images
2024-01-28 10:37:29 INFO Skipping download and using local image '/home/user/data/librem-images/librem5r4.img'
Enter the flashing mode by holding volume-up button while turning the phone on.
If it's not detected, follow these steps:
- Ensure that the phone is powered off
- Turn all Hardware-Kill-Switches off
- Unplug the USB cable if connected
- Remove battery
- Hold volume-up button
- Insert the USB-C cable (red light blinks, no green light)
- Reinsert the battery (red and green lights constantly on, the script will continue)
- Release volume-up button
Searching...
uuu (Universal Update Utility) for nxp imx chips -- libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8
Wait for Known USB Device Appear...
Error: Unknown Command:FB: reboot
Traceback (most recent call last):
File "/home/user/src/librem5-flash-image/./scripts/librem5-flash-image", line 538, in <module>
sys.exit(main())
File "/home/user/src/librem5-flash-image/./scripts/librem5-flash-image", line 521, in main
flash_image(uuu_target, args.debug)
File "/home/user/src/librem5-flash-image/./scripts/librem5-flash-image", line 351, in flash_image
subprocess.check_call(['uuu', uuu_target])
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['uuu', '/home/user/data/librem-images/flash_librem5r4.lst']' returned non-zero exit status 255.
Hmmm, my guess the problem is that you are using Pop_OS. Maybe try a PurismOS live image?
I think you might be missing programs that the script needs in order to run. Whilst sure, you can install all needed programs manually, is much easier to just boot a PureOS live image.
I tried this first, but I’m having a separate issue with the PureOS iso booting to GRUB. The iso boots normally if I use a VM, but any usb flashed iso isn’t working. I tried etcher, Gnome Disks, plain dd, and I also tried a few different USB drives in case those were broken, same result in cases.
I don’t have experience with PureOS live USB specifically, but most LiveUSBs I worked with are plug an play. You use dd to burn the data on the flash, you press F11 or whatever is in your UEFI to select the where to boot from.
Thanks @amarok , when running sudo apt build-dep . I didn’t get any errors so I think all the python dependencies are met. The error doesn’t say anything about any missing python dependencies, it looks like a uuu fastboot error.
Do you have a local copy of uuu that is overriding the distro copy or an out of date version? which uuu uuu --version
Also, unless you have done the udev stuff, you will need to run as root i.e. sudo ./scripts/...
I used Ubuntu 22.04 to reflash my phone. While I haven’t ever used PopOS, I assume the version numbering aligns with Ubuntu. Also, you may be better off with an Ubuntu Live Boot if you are having difficulty with a PureOS Live Boot.
Also, always use lsusb to see whether the Librem 5 correctly appears in serial download mode i.e. to make sure that you did the procedure correctly on the Librem 5 end of things.
I set the the udev rules, but ran that command again just to be sure:
sudo ./scripts/librem5-flash-image --udev
2024-01-29 08:20:44 INFO Udev rules '/etc/udev/rules.d/70-librem5-flash-image.rules' already present
Can you elaborate on this:
Also, always use lsusb to see whether the Librem 5 correctly appears in serial download mode i.e. to make sure that you did the procedure correctly on the Librem 5 end of things.
If I check lsusb now (librem5 plugged in and battery in), I have:
Bus 004 Device 005: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget
Is that correct? What else should I be doing on the librem5 end of things other than holding volume-up and putting the battery in?
Yes, sorry, it is expected. It’s just a hack way of getting it to output the version.
Your version may be somewhat out of date. I’m seeing 1.4.193 (from Ubuntu 22.04).
So let’s go slightly differently. I would check
apt list uuu
to confirm that you have it installed and what version you have installed.
No. However this is tricky because you must look using lsusb immediately after putting the phone in serial download mode and before doing the flash. At that point in time you are expecting:
1fc9:012b NXP Semiconductors i.MX 8M Dual/8M QuadLite/8M Quad Serial Downloader
That shows that it is in serial download mode and waiting for the host to start downloading commands and content to it (via uuu).