Jump to content

Purism Librem5 (purism-librem5): Difference between revisions

From postmarketOS Wiki
mNo edit summary
Add installation details for flashing pre-built images, getting to flash mode, and using pmbootstrap flasher
Line 46: Line 46:
== Installation ==
== Installation ==


=== Flashing ===
==== Old method ====
To put the phone into flash mode, unplug charging cable, remove battery, hold the Vol+ button and then re-insert battery and plug in USB cable to computer. pmOS can be flashed to the device by executing <code>pmbootstrap flasher flash_rootfs</code>


==== Evergreen Batch Method ====
=== From pre-built image (easy method) ===
Prepare the phone by following the steps at: https://source.puri.sm/Librem5/developer.puri.sm/-/blob/ed09a5d1f7701a7312de8b1277ff14115ec6bf03/Development_Environment/Phone/Troubleshooting/Reflashing_the_Phone.rst
Official images of postmarketOS for the PinePhone are built at least every week. Currently the device is only supported on the <code>edge</code> branch of postmarketOS.


Make sure you have initialized and installed a flashable image using pmbootstrap [https://wiki.postmarketos.org/wiki/Installation_guide#Installation_and_flashing].
This method requires the <code>uuu</code> application is installed on the host computer. <uuu> is NXP's image deploy tool, and may be found in some distros in a package named <code>mfgtools</code>.


Finally, in a terminal, run: <code>pmbootstrap flasher flash_rootfs</code>
==== Download the right image ====
* Branch ([[Releases|more]]):
** '''[https://images.postmarketos.org/bpo/edge/purism-librem5/ edge]''': bleeding edge version (has latest features, but may break more often).
* User interface
** Phosh: Purism's GTK based phone interface) ([[Phosh|more]])
** Plasma Mobile (edge only): KDE's Plasma based phone interface ([https://www.plasma-mobile.org/ more])
** (Note that [[User-Interfaces|more interfaces]] are available, build your own image with pmbootstrap if interested)
* Pick the latest image by its date
* Choose the regular image, or the installer image
** Graphical Installer:
*** Ends in <code>-installer.img.xz</code>
*** Recommended for a proper installation.
*** Installs postmarketOS to the built-in internal memory (eMMC)
*** Encrypting your installation is possible
*** Passwords for user and SSH are set during installation (and SSH can be disabled)
** Regular image:
*** Ends in <code>.img.xz</code>
*** An installation of postmarketOS with defaults for passwords and no full disk encryption
*** The login is <code>user</code> with password <code>147147</code>
*** [[SSH|sshd]] is currently enabled by default! ({{issue|85|build.postmarketos.org}})
*** '''Not recommended''', unless looking for a quick way to try out postmarketOS
 
==== Download JumpDrive ====
 
Grab the latest <code>purism-librem5.tar.xz</code> image from the '''[https://github.com/dreemurrs-embedded/Jumpdrive/releases JumpDrive release page]'''
{{note|JumpDrive 0.7 is the first version to support the Librem 5]]}}
 
Extract it, and you should see something similar:
 
<syntaxhighlight lang="shell-session">
$ tar xf purism-librem5.tar.xz
$ ls
boot-purism-librem5.sh  dtbs  initramfs-purism-librem5.gz  kernel-librem5.gz  purism-librem5.lst  purism-librem5.tar.xz  u-boot-librem5.bin
</syntaxhighlight>
 
==== Run JumpDrive ====
 
Place the Librem 5 into [[#Flash Mode]].
 
Use the helper script from the JumpDrive release to flash the Librem 5:
<syntaxhighlight lang="shell-session">
$ ./boot-purism-librem5.sh
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.72-0-g8e9e189
 
Success 1    Failure 0
 
3:2    10/10 [Done                                  ] FB: Done
</syntaxhighlight>
 
==== Flash to EMMC ====
 
In order to flash the postmarketOS image to the Librem 5, locate the bock device exposed to the host computer via JumpDrive:
<syntaxhighlight lang="shell-session">
lsblk -o name,size,model,vendor
NAME        SIZE MODEL                    VENDOR
sda      476.9G Samsung_SSD_860_PRO_512GB ATA
├─sda1  1007.5K
├─sda2    476.8G
│ └─root  476.8G
└─sda3    99.3M
sdc        29.1G e_eMMC                    JumpDriv
├─sdc1      189M
└─sdc2    28.9G
zram0      247M
</syntaxhighlight>
 
In the example above, the <code>/dev/sdc</code> is the EMMC device on the Librem 5.
 
{{Warning| Triple check you have selected the right block device when performing the next step!! }}
 
<syntaxhighlight lang="shell-session">
$ xzcat 20210217-0609-postmarketOS-edge-phosh-6-purism-librem5-installer.img.xz | sudo dd of=/dev/DRIVE status=progress bs=1M oflag=direct iflag=fullblock
4277141504 bytes (4.3 GB, 4.0 GiB) copied, 194 s, 22.0 MB/s
4093+0 records in
4093+0 records out
4291821568 bytes (4.3 GB, 4.0 GiB) copied, 200.427 s, 21.4 MB/s
</syntaxhighlight>
 
Remove the usb cable and power cycle the phone to boot into the postmarketOS installer.
 
 
=== With pmbootstrap (Advanced) ===
 
Use [[pmbootstrap]] to build a customized image. Consult the [[Installation guide|installation guide]] for details.
 
<syntaxhighlight lang="shell-session">
$ pmbootstrap init # vendor: purism, device: librem5
$ pmbootstrap install...  # add --fde for full disk encryption
</syntaxhighlight>
 
Place the device into [[#Flash Mode]], then flash it with:
<syntaxhighlight lang="shell-session">
$ pmbootstrap flasher flash_rootfs
</syntaxhighlight>
 
== Flash Mode ==
 
To place the Librem 5 info flashing mode, perform the following:
 
# Ensure that the phone is switched off.
# 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)
# Release volume-up
 
{{Note|Some USB-C cables may need to be plugged into the phone with a particular orientation. If the instructions above do not appear to work, try flipping the USB-C end of the cable over and replugging it into the phone.}}
 
These directions were gathered from '''[https://developer.puri.sm/Librem5/Development_Environment/Phone/Troubleshooting/Reflashing_the_Phone.html#flash-the-image Purism's documentation]''', refer to it for additional details/troubleshooting.


== Known Issues ==
== Known Issues ==

Revision as of 19:28, 17 February 2021

Template:Note-device-milestone-main

Purism Librem 5
Manufacturer Purism
Name Librem 5
Codename purism-librem5
Released 2019
Hardware
Chipset Emcraft NXP i.MX8M
CPU 4x 1.5 GHz Cortex-A53
GPU Vivante GC7000Lite
Display 1440x720
Storage 32 GB eMMC
Memory 3 GB
Architecture aarch64
Software
Original software PureOS
postmarketOS
Category community
Pre-built images yes
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Works
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Works
NFC
No data
Modem
Calls
Works
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Works
USB OTG
Partial
HDMI/DP
No data
Sensors
Accelerometer
Works
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

Installation

From pre-built image (easy method)

Official images of postmarketOS for the PinePhone are built at least every week. Currently the device is only supported on the edge branch of postmarketOS.

This method requires the uuu application is installed on the host computer. <uuu> is NXP's image deploy tool, and may be found in some distros in a package named mfgtools.

Download the right image

  • Branch (more):
    • edge: bleeding edge version (has latest features, but may break more often).
  • User interface
    • Phosh: Purism's GTK based phone interface) (more)
    • Plasma Mobile (edge only): KDE's Plasma based phone interface (more)
    • (Note that more interfaces are available, build your own image with pmbootstrap if interested)
  • Pick the latest image by its date
  • Choose the regular image, or the installer image
    • Graphical Installer:
      • Ends in -installer.img.xz
      • Recommended for a proper installation.
      • Installs postmarketOS to the built-in internal memory (eMMC)
      • Encrypting your installation is possible
      • Passwords for user and SSH are set during installation (and SSH can be disabled)
    • Regular image:
      • Ends in .img.xz
      • An installation of postmarketOS with defaults for passwords and no full disk encryption
      • The login is user with password 147147
      • sshd is currently enabled by default! (build.postmarketos.org#85)
      • Not recommended, unless looking for a quick way to try out postmarketOS

Download JumpDrive

Grab the latest purism-librem5.tar.xz image from the JumpDrive release page

Note JumpDrive 0.7 is the first version to support the Librem 5]]

Extract it, and you should see something similar:

$ tar xf purism-librem5.tar.xz
$ ls
boot-purism-librem5.sh  dtbs  initramfs-purism-librem5.gz  kernel-librem5.gz  purism-librem5.lst  purism-librem5.tar.xz  u-boot-librem5.bin

Run JumpDrive

Place the Librem 5 into #Flash Mode.

Use the helper script from the JumpDrive release to flash the Librem 5:

$ ./boot-purism-librem5.sh
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.72-0-g8e9e189

Success 1    Failure 0

3:2     10/10 [Done                                  ] FB: Done

Flash to EMMC

In order to flash the postmarketOS image to the Librem 5, locate the bock device exposed to the host computer via JumpDrive:

lsblk -o name,size,model,vendor
NAME        SIZE MODEL                     VENDOR
sda       476.9G Samsung_SSD_860_PRO_512GB ATA
├─sda1   1007.5K
├─sda2    476.8G
│ └─root  476.8G
└─sda3     99.3M
sdc        29.1G e_eMMC                    JumpDriv
├─sdc1      189M
└─sdc2     28.9G
zram0       247M

In the example above, the /dev/sdc is the EMMC device on the Librem 5.

Warning WARNING: Triple check you have selected the right block device when performing the next step!!
$ xzcat 20210217-0609-postmarketOS-edge-phosh-6-purism-librem5-installer.img.xz | sudo dd of=/dev/DRIVE status=progress bs=1M oflag=direct iflag=fullblock
4277141504 bytes (4.3 GB, 4.0 GiB) copied, 194 s, 22.0 MB/s
4093+0 records in
4093+0 records out
4291821568 bytes (4.3 GB, 4.0 GiB) copied, 200.427 s, 21.4 MB/s

Remove the usb cable and power cycle the phone to boot into the postmarketOS installer.


With pmbootstrap (Advanced)

Use pmbootstrap to build a customized image. Consult the installation guide for details.

$ pmbootstrap init # vendor: purism, device: librem5
$ pmbootstrap install...  # add --fde for full disk encryption

Place the device into #Flash Mode, then flash it with:

$ pmbootstrap flasher flash_rootfs

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
Note Some USB-C cables may need to be plugged into the phone with a particular orientation. If the instructions above do not appear to work, try flipping the USB-C end of the cable over and replugging it into the phone.

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

Known Issues

For an ever-up-to-date list of issues, see gitlab

  • Suspend, as implemented in gnome settings under phosh, is not supported by the device [1].

Related

  • pmaports!1673 upgrade to 5.9.1, information about selecting dtb on boot with u-boot (not enabled in this MR yet)