Loading repository data...
Reading installed packages...
'libzip-dev' not found in package names. Trying capabilities.
No provider of 'libzip-dev' found.
Resolving package dependencies...
Nothing to do.
gantz@localhost:~> sudo zypper install libbz2-dev
Loading repository data...
Reading installed packages...
'libbz2-dev' not found in package names. Trying capabilities.
No provider of 'libbz2-dev' found.
Resolving package dependencies...
Nothing to do.
I did that last step in order to build the UUU tool and this is what I got. Donât understand what any of this means.
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:
Just flashed my Amber Librem 5 to Byzantium with LUKS encryption.
Here is a summary of some points that it took me some time to gather together. None of this is really new information. I just thought it would be good to put it all in one post. Most of this has been covered in this thread or elsewhere on this forum already.
General points
I found building uuu from source to be fairly painless using the instructions at https://developer.puri.sm/Librem5/Development_Environment/Boards/HowTo/Building_uuu.html. I skipped the part about creating udev rules, because the next set of instructions covers that. I used export PATH=/path/to/where/my/freshly/built/uuu/binary/was:$PATH) to make sure the librem5-flash-image script could find uuu.
I copied data I wanted to keep from the phone into an archive file on an SD card, so that I could restore it after reflashing.
On my laptop, sudo apt build-dep . failed to work, so I manually identified and installed the Python dependencies by reading through the imports in the librem5-flash-image script and determining which were available but not already installed.
Flashing with LUKS encryption
When flashing using the librem5-flash-image script, remember to specify --variant luks if you want LUKS encryption.
Itâs known that flashing the LUKS image results in an insecure cloned master key for the encryption. This is not the encryption passphrase. The passphrase can be easily changed (and indeed you can have more than one passphrase at a time), but the master key canât be changed without re-writing all the encrypted data on disk, and you canât do that while the encrypted filesystem is mounted, so itâs best done before flashing the image.
I first ran the librem5-flash-image script with --skip-cleanup to obtain the image and a uuu script (.lst file).
To re-encrypt with a new master key, I mapped the image as a loop device and ran cryptsetup-reencrypt on it. (References: 1, 2)
The re-encrypted image can then be flashed by running uuu directly, giving uuu the path to the uuu script as its only argument.
The encrypted image does not expand to fill the available space by default. I used cfdisk on the phone to delete /dev/mmcblk0p2 and to make a new partition filling the space. Then I deleted /etc/resize_rootfs-resized and rebooted the phone. This caused the partition to be resized to fill the available space. (References: 1, 2)
My first impression is that Byzantium seems more polished and complete than Amber. I now need to restore my data and selected configurations before trying it out properly.
This looks overly complicated. Could you help me to flash mine to Byzantium? Iâm basically stuck on the first bullet point. The post above yours is what I got and I dunno if that worked properly or not.
It looks as though you are probably missing a compiler and need to install one. Either that or cmake canât find the compiler you already have.
On PureOS, or another Debian- or Ubuntu-based distro, I would try sudo apt install build-essential to fix that.
It looks like you are running openSUSE, though. I found a forum thread asking whatâs the equivalent to build-essential in openSUSE. Apparently the equivalent is sudo zypper install --type pattern devel_basis, but I have no idea how accurate that information is, because I havenât used openSUSE in more than a decade. But hopefully itâs at least a starting point to figuring out what to do.
The output youâve posted looks like it came from both git and cmake. If installing a compiler doesnât solve the problem, it might help if you could clarify what commands you have run, and precisely how you went about running them, and which output came after which command.
Note that I am likely to be unable to come to this forum again until next Friday.
I installed the devel_basis pattern and this is what I got now. Itâs still not happy.
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.
Looks like you are trying to build uuu from source. I donât use openSUSE but it looks like a package is availabe: https://software.opensuse.org/package/mfgtools so I assume rather then build it from source you can just install mfgtools. You can also keep trying to build from source. That error message is saying that you need to install libusb-1.0.
edit - I actually think it would be great idea to mention in the docs that uuu in other distros is commonly mfgtools
That mfgtools package is only for Tumbleweed. I use Leap 15.3 So I tried to install the community version for Leap but there is problem with the repository.
An error occurred while initialising the software repository.
Details:
https-download.opensuse.org-8c7c0683: [https-download.opensuse.org-8c7c0683|https://download.opensuse.org/repositories/SUSE:/SLE-15-SP1:/Update/pool-leap-15.3/] Valid metadata not found at specified URL
History:
- [https-download.opensuse.org-8c7c0683|https://download.opensuse.org/repositories/SUSE:/SLE-15-SP1:/Update/pool-leap-15.3/] Repository type can't be determined.
Try again?
EDIT: Installation was only partially successful. So it did install in the end but did not add all the repositories which should be fine.
The packages you need to run that script are all listed there. So you have to find the package that in each of those line items and install them individually. coloredlogs for example would be this package: https://software.opensuse.org/package/python3-coloredlogs
Which apparently has no offical package for you eitherâŚ
For packages that are available for a newer version of my OS I just try to build tha package source. Iâm not sure how it works on SUSE, but on Fedora you need to find the .src.rpm and then use rpmbuild. Usually works.
I did find those packages in Yast. They all just have prefix called phyton2 or phyton3. That website is probably not updated very well. The question now is which version do I install? Python2 or 3.