Purism Librem5 (purism-librem5)

Contributors

 * craftyguy

Installation
Use pmbootstrap to build your own image.

Place the device into, then flash it with:

Alternatively you can flash a pre-built image with JumpDrive, but this is more effort.

Flash Mode
To place the Librem 5 info flashing mode, perform the following:


 * 1) Ensure that the phone is switched off.
 * 2) Turn all Hardware-Kill-Switches off
 * 3) Remove battery
 * 4) Hold volume-up
 * 5) Insert the USB-c cable: (red light blinks, no green light)
 * 6) Reinsert the battery: (red light is constantly on, the script will continue)
 * 7) Release volume-up

These directions were gathered from Purism's documentation, refer to it for additional details/troubleshooting.

OpenPGP Smartcard
Devices shipped after April 2021 already have the OpenPGP smartcard reader firmware flashed. For those devices these instructions should not be necessary. But you still need to check the end of this section on the other tools needed to use the smartcard.

Older Librem 5 phones will need to have the reader firmware upgraded. The firmware can be built from source, but Purism has created a helper script to download/flash the firmware. In order to run this script on Alpine Linux / postmarketOS, these patches should be applied: https://source.puri.sm/angus.ainslie/ttxs-firmware/-/merge_requests/3/diffs

Running the script should result in the following if it is successful:

Reboot the phone after upgrading the firmware.

There's a package in the postmarketOS aports repo that enables/installs everything required to use a smartcard on this device:

Reboot after installing this package for the first time.

For more information, including some examples of how to generate keys and push existing keys to the smart card using, see Purism's Librem Key manual: https://docs.puri.sm/Librem_Key/Getting_Started/User_Manual.html

eMMC Backup / Restore
This section describes one method of backing up the eMMC and restoring that backup. postmarketOS, like many other Linux distros, can work with any number of backup/restore solutions (e.g. rsnapshot, and so on). This particular method uses JumpDrive and, and therefore is out-of-band from postmarketOS (or any distro) on the eMMC. An entire copy of the eMMC will be produced, with full disk encryption preserved if it is enabled.

The steps to prepare the Librem 5 are the same for backing up and restoring a disk backup:


 * 1)
 * 2) Place the device into
 * 3)

is needed on the host PC. See the  manpage for information on additional parameters you might want to use.

Identify the Librem 5 eMMC disk using lsblk. The following options make it relatively easy to identify the correct disk, but check multiple times that you have the correct drive!

Backup
Run. Specifying a map file is recommended so that the process can be resumed if it is interrupted.

Restore
The backup image can be restored with :

U-boot Updates
Purism is still somewhat actively improving u-boot support on this device, and some components required for booting (DDR training firmware) still see periodic updates. As a result, the  package might be upgraded on a device with an existing postmarketOS installation. Package upgrades will not upgrade the u-boot used for booting the device. In order to upgrade the u-boot used for booting the device, the  script can be used.

Run with  to confirm the input file and device are correct:

Then perform the actual update:

Known Issues
For an ever-up-to-date list of issues, see issues in gitlab with the device-purism-librem5 label


 * The Librem 5 ships with the  app by default, but to use the camera for taking pictures you must manually run   in a terminal to install a forked version of the application.


 * Suspend/resume is not supported on the Librem 5, this is an upstream issue and not specific to postmarketOS.