I just upgraded from Amber to Byzantium. I initially tried the upgrade using Ubuntu 20.04 LTS but the necessary uuu installation became a mess (for me). I upgraded the PC to Ubuntu 21.04 Hirsute Hippo and everything went smoothly according the the upgrade instructions. If you are using Ubuntu, consider upgrading to 21.04 before your upgrading to Byzantium.
There will be, once some extra pieces fall into place.
There’s a semi-official recommendation from me for the Librem 5: upgrade! It’s more polished than Amber, and we need your bug reports for what’s still missing - also to know what to prioritize.
Hmm, guess i just ran into a bug using the flash script:
$ ./scripts/librem5-flash-image --debug
2021-11-01 18:37:11 INFO Looking for librem5r4 plain byzantium image
2021-11-01 18:37:11 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2021-11-01 18:37:12 DEBUG https://arm01.puri.sm:443 “GET /crumbIssuer/api/json HTTP/1.1” 200 155
2021-11-01 18:37:12 DEBUG https://arm01.puri.sm:443 “GET /job/Images/job/Image%20Build/api/json?depth=0 HTTP/1.1” 200 1064
2021-11-01 18:37:12 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2021-11-01 18:37:12 DEBUG https://arm01.puri.sm:443 “GET /job/Images/job/Image%20Build/9411//api/json HTTP/1.1” 200 915
2021-11-01 18:37:12 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2021-11-01 18:37:13 DEBUG https://arm01.puri.sm:443 “GET /job/Images/job/Image%20Build/9410//api/json HTTP/1.1” 200 631
Traceback (most recent call last):
File “/opt/000-Librem5/librem5-flash-image/./scripts/librem5-flash-image”, line 471, in
sys.exit(main())
File “/opt/000-Librem5/librem5-flash-image/./scripts/librem5-flash-image”, line 408, in main
image_ref = find_image(args.image_job, board, args.variant, args.dist)
File “/opt/000-Librem5/librem5-flash-image/./scripts/librem5-flash-image”, line 222, in find_image
if (json[‘description’].startswith(variant + ’ ’ + type) and
AttributeError: ‘NoneType’ object has no attribute ‘startswith’
Perhaps, the script attempts to collect the possible images first (here 9411, 9410, …) and fails because the image 9410 is empty. But that is only a wild guess from my side. May be it misses something different. It fails to download the image in any case.
Does anyone here knows a work-around, please?
Not sure if you need --debug
option there yet sudo
after …:~$ line is needed:
sudo ./scripts/librem5-flash-image
P.S. Please search this Forum with here provided command.
Sorry @dort, but I forgot to ask you if you used ./scripts/librem5-flash-image --udev
command? I hope so, prior to the above, in your post, described one.
Yes, i did. Anyway it is too soon for this command to be of interest, since the “librem5-flash-image” script fails to download the image. I only added the “–debug”, to make the command more verbose.
Hmm, my suspicion is, that the state of build-host https://arm01.puri.sm/job/Images/job/Image%20Build/ might be the reason. Can you download the image via “librem5-flash-image”?
Yes, it is coming down (downloading) to my just created folder (8min. left). Sorry, this is via normal download. Let me see …
EDIT: I have old librem5-flash-image file (not working one) so I’m recommending to you to repeat things by creating new folder and download current:
git clone https://source.puri.sm/Librem5/librem5-devkit-tools.git
Cloning into ‘librem5-devkit-tools’…
remote: Enumerating objects: 107, done.
remote: Counting objects: 100% (107/107), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 1920 (delta 49), reused 90 (delta 40), pack-reused 1813
Receiving objects: 100% (1920/1920), 3.41 MiB | 3.21 MiB/s, done.
Resolving deltas: 100% (1159/1159), done.
EDIT II: It is late for me but particular folder looks different and particular file is named flash-image:
…/librem5-devkit-tools/scripts# ls -l
total 48
…
-rwxr-xr-x 1 root root 3777 Nov 1 21:13 flash-image
…
Or:
$ ./scripts/flash-image
Traceback (most recent call last):
File “…/librem5-devkit-tools/./scripts/flash-image”, line 123, in
sys.exit(main())
File “…/librem5-devkit-tools/./scripts/flash-image”, line 87, in main
outdir = tempfile.mkdtemp(prefix=‘flash_’, dir=’.’)
File “/usr/lib/python3.9/tempfile.py”, line 498, in mkdtemp
_os.mkdir(file, 0o700)
PermissionError: [Errno 13] Permission denied: ‘./flash_42ceqfo9’
That’s it from my side, hopefully you’ll solve this until tomorrow.
On the non-L5 machines in my home, I enjoy using NixOS for the ease of cloning configuration. But that gets me thinking… surely SOMEONE has hacked together a script to save off system state (manually installed packages, config settings, etc.) & later restore from the artifact that had been stashed somewhere safe? Certainly there will be complications (e.g. config file changes between versions), but there’s gotta be something to get at least partway there.
Before migrating to NixOS, I used a shell script that would install a list of packages, and make certain config settings with gsettings/dconf/kwriteconfig5/perl. I suppose the next iteration would’ve been what’s described above, instead of just installing the hardcoded changes.
@dort, new day is coming, I realized that made mistake within my previous post. Actually my advice/direction was all right but I used (wasn’t focused), took down unrelated librem5-devkit-tools.git
file. Here is correct clone with HTTPS, to Librem 5 related, approach:
git clone https://source.puri.sm/Librem5/librem5-flash-image.git
Cloning into ‘librem5-flash-image’…
remote: Enumerating objects: 72, done.
remote: Counting objects: 100% (72/72), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 360 (delta 27), reused 47 (delta 10), pack-reused 288
Receiving objects: 100% (360/360), 70.81 KiB | 3.93 MiB/s, done.
Resolving deltas: 100% (208/208), done.
./scripts/librem5r4-flash-image
2021-11-02 05:04:41,278 INFO Looking for librem5r4 plain byzantium image
2021-11-02 05:04:44,971 INFO Found disk image Build 9417 ‘plain librem5r4 byzantium image’ from Tue Nov 2 03:14:54 2021
2021-11-02 05:04:47,939 INFO Found uboot Build 82 from Fri Sep 10 20:19:03 2021
2021-11-02 05:04:47,940 INFO Downloading to ./devkit_image_txfdf42h
2021-11-02 05:04:48,859 INFO Downloading image from https://arm01.puri.sm/job/Images/job/Image%20Build/9417/artifact/librem5r4.img.xz
Download: 3%|█ | 35479552/1279658148 [00:09<03:39, 5680473.65it/s^C2021-11-02 05:04:58,921 ERROR CTRL-C pressed. | 73204908/4500000256 [00:09<09:39, 7642740.18it/s]
2021-11-02 05:04:58,924 INFO Cleaning up.
Second address, clone with SSH option is available as well: git@source.puri.sm:Librem5/librem5-flash-image.git.
Thank you @Quarnero, i retried this morning, too, and had positive results, also.
Unfortunately, i re-cloned the repository before retrying, so i cannot fully exclude a handling mistake from my side yesterday, but i doubt. I was precisely using the procedure in Reflashing the Phone, which is identical to the procedure in your post.
My suspicion is, that the script died because of the state of the build-host. Please note that image 9405-9410 failed to build though 9411 appeared to be present yesterday.
Anyway, i can confirm that it works well today. Immediately after that, i ran into the “expired root account” issue while trying to get ssh going, so installation is still not as smooth as it could be, but that one was easy enough for me to figure out.
Thanks again, @Quarnero, for trying the procedure.
As for the “luks” variant, it it already to your liking? I have an OpenPGP card with the phone. Is the “luks” variant integrated with it?
There is an integration of the OpenPGP card for LUKS (I only tested it with a seperate USB OpenPGP card reader):
May be you would also like to change
the master key before flashing:
When installing the package libusb
does it need to be the exact version 1.0-0-dev or will it work if I download the latest version which is libusb-0_1.4
?
EDIT: Actually it cannot find that one particular package.
Loading repository data...
Reading installed packages...
'libusb-1.0-0-dev' not found in package names. Trying capabilities.
No provider of 'libusb-1.0-0-dev' found.
Resolving package dependencies...
Nothing to do.
I think you already answered your own question but … that list of packages was arrived at by me simply by iteration … try to build, wait for it to fail because xyz
isn’t installed, install xyz
, repeat.
After some struggle I managed to download the 5 packages required to build the uuu tool but when I run the last command I got this output. What now?
Cloning into 'mfgtools'...
warning: redirecting to https://source.puri.sm/Librem5/mfgtools.git/
remote: Enumerating objects: 2991, done.
remote: Total 2991 (delta 0), reused 0 (delta 0), pack-reused 2991
Receiving objects: 100% (2991/2991), 3.31 MiB | 67.00 KiB/s, done.
Resolving deltas: 100% (2084/2084), done.
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
No CMAKE_C_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in CMakeLists.txt:
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/gantz/git/librem5-devkit-tools/build/mfgtools/CMakeFiles/CMakeOutput.log".
See also "/home/gantz/git/librem5-devkit-tools/build/mfgtools/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found. Stop.
[sudo] password for root:
Based on that, my guess is you can ignore the part above that and worry more about the errors that came below:
and
Looks like you need a C compiler and a C++ compiler, the most common C compiler is called “gcc” and the corresponding C++ compiler is g++ so try to installing packages called “gcc” and “g++”, or similar names. Try to look up the package names for gcc and g++ for your distro and install them. Probably g++ is enough because installing it will give you gcc automatically as a dependency.
I bieleve I have now installed the gcc and g++ compilers but now I have some other error.
gantz@localhost:~/git/librem5-devkit-tools> ./scripts/build_uuu.sh -i
fatal: destination path 'mfgtools' already exists and is not an empty directory.
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libusb-1.0>=1.0.16'
-- No package 'libusb-1.0' found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:467 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:647 (_pkg_check_modules_internal)
libuuu/CMakeLists.txt:7 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "/home/gantz/git/librem5-devkit-tools/build/mfgtools/CMakeFiles/CMakeOutput.log".
See also "/home/gantz/git/librem5-devkit-tools/build/mfgtools/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found. Stop.
However I cannot install ‘libusb-1.0’ because that package is not available to me.
I think I can help you get over this issue where I replied in another thread. Likely best to keep it to one thread or the other. Flashing to Byzantium
Also libusb is likely here: https://software.opensuse.org/package/libusb-1_0-0 so you should be able to install it if you like.