Difference between revisions of "PINE64 Pinebook Pro (pine64-pinebookpro)"

From postmarketOS
Jump to navigation Jump to search
(Camera works, is /dev/video2)
 
(11 intermediate revisions by 5 users not shown)
Line 8: Line 8:
 
| originalsoftware = Linux 4.4.x
 
| originalsoftware = Linux 4.4.x
 
| pmoskernel = 5.5.0-rc3
 
| pmoskernel = 5.5.0-rc3
| chipset = Rockchip rk3399
+
| chipset = Rockchip RK3399
 
| cpu = 4x 1.5 GHz Cortex-A53 & 2x 2Ghz Cortex-A72
 
| cpu = 4x 1.5 GHz Cortex-A53 & 2x 2Ghz Cortex-A72
| gpu = Mali T860 MP4
+
| gpu = Mali-T860 MP4
 +
| storage = 64GB eMMC (Upgradable)
 
| memory = 4 GB
 
| memory = 4 GB
 
| architecture = aarch64
 
| architecture = aarch64
| n-android =
+
| n-android = ✔
 
| whet_dhry = 2742.3
 
| whet_dhry = 2742.3
 
| status_usbnet = N
 
| status_usbnet = N
Line 57: Line 58:
 
The serial connection is 3.3V
 
The serial connection is 3.3V
  
You can also buy the debug cable from [https://store.pine64.org PINE64 Store]
+
You can also buy the debug cable from [https://store.pine64.org PINE64 Store].
  
 +
== Storage ==
  
 +
The SD card is /dev/mmcblk2 and the eMMC is /dev/mmcblk0
  
The touchscreen on the PineTab is controlled by <code>goodix</code> module on i2c-0, at address 0x5d.
+
== Booting ==
 +
 
 +
The Pinebook Pro boots using u-boot. The bootrom in the rk3399 soc will look for u-boot on the SPI flash chip, then the eMMC and then the SD card slot. It will boot the first functioning u-boot image it can find.
 +
 
 +
There is also a work-in-progress graphical version of u-boot that can show the boot messages on the built-in display and present a menu for choosing which medium to boot. This u-boot build should also be able to boot
 +
generic ARM64 UEFI linux installations.
 +
 
 +
The 3 ways to boot postmarketOS on the Pinebook Pro
 +
 
 +
=== Booting from SD ===
 +
 
 +
To boot from the SD the SPI bootloader and eMMC bootloader need to be disabled. Then the SoC will fallback to a bootloader on the SD card so postmarketOS can be fully booted from SD.
 +
 
 +
The Pinebook Pro comes with an empty SPI chip from the factory so that doesn't need anything by default. To temporarily disable the eMMC booting you can open up the back cover and disable the eMMC switch on the main board or remove the eMMC chip from the socket.
 +
 
 +
=== Booting from eMMC ===
 +
 
 +
To boot it from eMMC you have to overwrite the OS that's on the eMMC already. This is possible to do from an OS booted from SD with the steps above, or by removing the eMMC from the socket and using an pine64 eMMC USB reader to write postmarketOS to it the same way as an SD card.
 +
 
 +
=== Booting from SPI ===
 +
 
 +
This requires flashing u-boot to the SPI. After u-boot has been flashed the other boot options won't be tried anymore so try at your own risk.
 +
 
 +
== Flashing u-boot to the SPI ==
 +
 
 +
This will write a copy of the u-boot from the OS image to the SPI flash chip in the laptop. Once this has been done it will always boot from the SPI u-boot instead of the u-boot on the eMMC or SD card. This u-boot has the option to select the boot medium you want and also supports booting from USB storage.
 +
 
 +
{{warning|If this messes up you need a soldering iron to fix booting}}
 +
{{warning|Booting from this u-boot might be a problem for older kernels}}
 +
{{warning|Another warning just in case}}
 +
<source lang="shell-session">
 +
$ apk add flashrom
 +
$ sudo flashrom --programmer linux_mtd --write /usr/share/u-boot/pine64-rockpro64/u-boot.spiflash.bin
 +
</source>
 +
 
 +
== Video acceleration ==
 +
 
 +
The rockchip rk3399 soc in the Pinebook Pro has a hardware video encoder and decoder called hantro, the open implementation supports mpeg2, h264 and h265 but not all profiles are supported on these codecs.
 +
 
 +
The hardware decoder can be used in any media player that supports libva like vlc or mpv, the extra module that's needed is libva-v4l2-request https://github.com/bootlin/libva-v4l2-request from bootlin.
 +
After building and installing v4l2_request_drv_video.so the decoder can be enabled by adding these environment variables:
 +
 
 +
<source lang="shell-session">
 +
$ export LIBVA_DRIVER_NAME=v4l2_request
 +
$ export LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video1
 +
$ mpv --hwdec video-file.mp4
 +
</source>
  
 
== See also ==
 
== See also ==
 
* {{MR|882|pmaports}} Initial merge request
 
* {{MR|882|pmaports}} Initial merge request
 +
* [https://wiki.pine64.org/index.php/Pinebook_Pro PINE64 Wiki page about PineBook Pro]
 +
* [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/PKGBUILD Manjaro Kernel PKGBUILD]

Latest revision as of 12:54, 27 October 2020

PINE64 Pinebook Pro
200px
The Pinebook Pro running Sway
Manufacturer PINE64
Name Pinebook Pro
Codename pine64-pinebookpro
Released 2019
Category testing
Original software Linux 4.4.x
postmarketOS kernel 5.5.0-rc3
Hardware
Chipset Rockchip RK3399
CPU 4x 1.5 GHz Cortex-A53 & 2x 2Ghz Cortex-A72
GPU Mali-T860 MP4
Storage 64GB eMMC (Upgradable)
Memory 4 GB
Architecture aarch64
Non-Android based device
Unixbench Whet/Dhry score 2742.3
Features
USB Networking
Broken
Flashing
Unavailable
Touchscreen
Unavailable
Display
Works
WiFi
Works
Xwayland
Works
FDE
Broken
Mainline
Works
Battery
Works
3D Acceleration
Works
Accelerometer
Works
Audio
Works
Bluetooth
Works
Camera
Works
GPS
Unavailable
Mobile data
Unavailable
SMS
Unavailable
Calls
Unavailable
USB OTG
Works



Contributors

Users owning this device

  • Alexeymin (Notes: Running stock Manjaro ARM for now..)
  • Tuxfanou (Notes: Current main computer)


Serial console

The Pinebook Pro has a serial port on the headphone connector, it's enabled by removing the bottom cover of the laptop and setting the UART switch towards the touchpad.

The uart is 1500000n8

The pinout for the serial connector on the laptop side is:

  • Tip: RX
  • Ring: TX
  • Sleeve: GND

The serial connection is 3.3V

You can also buy the debug cable from PINE64 Store.

Storage

The SD card is /dev/mmcblk2 and the eMMC is /dev/mmcblk0

Booting

The Pinebook Pro boots using u-boot. The bootrom in the rk3399 soc will look for u-boot on the SPI flash chip, then the eMMC and then the SD card slot. It will boot the first functioning u-boot image it can find.

There is also a work-in-progress graphical version of u-boot that can show the boot messages on the built-in display and present a menu for choosing which medium to boot. This u-boot build should also be able to boot generic ARM64 UEFI linux installations.

The 3 ways to boot postmarketOS on the Pinebook Pro

Booting from SD

To boot from the SD the SPI bootloader and eMMC bootloader need to be disabled. Then the SoC will fallback to a bootloader on the SD card so postmarketOS can be fully booted from SD.

The Pinebook Pro comes with an empty SPI chip from the factory so that doesn't need anything by default. To temporarily disable the eMMC booting you can open up the back cover and disable the eMMC switch on the main board or remove the eMMC chip from the socket.

Booting from eMMC

To boot it from eMMC you have to overwrite the OS that's on the eMMC already. This is possible to do from an OS booted from SD with the steps above, or by removing the eMMC from the socket and using an pine64 eMMC USB reader to write postmarketOS to it the same way as an SD card.

Booting from SPI

This requires flashing u-boot to the SPI. After u-boot has been flashed the other boot options won't be tried anymore so try at your own risk.

Flashing u-boot to the SPI

This will write a copy of the u-boot from the OS image to the SPI flash chip in the laptop. Once this has been done it will always boot from the SPI u-boot instead of the u-boot on the eMMC or SD card. This u-boot has the option to select the boot medium you want and also supports booting from USB storage.

If this messes up you need a soldering iron to fix booting
Booting from this u-boot might be a problem for older kernels
Another warning just in case
$ apk add flashrom
$ sudo flashrom --programmer linux_mtd --write /usr/share/u-boot/pine64-rockpro64/u-boot.spiflash.bin

Video acceleration

The rockchip rk3399 soc in the Pinebook Pro has a hardware video encoder and decoder called hantro, the open implementation supports mpeg2, h264 and h265 but not all profiles are supported on these codecs.

The hardware decoder can be used in any media player that supports libva like vlc or mpv, the extra module that's needed is libva-v4l2-request https://github.com/bootlin/libva-v4l2-request from bootlin. After building and installing v4l2_request_drv_video.so the decoder can be enabled by adding these environment variables:

$ export LIBVA_DRIVER_NAME=v4l2_request
$ export LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video1
$ mpv --hwdec video-file.mp4

See also