Difference between revisions of "PinePhone"

From Maemo Leste Wiki
Jump to navigationJump to search
(37 intermediate revisions by 6 users not shown)
Line 25: Line 25:
== Notes ==
== Notes ==


First testing image can be found here: (TODO)
''' [https://maedevu.maemo.org/images/pinephone/ Testing images repo.] '''


What you can do with this image:
''' What you can do with the 20220206 image:'''


* Run any applications in Debian and Devuan on your phone
* Run any applications in Debian and Devuan on your phone
* Connect to wifi
* Connect to wifi
* (With not yet finished userspace) connect to 2G/3G/4G data connections
* Use the terminal
* Develop for Maemo Leste and work on applications that interface with modems
* Connect to 2G/3G/4G data connections
* Make and receive phone calls and SMS
* PinePhone keyboard is supported


Note that:
''' TODO mention/link to:'''
 
* USB peripheral support
* Camera UI
* Bluetooth UI
 
''' Note that: '''


* Virtual keyboard should work in all gtk2 applications (not yet in gtk3 and qt, but this is coming).
* Virtual keyboard should work in all gtk2 applications (not yet in gtk3 and qt, but this is coming).
* Some rendering bugs in portrait mode remain, so the default desktop orientation is landscape for now.
* Default virtual keyboard is set to off. You may want to go to setting and change that first for using the terminal. Click the top left corner->"Settings"->"Text input"->check the "Use virtual keyboard" option. You may also want to change the keyboard layout by changing the dictionary setting.
* Screen brightness adjustments in UI do not work on the Pinephone yet.
* WiFi and terminal work.
* Some rendering bugs in portrait mode remain, so the default desktop orientation is landscape for now (<code>xrandr -o right</code>). Please note that if orientation is changed (e.g. with <code>xrandr -o normal</code>) the ui will still be reading original key positions.
* Screen brightness adjustments in UI do not work on the Pinephone yet. There is also a user reported when "brightness" UI setting is set to minimum (no visual change normally), the screen will stay black after reboot with WiFi set to ON with kill switch. However screen is normal after reboot if WiFi set to OFF with kill switch even minimum "brightness" UI setting. You may still change the screen brightness with terminal commands: <code>xrandr --output DSI-1 --brightness 0.5</code>
* Performance is not bad, but will get better, with hildon-desktop optimisations and as lima improves.
* Performance is not bad, but will get better, with hildon-desktop optimisations and as lima improves.
* We are not shipping the latest Pinephone kernel yet (feel free to work on that, or anything above!)
* Many "games" packages in the Application Manager don't work well yet.
 
* VoLTE should work out-of-the-box. If not, please set the VoLTE profile via AT commands. For example, for T-Mobile in US, do:
 
$ echo 'AT+QMBNCFG="select","Commercial-TMO_VoLTE"' | atinout - /dev/EG25.AT -
 
In order to list all specific VoLTE profiles, use:
$ echo 'AT+QMBNCFG="list"' | atinout - /dev/EG25.AT -
*


== Status ==
== Status ==
Line 52: Line 64:
! Notes
! Notes
|-
|-
| Kernel version || 5.4 || Mainline + some patches: https://gitlab.com/pine64-org/linux/tree/pine64-kernel-5.4.y
| Kernel version || 5.15 || Mainline + some patches: https://github.com/maemo-leste/pine64-kernel
|-
|-
| Serial || Yes || Via headphone jack (disable headphone switch)
| Serial || Yes || Via headphone jack (disable headphone switch)
Line 60: Line 72:
| Wireless || Yes || Involves installing out of tree driver
| Wireless || Yes || Involves installing out of tree driver
|-
|-
| Ethernet || N/A ||
| Ethernet || N/A || ps: USB Ethernet adapter tested and works
|-
|-
| Bluetooth || ? ||  
| Bluetooth || YES || No UI integration yet
|-
|-
| Infrared || N/A || TX only (hardware limitation).  
| Infrared || N/A || TX only (hardware limitation).  
Line 68: Line 80:
| USB C || Yes || Peripheral/slave only, exposes network gadget by default. Host Untested
| USB C || Yes || Peripheral/slave only, exposes network gadget by default. Host Untested
|-
|-
| Keyboard || N/A || !
| Keyboard || Yes || When a PP keyboard is connected, it works out-of-the-box
|-
|-
| Screen || Yes || Modesetting driver
| Screen || Yes || Modesetting driver
|-
|-
| 3D Acceleration || Yes || lima (!)
| 3D Acceleration || Yes || mesa-lima
|-
|-
| Touchscreen || Yes || Capacitive
| Touchscreen || Yes || Capacitive
|-
|-
| Audio || Yes ||
| Audio || Yes || Pulseaudio and UCM units
|-
|-
| 2G/3G data || WIP || Works with ofono; UI underway: https://github.com/maemo-leste/connui-cellular ; see https://github.com/maemo-leste/bugtracker/issues/76
| 2G/3G/4G data || YES || Works with ofono;
|-
|-
| SMS || WIP || Works with ofono, will using telepathy-ring, no UI yet, not enabled by default
| SMS || YES || Works with ofono, will using telepathy-ring. Sphone is currently available
|-
|-
| Phone calls || WIP || Reported to work, no UI, poor quality, not enabled by default
| Phone calls || YES || Works with ofono; Calls work with sphone as UI
|-
|-
| Accelerometer || ? || Available as input device, needs MCE work
| VoLTE || YES || Quectel EG25 has VoLTE support, no userland required, but setting VoLTE profile might be needed
|-
|-
| Proximity sensor || ? ||  
| Accelerometer || Yes ||
|-
| Proximity sensor || Yes ||  
|-
|-
| RGB LED || WIP || Works, but mce can't deal with LEDs without controllers yet.
| RGB LED || WIP || Works, but mce can't deal with LEDs without controllers yet.
Line 92: Line 106:
| Vibration Motor || ? ||  
| Vibration Motor || ? ||  
|-
|-
| GPS || WIP || Should work on the modem
| GPS || WIP || Works with WIP Leste GPS stack
|}
|}


== Installation ==
== Installation ==


(Work in Progress)
Currently:
* .img.xz does not match .img.sha
* working out how to install .tar.gz
Unlike most phones, it's pretty simple.
Download the image and the corresponding <code>.sha</code> file, then verify the image's integrity:
$ cat maemo-leste-*-arm64-pinephone-*.img.sha
$ sha256sum maemo-leste-*-arm64-pinephone-*.img.xz
or
$ cat maemo-leste-*-arm64-pinephone-*.tar.gz.sha
$ sha256sum maemo-leste-*-arm64-pinephone-*.tar.gz
Verify that the number that each command spits out is exactly the same number. If it is not, do not use the image. Try redownloading or ask for help.
=== SD Card Installation ===
==== Prepare the SD card ====
Format the SD card as ext4 using any of your preferred tools.
====if you downloaded the .img.xz====
extract the image:
$ cp maemo-leste-*-arm64-pinephone-*.img.xz /path/to/sd-card
$ cd /path/to/sd-card
$ tar --extract -f maemo-leste-*-arm64-pinephone-*.img.xz
dd the image to an SD-Card. If using a Windows machine, you can use [https://etcher.io/ Etcher] NOTE: Etcher does not warn you before starting the flashing operation, so please be extra careful that you choose the correct device to flash to.
In a terminal window, use the command below, making sure you replace the input file <code>if=</code> argument with the path to your file, and the <code>/dev/sdX</code> in the output file <code>of=</code> argument with the correct device name. This is very important, as you will lose all the data on the hard drive if you provide the wrong device name. Make sure the device name is the name as described above, with no partition numbers. For example: sdd, not sdds1 or sddp1; mmcblk0, not mmcblk0p1. In most cases with SD cards, your computer might read the SD card as mmcblk0 or something similar. Don't copy and paste this command, type it out and use TAB completion.
$ dd bs=4M if=maemo-leste-*-arm64-pinephone-*.img of=/dev/sdX conv=fsync
Please note that block size set to 4M will work most of the time. If not, try 1M, although this will take considerably longer. Also note that if you are not logged in as root you will need to prefix this with sudo.
====if you downloaded the .tar.gz====
This might work?
$ cp maemo-leste-*-arm64-pinephone-*.tar.gz /path/to/sd-card
$ cd /path/to/image/
$ tar --extract -f maemo-leste-*-arm64-pinephone-*.tar.gz
Then insert SD card, replace the back cover, and turn it on.
These steps should work in theory, but at the moment the image is unbootable.
=== eMMC Installation ===
==== Extract the image ====
Download the .img.xz version of the image and extract it:
$ unxz -k maemo-leste-*-arm64-pinephone-*.img.xz
==== Modify the image to use eMMC paths ====
The image, by default, points to <code>/dev/mmcblk0</code> for SD cards, which must be modified to point to <code>/dev/mmcblk2</code> for the eMMC.  To start, determine the starting points of the image partitions:
$ fdisk -u -l maemo-leste-*-arm64-pinephone-*.img.xz
In the output of this command, look for the '''Start''' column and multiply these values individually with the value given by the '''Units''' section -- this gives the offsets of the partitions from the beginning of the file.
Mount the first partition and enter it:
$ sudo mount -o loop,offset=<Partition 1 offset> maemo-leste-*-arm64-pinephone-*.img /mnt
$ cd /mnt
Use the editor of your choice to edit <code>boot.txt</code>, replacing <code>/dev/mmcblk0</code> with <code>/dev/mmcblk2</code>.
Regenerate <code>boot.scr</code>:
$ sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d boot.txt boot.scr
Leave the first partition and unmount it:
$ cd ~
$ sudo umount /mnt
Mount the second partition and enter it:
$ sudo mount -o loop,offset=<Partition 2 offset> maemo-leste-*-arm64-pinephone-*.img /mnt
$ cd /mnt
Use the editor of your choice to edit <code>etc/fstab</code>, replacing <code>/dev/mmcblk0</code> with <code>/dev/mmcblk2</code>.
Leave the second partition and unmount it:
$ cd ~
$ sudo umount /mnt
The image is now ready to be installed to the eMMC.
==== Install image to eMMC ====


Refer to the [https://wiki.pine64.org/index.php/PinePhone_Software_Release#Installation_to_eMMC_.28Optional.29 Pine64 Wiki].


[[Category:Device]]
[[Category:Device]]

Revision as of 19:50, 26 June 2022

This page or section is a stub. Ask how you can help improve leste.maemo.org by visiting #maemo-leste, look at the bugtracker (https://github.com/maemo-leste/bugtracker) or if you are able to contribute to the current page, then you are welcome to do so.

PinePhone
Manufacturer Pine64
Specifications
SoC Allwinner A64
Hardware Features
Software Features

The first Pinephone (braveheart) phone

Notes

Testing images repo.

What you can do with the 20220206 image:

  • Run any applications in Debian and Devuan on your phone
  • Connect to wifi
  • Use the terminal
  • Connect to 2G/3G/4G data connections
  • Make and receive phone calls and SMS
  • PinePhone keyboard is supported

TODO mention/link to:

  • USB peripheral support
  • Camera UI
  • Bluetooth UI

Note that:

  • Virtual keyboard should work in all gtk2 applications (not yet in gtk3 and qt, but this is coming).
  • Default virtual keyboard is set to off. You may want to go to setting and change that first for using the terminal. Click the top left corner->"Settings"->"Text input"->check the "Use virtual keyboard" option. You may also want to change the keyboard layout by changing the dictionary setting.
  • WiFi and terminal work.
  • Some rendering bugs in portrait mode remain, so the default desktop orientation is landscape for now (xrandr -o right). Please note that if orientation is changed (e.g. with xrandr -o normal) the ui will still be reading original key positions.
  • Screen brightness adjustments in UI do not work on the Pinephone yet. There is also a user reported when "brightness" UI setting is set to minimum (no visual change normally), the screen will stay black after reboot with WiFi set to ON with kill switch. However screen is normal after reboot if WiFi set to OFF with kill switch even minimum "brightness" UI setting. You may still change the screen brightness with terminal commands: xrandr --output DSI-1 --brightness 0.5
  • Performance is not bad, but will get better, with hildon-desktop optimisations and as lima improves.
  • Many "games" packages in the Application Manager don't work well yet.
  • VoLTE should work out-of-the-box. If not, please set the VoLTE profile via AT commands. For example, for T-Mobile in US, do:
$ echo 'AT+QMBNCFG="select","Commercial-TMO_VoLTE"' | atinout - /dev/EG25.AT -

In order to list all specific VoLTE profiles, use:

$ echo 'AT+QMBNCFG="list"' | atinout - /dev/EG25.AT -

Status

Feature Leste supported Notes
Kernel version 5.15 Mainline + some patches: https://github.com/maemo-leste/pine64-kernel
Serial Yes Via headphone jack (disable headphone switch)
Charging Yes
Wireless Yes Involves installing out of tree driver
Ethernet N/A ps: USB Ethernet adapter tested and works
Bluetooth YES No UI integration yet
Infrared N/A TX only (hardware limitation).
USB C Yes Peripheral/slave only, exposes network gadget by default. Host Untested
Keyboard Yes When a PP keyboard is connected, it works out-of-the-box
Screen Yes Modesetting driver
3D Acceleration Yes mesa-lima
Touchscreen Yes Capacitive
Audio Yes Pulseaudio and UCM units
2G/3G/4G data YES Works with ofono;
SMS YES Works with ofono, will using telepathy-ring. Sphone is currently available
Phone calls YES Works with ofono; Calls work with sphone as UI
VoLTE YES Quectel EG25 has VoLTE support, no userland required, but setting VoLTE profile might be needed
Accelerometer Yes
Proximity sensor Yes
RGB LED WIP Works, but mce can't deal with LEDs without controllers yet.
Vibration Motor ?
GPS WIP Works with WIP Leste GPS stack

Installation

(Work in Progress)

Currently:

  • .img.xz does not match .img.sha
  • working out how to install .tar.gz

Unlike most phones, it's pretty simple.

Download the image and the corresponding .sha file, then verify the image's integrity:

$ cat maemo-leste-*-arm64-pinephone-*.img.sha
$ sha256sum maemo-leste-*-arm64-pinephone-*.img.xz

or

$ cat maemo-leste-*-arm64-pinephone-*.tar.gz.sha
$ sha256sum maemo-leste-*-arm64-pinephone-*.tar.gz

Verify that the number that each command spits out is exactly the same number. If it is not, do not use the image. Try redownloading or ask for help.

SD Card Installation

Prepare the SD card

Format the SD card as ext4 using any of your preferred tools.

if you downloaded the .img.xz

extract the image:

$ cp maemo-leste-*-arm64-pinephone-*.img.xz /path/to/sd-card
$ cd /path/to/sd-card
$ tar --extract -f maemo-leste-*-arm64-pinephone-*.img.xz

dd the image to an SD-Card. If using a Windows machine, you can use Etcher NOTE: Etcher does not warn you before starting the flashing operation, so please be extra careful that you choose the correct device to flash to.

In a terminal window, use the command below, making sure you replace the input file if= argument with the path to your file, and the /dev/sdX in the output file of= argument with the correct device name. This is very important, as you will lose all the data on the hard drive if you provide the wrong device name. Make sure the device name is the name as described above, with no partition numbers. For example: sdd, not sdds1 or sddp1; mmcblk0, not mmcblk0p1. In most cases with SD cards, your computer might read the SD card as mmcblk0 or something similar. Don't copy and paste this command, type it out and use TAB completion.

$ dd bs=4M if=maemo-leste-*-arm64-pinephone-*.img of=/dev/sdX conv=fsync

Please note that block size set to 4M will work most of the time. If not, try 1M, although this will take considerably longer. Also note that if you are not logged in as root you will need to prefix this with sudo.

if you downloaded the .tar.gz

This might work?

$ cp maemo-leste-*-arm64-pinephone-*.tar.gz /path/to/sd-card 
$ cd /path/to/image/
$ tar --extract -f maemo-leste-*-arm64-pinephone-*.tar.gz


Then insert SD card, replace the back cover, and turn it on.

These steps should work in theory, but at the moment the image is unbootable.

eMMC Installation

Extract the image

Download the .img.xz version of the image and extract it:

$ unxz -k maemo-leste-*-arm64-pinephone-*.img.xz

Modify the image to use eMMC paths

The image, by default, points to /dev/mmcblk0 for SD cards, which must be modified to point to /dev/mmcblk2 for the eMMC. To start, determine the starting points of the image partitions:

$ fdisk -u -l maemo-leste-*-arm64-pinephone-*.img.xz

In the output of this command, look for the Start column and multiply these values individually with the value given by the Units section -- this gives the offsets of the partitions from the beginning of the file.

Mount the first partition and enter it:

$ sudo mount -o loop,offset=<Partition 1 offset> maemo-leste-*-arm64-pinephone-*.img /mnt
$ cd /mnt

Use the editor of your choice to edit boot.txt, replacing /dev/mmcblk0 with /dev/mmcblk2.

Regenerate boot.scr:

$ sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d boot.txt boot.scr

Leave the first partition and unmount it:

$ cd ~
$ sudo umount /mnt

Mount the second partition and enter it:

$ sudo mount -o loop,offset=<Partition 2 offset> maemo-leste-*-arm64-pinephone-*.img /mnt
$ cd /mnt

Use the editor of your choice to edit etc/fstab, replacing /dev/mmcblk0 with /dev/mmcblk2.

Leave the second partition and unmount it:

$ cd ~
$ sudo umount /mnt

The image is now ready to be installed to the eMMC.

Install image to eMMC

Refer to the Pine64 Wiki.