PinePhone Pro Developer Edition

From PINE64
Revision as of 20:34, 30 November 2021 by Luke (talk | contribs) (Created page with " = Introduction = The Developer Edition was the first edition of the PinePhone Pro, shipped to developers in December 2020. The aim of the the Developer Edition was to give de...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

The Developer Edition was the first edition of the PinePhone Pro, shipped to developers in December 2020. The aim of the the Developer Edition was to give development community access to the hardware prior to end-users, boost development efforts and allow for porting of existing mobile Linux operating systems to the new hardware. It featured the same mainboard revision as the Explorer Edition that followed in early 2021.

Getting started

This post is aimed strictly at developers receiving their PinePhone Pro dev units. Please note that the following instructions do not apply to Explorer Edition or other future editions of the PinePhone Pro - everything below is only pertinent to the dev phones.

Consider this a crash course rather than a comprehensive overview; you are also welcome to participate in documenting the process (and everything else related to the PinePhone Pro) on the Wiki. You can either create a Wiki account or use your [forum.pine64.org PINE64 forum] credentials to log in.

Getting the hardware ready

After unpacking the PinePhone Pro from its box, detach the back cover (looking at the back of the phone, there is a fingernail notch on the left leading edge) and remove the plastic tab between the battery and mainboard. You can also flip the headphone jack privacy switch at this point - this enables UART output via the headphone jack. Serial console works the same way as on the original PinePhone.

Factory hardware test image

The PinePhone Pro developer edition ships with a BSP AOSP factory image flashed to the eMMC. This image includes a number of factory applications meant to validate operation of the sensors, the modem, cameras, LCD & touch panel, etc. You’ll have to nuke the AOSP build to run a Linux installation on the PinePhone Pro. Booting from SD with the AOSP factory build present on eMMC is not possible due to the SoCs native boot order.

Nuking the factory AOSP installation

In the factory test image, navigate to setting (gear icon) > at the very bottom of the settings list you will find a phone icone with rk3999mid written underneath it > tap the last (bottom) setting 7 times in quick succession. Following this, you *may* need to do the following: open the Settings application and enable USB debugging in Settings > System > Developer Options > USB debugging. Then connect the PinePhone Pro to your PC with the supplied USB-C cable.

Please note: It is recommended to charge the device to at least 50% before proceeding with wiping the eMMC.

Connect the phone to your computer and check adb devices in the terminal. The phone should be registered as attached. Then enter adb shell followed by su to gain root access. At this point you can erase the eMMC installation:

cat /dev/zero > /dev/block/mmcblk1

The phone will freeze and then the screen will go blank. Let it sit for no less than 10 minutes and then power it off by holding down the power button. You’ll know the phone is powered down when the notification LED turns off.


Flashing Linux

You will want to do all your testing and development on a SD card; you DO NOT want to flash an OS to eMMC at this time. Builds frequently break at this early development stage and recovering from a corrupted eMMC installation is presently time consuming and tedious. A fast 16-64GB micro SD card for $15 will work just fine.

There are a handful of OS builds available for the PinePhone Pro already. These can be found under the Software Releases Wiki section.

If you are a developer porting your own distribution to the PinePhone Pro, please make sure to make an entry for it in the Software Releases section on the Wiki. If you want / need help with entering your build onto the Wiki please ping one of the mods or admins in the chats (see Forums and Chats drop-down menu).

= Resources =

Aside from the PINE64 Wiki there are also other useful resources scattered across different Wikis, repositories and blogs. In time these will be gathered into one place - the DevZone - which will help to streamline the development process.

At the time of publishing, these are *some* of the notable resource, listed in no particular order:

Development and discussion

You will run into issues, there’s just no way around it, and doing it ‘on your own’ isn’t really a viable option since you’re one of the first people to hold a PinePhone Pro. The development process on a device such as this is a collaborative process, and I therefore encourage you to participate in the community. There are many ways to interact with other developers, including Matrix, Telegram, Discord and IRC.

There is also a lesser known chat for developers only. Lesser known doesn’t mean top secret, but I will not be posting a link to it here to keep the number of non-dev participants to a minimum. If you join one of the general chats and let others know you received a dev phone, then I’m sure someone will point you in the right direction.