<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fxc</id>
	<title>PINE64 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fxc"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/Fxc"/>
	<updated>2026-05-09T10:31:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Main_Page&amp;diff=21676</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Main_Page&amp;diff=21676"/>
		<updated>2024-11-20T12:50:51Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Changed protection settings for &amp;quot;Main Page&amp;quot;: High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PINE64 is a community-driven company focused on creating high-quality, low-cost ARM devices and, more recently, RISC-V devices for individuals and businesses around the globe. PINE64 made its debut with the [[PINE A64|PINE A64]] single-board computer, which successfully launched on Kickstarter in 2015. PINE64 has since released a multitude of other devices, including both development boards and end-user devices.&lt;br /&gt;
&lt;br /&gt;
PINE64 has a large, diverse and active community, and offers a variety of resources for hobbyists and businesses to successfully leverage various PINE64 products. To become connected and involved with the community, please see [[Main Page#Community and Support|Community and Support]] for a list of available channels and chat platforms. To learn more about PINE64, please visit the [https://www.pine64.org/ PINE64 website] and the [https://www.pine64.com/ PINE64 store]'''.&lt;br /&gt;
&lt;br /&gt;
For information about PINE64 branding, including the usage of the PINE64 logo in non-commercial and other applications, please read the [[PINE64 brand and logo|article about our brand and logo]].&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
[[File:Marchupdate-1024x594.jpg|thumb|upright=1.2|[[Pinebook Pro]] (left) and [[PinePhone]] (right)]]&lt;br /&gt;
&lt;br /&gt;
You can learn more about the following devices manufactured by PINE64:&lt;br /&gt;
&lt;br /&gt;
* Phones: '''[[PinePhone]]''' and '''[[PinePhone Pro]]'''&lt;br /&gt;
* Phone accessories: '''[[PinePhone (Pro) Add-ons]]''' and '''[[PinePhone (Pro) Keyboard]]'''&lt;br /&gt;
* Tablets: '''[[PineTab]]''', '''[[PineTab2]]''', '''[[PineTab-V]]''' and '''[[PineNote]]'''&lt;br /&gt;
* Wearable: '''[[PineBuds Pro]]''', '''[[PineTime]]'''&lt;br /&gt;
* Laptops: '''[[Pinebook]]''' and '''[[Pinebook Pro]]'''&lt;br /&gt;
* Laptop accessories: '''[[Pinebook Pro Dock|Pinebook Pro Docking station]]'''&lt;br /&gt;
* Single-board computers: '''[[Oz64]]''','''[[Ox64]]''', '''[[STAR64]]''', '''[[Quartz64]]''', '''[[QuartzPro64_Development|QuartzPro64]]''', '''[[ROCKPro64]]''', '''[[ROCK64]]''', '''[[PINE A64]]''', '''[[PINE A64-LTS]]''', '''[[PINE H64 Model A]]''' and '''[[PINE H64|PINE H64 Model B]]'''&lt;br /&gt;
* Set-top box: '''[[RockBox]]'''&lt;br /&gt;
* Clusters and modules: '''[[Clusterboard]]''', '''[[SOPINE]]''', '''[[SOPINE Baseboard]]''', '''[[SOEDGE]]''', '''[[SOEDGE Baseboard]]''', and '''[[SOQuartz]]'''&lt;br /&gt;
* IP camera: '''[[PineCube]]'''&lt;br /&gt;
* Power adapter: '''[[PinePower]]'''&lt;br /&gt;
* Soldering iron: '''[[Pinecil]]'''&lt;br /&gt;
* Makerspace: '''[[PineCone]]''' and '''[[Pinedio]]'''&lt;br /&gt;
&lt;br /&gt;
== Community and Support ==&lt;br /&gt;
&lt;br /&gt;
Community collaboration and support is focused around the chat platforms and forums described below. See [https://www.pine64.org/gettings-started/ Getting Started | PINE64] for tips about how to get started with the PINE64 community.&lt;br /&gt;
&lt;br /&gt;
=== Chat Platforms ===&lt;br /&gt;
&lt;br /&gt;
PINE64 has a large and very active community. Community discussion takes place on a variety of chat platforms, which are all bridged together so the messages sent via one platform are sent to all other platforms automatically. The other networks and their users are represented by P64ProtocolBot.&lt;br /&gt;
&lt;br /&gt;
{{hint|PINE64 community is not some always-responding, restless commercial customer service, or some sort of almighty existence that can resolve all your problems. When participating in community discussions, please be patient and do not expect questions to be answered immediately, certainly, or currently.  More precisely:&lt;br /&gt;
* The activity of community members varies depending on the time of day and the number of active users.&lt;br /&gt;
* Whether your questions will be answered and whether the answers are right and definitive, depends on the information you provide, the difficulty of your questions, the current state of the involved PINE64 products and their software support, and the community members' ability.&lt;br /&gt;
* Read [http://www.catb.org/~esr/faqs/smart-questions.html How To Ask Questions The Smart Way] to learn more.&lt;br /&gt;
* Please read [[PINE64 Community Rules and Code of Conduct]].&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* PINE64 uses a bridge bot (''[https://github.com/42wim/matterbridge matterbridge]'' with some modifications) that allows Discord, IRC, Matrix, and Telegram users to see each other and participate together in the community chat.&lt;br /&gt;
* The bot name is &amp;quot;Pine64 Protocol Droid&amp;quot; or &amp;quot;P64ProtocolBot&amp;quot;, depending on the chat platform, and if you see this, look in the message to see the actual author of the message.&lt;br /&gt;
* When the bot relays messages, it will show the chat platform the user is using by prefixing their nickname with &amp;quot;[D]&amp;quot; for Discord, &amp;quot;[I]&amp;quot; for IRC, &amp;quot;[M]&amp;quot; for Matrix, and &amp;quot;[T]&amp;quot; for Telegram.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The community chat platforms are the following:&lt;br /&gt;
&lt;br /&gt;
* '''Discord''': Use this '''[https://discord.gg/pine64 invite link]'''. All PINE64 discord channels are immediately viewable, do not need to join separate channels like the Telegram/Matrix table below.&lt;br /&gt;
* '''IRC''': The server is '''irc.pine64.org''', and the ports are '''6667''' (plain) and '''6697''' (TLS). Use &amp;lt;code&amp;gt;/LIST&amp;lt;/code&amp;gt; command or the table below to see the full list of channels. This server experienced abuse by spam bots in early October 2023, which resulted in requiring registration and authentication with &amp;lt;code&amp;gt;NickServ&amp;lt;/code&amp;gt; before users could join channels between October 3, 2023 and October 11, 2023. Using &amp;lt;code&amp;gt;NickServ&amp;lt;/code&amp;gt; to join channels has become required again on October 23, 2023, due to the server experiencing repeated abuse by spam bots.&lt;br /&gt;
* '''Matrix and Telegram''': See the table below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Channel !! Matrix !! Telegram !! IRC&lt;br /&gt;
|-&lt;br /&gt;
| PINE64 News&lt;br /&gt;
| [https://matrix.to/#/#pine64-announcements:matrix.org #pine64-announcements:matrix.org]&lt;br /&gt;
| [https://t.me/PINE64_News @PINE64_News]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| General PINE64 chat&lt;br /&gt;
| [https://matrix.to/#/#pine64:matrix.org #pine64:matrix.org]&lt;br /&gt;
| [https://t.me/mtrx_pine64 @mtrx_pine64]&lt;br /&gt;
| #pine64&lt;br /&gt;
|-&lt;br /&gt;
| PINE A64(+), A64-LTS &amp;amp; SOPine&lt;br /&gt;
| [https://matrix.to/#/#pine64sopine:matrix.org #pine64sopine:matrix.org]&lt;br /&gt;
| [https://t.me/pine64sopine @pine64sopine]&lt;br /&gt;
| #lts-sopine&lt;br /&gt;
|-&lt;br /&gt;
| ROCK64 / ROCKPro64&lt;br /&gt;
| [https://matrix.to/#/#rock64:matrix.org #rock64:matrix.org]&lt;br /&gt;
| [https://t.me/mtrx_rock64 @mtrx_rock64]&lt;br /&gt;
| #rock64&lt;br /&gt;
|-&lt;br /&gt;
| Quartz64&lt;br /&gt;
| [https://matrix.to/#/#quartz64:matrix.org #quartz64:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Vq50DXkH31e0_i-f Quartz64]&lt;br /&gt;
| #quartz64&lt;br /&gt;
|-&lt;br /&gt;
| Quartz64 Development&lt;br /&gt;
| [https://matrix.to/#/#quartz64-dev:matrix.org #quartz64-dev:matrix.org]&lt;br /&gt;
| [https://t.me/q64dev @q64dev]&lt;br /&gt;
| #quartz-dev&lt;br /&gt;
|-&lt;br /&gt;
| Star64&lt;br /&gt;
| [https://matrix.to/#/#star64:matrix.org #star64:matrix.org]&lt;br /&gt;
| [https://t.me/star64_sbc @star64-sbc]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinebook and Pinebook Pro&lt;br /&gt;
| [https://matrix.to/#/#pinebook:matrix.org #pinebook:matrix.org]&lt;br /&gt;
| [https://t.me/mtx_pinebook @mtx_pinebook]&lt;br /&gt;
| #pinebook&lt;br /&gt;
|-&lt;br /&gt;
| PinePhone&lt;br /&gt;
| [https://matrix.to/#/#pinephone:matrix.org #pinephone:matrix.org]&lt;br /&gt;
| [https://t.me/pinephone @pinephone]&lt;br /&gt;
| #pinephone&lt;br /&gt;
|-&lt;br /&gt;
| PineNote&lt;br /&gt;
| [https://matrix.to/#/#pinenote:matrix.org #pinenote:matrix.org]&lt;br /&gt;
| [https://t.me/pinenote @PineNote]&lt;br /&gt;
| #pinenote&lt;br /&gt;
|-&lt;br /&gt;
| PineTab&lt;br /&gt;
| [https://matrix.to/#/#pinetab64:matrix.org #pinetab64:matrix.org]&lt;br /&gt;
| [https://t.me/PineTab @PineTab]&lt;br /&gt;
| #pinetab&lt;br /&gt;
|-&lt;br /&gt;
| PineTime&lt;br /&gt;
| [https://matrix.to/#/#pinetime:matrix.org #pinetime:matrix.org]&lt;br /&gt;
| [https://t.me/pinetime @pinetime]&lt;br /&gt;
| #pinetime&lt;br /&gt;
|-&lt;br /&gt;
| PineTime Development&lt;br /&gt;
| [https://matrix.to/#/#pinetime-dev:matrix.org #pinetime-dev:matrix.org]&lt;br /&gt;
| [https://t.me/pinetime_dev @pinetime_dev]&lt;br /&gt;
| #pinetime-dev&lt;br /&gt;
|-&lt;br /&gt;
| PineBuds Pro&lt;br /&gt;
| [https://matrix.to/#/#pinebuds:matrix.org #pinebuds:matrix.org]&lt;br /&gt;
| [https://t.me/+nJVhM0mZ9KhlYmZl @pinebuds]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinecil&lt;br /&gt;
| [https://matrix.to/#/#pinecil:matrix.org #pinecil:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Kmi2S1iej-_4DgrVf3jjnQ Pinecil]&lt;br /&gt;
| #pinecil&lt;br /&gt;
|-&lt;br /&gt;
| Pinecil Development&lt;br /&gt;
| [https://matrix.to/#/#pinecil-dev:matrix.org #pinecil-dev:matrix.org]&lt;br /&gt;
| [https://t.me/+8_pdKqXrVuQ4OTk1 Pinecil-dev]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinetalk Podcast || Unavailable || Unavailable || Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| PineCube&lt;br /&gt;
| [https://matrix.to/#/#cube64:matrix.org #cube64:matrix.org]&lt;br /&gt;
| [https://t.me/pinecube @pinecube]&lt;br /&gt;
| #cube&lt;br /&gt;
|-&lt;br /&gt;
| Nutcracker, Ox64, Oz64&lt;br /&gt;
| [https://matrix.to/#/#pine64-nutcracker:matrix.org #pine64-nutcracker:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Kmi2S0nOsT240emHk-aO6g Nutcracker]&lt;br /&gt;
| #nutcracker&lt;br /&gt;
|-&lt;br /&gt;
| LoRa&lt;br /&gt;
| [https://matrix.to/#/#pinelora:matrix.org #pinelora:matrix.org]&lt;br /&gt;
| [https://t.me/pine64lora @pine64lora]&lt;br /&gt;
| #lora&lt;br /&gt;
|-&lt;br /&gt;
| Off-topic&lt;br /&gt;
| [https://matrix.to/#/#offtopic64:matrix.org #offtopic64:matrix.org]&lt;br /&gt;
| [https://t.me/pine64offtopic @pine64offtopic]&lt;br /&gt;
| #offtopic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an unofficial Matrix Space at [https://matrix.to/#/#pine64-space:matrix.org #pine64-space:matrix.org] for supported clients that organizes all of the above matrix channels into one place.&lt;br /&gt;
&lt;br /&gt;
=== Forums ===&lt;br /&gt;
&lt;br /&gt;
PINE64 runs an official forum powered by the open-source forum server software ''MyBB''. The forum can be used to report issues, help out other users, offer findings and new information and more. Users can also engage directly with the community and the developers of partner projects, as well as with the PINE64 members.&lt;br /&gt;
&lt;br /&gt;
The official PINE64 forum can be accessed here:&lt;br /&gt;
* [https://forum.pine64.org/ Official PINE64 Forum]&lt;br /&gt;
&lt;br /&gt;
Also, these are the official Subreddits:&lt;br /&gt;
&lt;br /&gt;
* [https://www.reddit.com/r/PINE64official/ Official PINE64 Reddit]&lt;br /&gt;
* [https://www.reddit.com/r/PinePhoneOfficial/ Official PinePhone Reddit]&lt;br /&gt;
&lt;br /&gt;
== Helpful Information for Beginners ==&lt;br /&gt;
&lt;br /&gt;
* '''[[Getting started]]''': Basic information on setting up and handling PINE64 devices, such as how to write (flash) OS images to microSD cards and eMMC modules&lt;br /&gt;
* '''[[How to Contribute]]''': Information about how to contribute to different partner projects&lt;br /&gt;
* '''[[Where to Report Bugs]]''': Information about how to report bugs&lt;br /&gt;
* '''[[Project]]''': A variety of well documented PINE64 projects to serve as inspiration&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Main_Page&amp;diff=21675</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Main_Page&amp;diff=21675"/>
		<updated>2024-11-20T12:48:17Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Reverted edits by Archibald (talk) to last revision by Tllim&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PINE64 is a community-driven company focused on creating high-quality, low-cost ARM devices and, more recently, RISC-V devices for individuals and businesses around the globe. PINE64 made its debut with the [[PINE A64|PINE A64]] single-board computer, which successfully launched on Kickstarter in 2015. PINE64 has since released a multitude of other devices, including both development boards and end-user devices.&lt;br /&gt;
&lt;br /&gt;
PINE64 has a large, diverse and active community, and offers a variety of resources for hobbyists and businesses to successfully leverage various PINE64 products. To become connected and involved with the community, please see [[Main Page#Community and Support|Community and Support]] for a list of available channels and chat platforms. To learn more about PINE64, please visit the [https://www.pine64.org/ PINE64 website] and the [https://www.pine64.com/ PINE64 store]'''.&lt;br /&gt;
&lt;br /&gt;
For information about PINE64 branding, including the usage of the PINE64 logo in non-commercial and other applications, please read the [[PINE64 brand and logo|article about our brand and logo]].&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
[[File:Marchupdate-1024x594.jpg|thumb|upright=1.2|[[Pinebook Pro]] (left) and [[PinePhone]] (right)]]&lt;br /&gt;
&lt;br /&gt;
You can learn more about the following devices manufactured by PINE64:&lt;br /&gt;
&lt;br /&gt;
* Phones: '''[[PinePhone]]''' and '''[[PinePhone Pro]]'''&lt;br /&gt;
* Phone accessories: '''[[PinePhone (Pro) Add-ons]]''' and '''[[PinePhone (Pro) Keyboard]]'''&lt;br /&gt;
* Tablets: '''[[PineTab]]''', '''[[PineTab2]]''', '''[[PineTab-V]]''' and '''[[PineNote]]'''&lt;br /&gt;
* Wearable: '''[[PineBuds Pro]]''', '''[[PineTime]]'''&lt;br /&gt;
* Laptops: '''[[Pinebook]]''' and '''[[Pinebook Pro]]'''&lt;br /&gt;
* Laptop accessories: '''[[Pinebook Pro Dock|Pinebook Pro Docking station]]'''&lt;br /&gt;
* Single-board computers: '''[[Oz64]]''','''[[Ox64]]''', '''[[STAR64]]''', '''[[Quartz64]]''', '''[[QuartzPro64_Development|QuartzPro64]]''', '''[[ROCKPro64]]''', '''[[ROCK64]]''', '''[[PINE A64]]''', '''[[PINE A64-LTS]]''', '''[[PINE H64 Model A]]''' and '''[[PINE H64|PINE H64 Model B]]'''&lt;br /&gt;
* Set-top box: '''[[RockBox]]'''&lt;br /&gt;
* Clusters and modules: '''[[Clusterboard]]''', '''[[SOPINE]]''', '''[[SOPINE Baseboard]]''', '''[[SOEDGE]]''', '''[[SOEDGE Baseboard]]''', and '''[[SOQuartz]]'''&lt;br /&gt;
* IP camera: '''[[PineCube]]'''&lt;br /&gt;
* Power adapter: '''[[PinePower]]'''&lt;br /&gt;
* Soldering iron: '''[[Pinecil]]'''&lt;br /&gt;
* Makerspace: '''[[PineCone]]''' and '''[[Pinedio]]'''&lt;br /&gt;
&lt;br /&gt;
== Community and Support ==&lt;br /&gt;
&lt;br /&gt;
Community collaboration and support is focused around the chat platforms and forums described below. See [https://www.pine64.org/gettings-started/ Getting Started | PINE64] for tips about how to get started with the PINE64 community.&lt;br /&gt;
&lt;br /&gt;
=== Chat Platforms ===&lt;br /&gt;
&lt;br /&gt;
PINE64 has a large and very active community. Community discussion takes place on a variety of chat platforms, which are all bridged together so the messages sent via one platform are sent to all other platforms automatically. The other networks and their users are represented by P64ProtocolBot.&lt;br /&gt;
&lt;br /&gt;
{{hint|PINE64 community is not some always-responding, restless commercial customer service, or some sort of almighty existence that can resolve all your problems. When participating in community discussions, please be patient and do not expect questions to be answered immediately, certainly, or currently.  More precisely:&lt;br /&gt;
* The activity of community members varies depending on the time of day and the number of active users.&lt;br /&gt;
* Whether your questions will be answered and whether the answers are right and definitive, depends on the information you provide, the difficulty of your questions, the current state of the involved PINE64 products and their software support, and the community members' ability.&lt;br /&gt;
* Read [http://www.catb.org/~esr/faqs/smart-questions.html How To Ask Questions The Smart Way] to learn more.&lt;br /&gt;
* Please read [[PINE64 Community Rules and Code of Conduct]].&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* PINE64 uses a bridge bot (''[https://github.com/42wim/matterbridge matterbridge]'' with some modifications) that allows Discord, IRC, Matrix, and Telegram users to see each other and participate together in the community chat.&lt;br /&gt;
* The bot name is &amp;quot;Pine64 Protocol Droid&amp;quot; or &amp;quot;P64ProtocolBot&amp;quot;, depending on the chat platform, and if you see this, look in the message to see the actual author of the message.&lt;br /&gt;
* When the bot relays messages, it will show the chat platform the user is using by prefixing their nickname with &amp;quot;[D]&amp;quot; for Discord, &amp;quot;[I]&amp;quot; for IRC, &amp;quot;[M]&amp;quot; for Matrix, and &amp;quot;[T]&amp;quot; for Telegram.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The community chat platforms are the following:&lt;br /&gt;
&lt;br /&gt;
* '''Discord''': Use this '''[https://discord.gg/pine64 invite link]'''. All PINE64 discord channels are immediately viewable, do not need to join separate channels like the Telegram/Matrix table below.&lt;br /&gt;
* '''IRC''': The server is '''irc.pine64.org''', and the ports are '''6667''' (plain) and '''6697''' (TLS). Use &amp;lt;code&amp;gt;/LIST&amp;lt;/code&amp;gt; command or the table below to see the full list of channels. This server experienced abuse by spam bots in early October 2023, which resulted in requiring registration and authentication with &amp;lt;code&amp;gt;NickServ&amp;lt;/code&amp;gt; before users could join channels between October 3, 2023 and October 11, 2023. Using &amp;lt;code&amp;gt;NickServ&amp;lt;/code&amp;gt; to join channels has become required again on October 23, 2023, due to the server experiencing repeated abuse by spam bots.&lt;br /&gt;
* '''Matrix and Telegram''': See the table below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Channel !! Matrix !! Telegram !! IRC&lt;br /&gt;
|-&lt;br /&gt;
| PINE64 News&lt;br /&gt;
| [https://matrix.to/#/#pine64-announcements:matrix.org #pine64-announcements:matrix.org]&lt;br /&gt;
| [https://t.me/PINE64_News @PINE64_News]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| General PINE64 chat&lt;br /&gt;
| [https://matrix.to/#/#pine64:matrix.org #pine64:matrix.org]&lt;br /&gt;
| [https://t.me/mtrx_pine64 @mtrx_pine64]&lt;br /&gt;
| #pine64&lt;br /&gt;
|-&lt;br /&gt;
| PINE A64(+), A64-LTS &amp;amp; SOPine&lt;br /&gt;
| [https://matrix.to/#/#pine64sopine:matrix.org #pine64sopine:matrix.org]&lt;br /&gt;
| [https://t.me/pine64sopine @pine64sopine]&lt;br /&gt;
| #lts-sopine&lt;br /&gt;
|-&lt;br /&gt;
| ROCK64 / ROCKPro64&lt;br /&gt;
| [https://matrix.to/#/#rock64:matrix.org #rock64:matrix.org]&lt;br /&gt;
| [https://t.me/mtrx_rock64 @mtrx_rock64]&lt;br /&gt;
| #rock64&lt;br /&gt;
|-&lt;br /&gt;
| Quartz64&lt;br /&gt;
| [https://matrix.to/#/#quartz64:matrix.org #quartz64:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Vq50DXkH31e0_i-f Quartz64]&lt;br /&gt;
| #quartz64&lt;br /&gt;
|-&lt;br /&gt;
| Quartz64 Development&lt;br /&gt;
| [https://matrix.to/#/#quartz64-dev:matrix.org #quartz64-dev:matrix.org]&lt;br /&gt;
| [https://t.me/q64dev @q64dev]&lt;br /&gt;
| #quartz-dev&lt;br /&gt;
|-&lt;br /&gt;
| Star64&lt;br /&gt;
| [https://matrix.to/#/#star64:matrix.org #star64:matrix.org]&lt;br /&gt;
| [https://t.me/star64_sbc @star64-sbc]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinebook and Pinebook Pro&lt;br /&gt;
| [https://matrix.to/#/#pinebook:matrix.org #pinebook:matrix.org]&lt;br /&gt;
| [https://t.me/mtx_pinebook @mtx_pinebook]&lt;br /&gt;
| #pinebook&lt;br /&gt;
|-&lt;br /&gt;
| PinePhone&lt;br /&gt;
| [https://matrix.to/#/#pinephone:matrix.org #pinephone:matrix.org]&lt;br /&gt;
| [https://t.me/pinephone @pinephone]&lt;br /&gt;
| #pinephone&lt;br /&gt;
|-&lt;br /&gt;
| PineNote&lt;br /&gt;
| [https://matrix.to/#/#pinenote:matrix.org #pinenote:matrix.org]&lt;br /&gt;
| [https://t.me/pinenote @PineNote]&lt;br /&gt;
| #pinenote&lt;br /&gt;
|-&lt;br /&gt;
| PineTab&lt;br /&gt;
| [https://matrix.to/#/#pinetab64:matrix.org #pinetab64:matrix.org]&lt;br /&gt;
| [https://t.me/PineTab @PineTab]&lt;br /&gt;
| #pinetab&lt;br /&gt;
|-&lt;br /&gt;
| PineTime&lt;br /&gt;
| [https://matrix.to/#/#pinetime:matrix.org #pinetime:matrix.org]&lt;br /&gt;
| [https://t.me/pinetime @pinetime]&lt;br /&gt;
| #pinetime&lt;br /&gt;
|-&lt;br /&gt;
| PineTime Development&lt;br /&gt;
| [https://matrix.to/#/#pinetime-dev:matrix.org #pinetime-dev:matrix.org]&lt;br /&gt;
| [https://t.me/pinetime_dev @pinetime_dev]&lt;br /&gt;
| #pinetime-dev&lt;br /&gt;
|-&lt;br /&gt;
| PineBuds Pro&lt;br /&gt;
| [https://matrix.to/#/#pinebuds:matrix.org #pinebuds:matrix.org]&lt;br /&gt;
| [https://t.me/+nJVhM0mZ9KhlYmZl @pinebuds]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinecil&lt;br /&gt;
| [https://matrix.to/#/#pinecil:matrix.org #pinecil:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Kmi2S1iej-_4DgrVf3jjnQ Pinecil]&lt;br /&gt;
| #pinecil&lt;br /&gt;
|-&lt;br /&gt;
| Pinecil Development&lt;br /&gt;
| [https://matrix.to/#/#pinecil-dev:matrix.org #pinecil-dev:matrix.org]&lt;br /&gt;
| [https://t.me/+8_pdKqXrVuQ4OTk1 Pinecil-dev]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinetalk Podcast || Unavailable || Unavailable || Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| PineCube&lt;br /&gt;
| [https://matrix.to/#/#cube64:matrix.org #cube64:matrix.org]&lt;br /&gt;
| [https://t.me/pinecube @pinecube]&lt;br /&gt;
| #cube&lt;br /&gt;
|-&lt;br /&gt;
| Nutcracker, Ox64, Oz64&lt;br /&gt;
| [https://matrix.to/#/#pine64-nutcracker:matrix.org #pine64-nutcracker:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Kmi2S0nOsT240emHk-aO6g Nutcracker]&lt;br /&gt;
| #nutcracker&lt;br /&gt;
|-&lt;br /&gt;
| LoRa&lt;br /&gt;
| [https://matrix.to/#/#pinelora:matrix.org #pinelora:matrix.org]&lt;br /&gt;
| [https://t.me/pine64lora @pine64lora]&lt;br /&gt;
| #lora&lt;br /&gt;
|-&lt;br /&gt;
| Off-topic&lt;br /&gt;
| [https://matrix.to/#/#offtopic64:matrix.org #offtopic64:matrix.org]&lt;br /&gt;
| [https://t.me/pine64offtopic @pine64offtopic]&lt;br /&gt;
| #offtopic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an unofficial Matrix Space at [https://matrix.to/#/#pine64-space:matrix.org #pine64-space:matrix.org] for supported clients that organizes all of the above matrix channels into one place.&lt;br /&gt;
&lt;br /&gt;
=== Forums ===&lt;br /&gt;
&lt;br /&gt;
PINE64 runs an official forum powered by the open-source forum server software ''MyBB''. The forum can be used to report issues, help out other users, offer findings and new information and more. Users can also engage directly with the community and the developers of partner projects, as well as with the PINE64 members.&lt;br /&gt;
&lt;br /&gt;
The official PINE64 forum can be accessed here:&lt;br /&gt;
* [https://forum.pine64.org/ Official PINE64 Forum]&lt;br /&gt;
&lt;br /&gt;
Also, these are the official Subreddits:&lt;br /&gt;
&lt;br /&gt;
* [https://www.reddit.com/r/PINE64official/ Official PINE64 Reddit]&lt;br /&gt;
* [https://www.reddit.com/r/PinePhoneOfficial/ Official PinePhone Reddit]&lt;br /&gt;
&lt;br /&gt;
== Helpful Information for Beginners ==&lt;br /&gt;
&lt;br /&gt;
* '''[[Getting started]]''': Basic information on setting up and handling PINE64 devices, such as how to write (flash) OS images to microSD cards and eMMC modules&lt;br /&gt;
* '''[[How to Contribute]]''': Information about how to contribute to different partner projects&lt;br /&gt;
* '''[[Where to Report Bugs]]''': Information about how to report bugs&lt;br /&gt;
* '''[[Project]]''': A variety of well documented PINE64 projects to serve as inspiration&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21555</id>
		<title>PinePhone Pro</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21555"/>
		<updated>2024-09-24T18:47:26Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Undo revision 21552 by JohnA (talk), I don't agree with these contents, the style is to be optimized and potentially causes more confusion than helping. No or a broken installation is one cause.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinephone_double.png|400px|thumb|right|Rendering of the PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone Pro''' is PINE64's flagship smartphone announced on October 15, 2021. It features 4GB of RAM, an 128GB eMMC and is using an Rockchip RK3399S SoC, which is a specialized version of the RK3399 made specifically for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone Pro is PINE64’s second smartphone and a successor to the original PinePhone. It does not, however, replace the original PinePhone. It should also not be considered a second generation PinePhone; it is a higher-end device, with much better specs, aimed at those who wish to daily-drive a open system stack. Achieving this goal will, however, take time as the software and overall smartphone software ecosystem needs to mature.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&amp;lt;sup&amp;gt;([[PinePhone Pro Software State|view separately]])&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:PinePhone Pro Software State}}&lt;br /&gt;
&lt;br /&gt;
=== Editions and revisions ===&lt;br /&gt;
Similarly to the original PinePhone, various PinePhone Pro editions are planned, the first of which is the Developer Edition (aimed at developers, as the name entails) followed by the Explorer Edition, which is aimed at early adopters.&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone Pro Developer Edition]]&lt;br /&gt;
* PinePhone Pro Explorer Edition&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this Wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time setup ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again. &lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot. Devices shipped after the end of July 2022 do only accept a nano-SIM, the SIM is inserted into a carriage released by slightly pulling on the handle in the lower slot (for information regarding devices shipped prior to end of July 2022 see below).&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the SIM card in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
{{Info|Information regarding devices shipped prior to end of July 2022: The PinePhone Pros shipped prior to the end of July 2022 come with a micro-SIM slot instead of a nano-SIM slot. Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. &amp;lt;br&amp;gt; If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The software section explains how to install the available software releases for the PinePhone Pro to the internal eMMC or a microSD card, how to boot them and how to solve common booting issues.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Pro Software Releases]] page has a complete list of currently supported phone-optimized operating system images that work with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
{{Info|Images of the regular PinePhone are not compatible with the PinePhone Pro.}}&lt;br /&gt;
&lt;br /&gt;
=== Boot order ===&lt;br /&gt;
&lt;br /&gt;
The RK3399S processor in the PinePhone Pro searches for the bootloader (such as ''U-Boot'' or ''Tow-Boot'') in the following order:&lt;br /&gt;
&lt;br /&gt;
# SPI flash&lt;br /&gt;
# eMMC (the internal memory)&lt;br /&gt;
# MicroSD card&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card temporarily ====&lt;br /&gt;
&lt;br /&gt;
To temporarily boot from an inserted '''microSD card''' do the following:&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after November 2023''' the microSD card is first in boot order due to using ''rk2aw'' instead of ''Tow-Boot'', see [https://xnux.eu/rk2aw/ here].&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while powering on the device. The batches bought after July 2022 come with ''Tow-Boot'' flashed to the SPI, which offers additional functionality over ''U-Boot'' as bootloader.&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the cover for a few seconds, while powering on the device. If the button is labeled ''RESET'' instead of ''RE'' please verify if the device is a regular [[PinePhone]] (or the Developer Edition). This is required because older batches don't ship with ''Tow-Boot'' on the SPI. Flashing ''Tow-Boot'' can be caught up by following [https://tow-boot.org/devices/pine64-pinephonePro.html this] instruction. Note: If ''Tow-Boot'' is flashed later, the microSD card can be selected at boot with the volume down key as well.&lt;br /&gt;
&lt;br /&gt;
* On the '''Developer Edition (sold to selected developers only)''' the SPI and the eMMC can be bypassed by shorting the bypass test points while booting. The process is explained in the article [[PinePhone Pro Developer Edition#Nuking the factory AOSP installation|PinePhone Pro Developer Edition]]. Please join the community chat for any questions regarding the process.&lt;br /&gt;
&lt;br /&gt;
The RE button disables the SPI and the eMMC at the hardware level while the button is held and the PinePhone Pro will try to boot from the next available boot medium, which is the microSD card. Note: When holding the ''RE'' button (or when shorting the contact points in case of the ''Developer Edition'') for a longer time at boot the operating system will not initialize the SPI and eMMC and it will not be possible to write to these storage mediums until the next reboot.&lt;br /&gt;
&lt;br /&gt;
{{Template:Info|The bootloader uses its own boot order for loading the kernel and other core operating system components at boot, which for example may result in the boot loader residing on the eMMC loading and booting the kernel from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card permanently ====&lt;br /&gt;
&lt;br /&gt;
The bootloader (such as ''U-Boot'') resides in the free space in front of the first partition. Wiping the bootloader from the eMMC to make the PinePhone Pro boot from microSD card can be done using &amp;lt;code&amp;gt;sudo dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/dev/mmcblk2 seek&amp;amp;#61;64 count&amp;amp;#61;400 conv&amp;amp;#61;fsync&amp;lt;/code&amp;gt;. Formatting the drive or deleting the partition table is not sufficient to wipe the bootloader.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
If you received your device after July of 2022, the bootloader resides on the SPI.&lt;br /&gt;
&lt;br /&gt;
See [[RK3399 boot sequence]] for further details regarding the boot sequence.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The software releases can be installed (the process is being referred to as ''flashing'') to the eMMC or to an microSD card.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to microSD card ====&lt;br /&gt;
To install an image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download a compatible image from [[PinePhone Pro Software Releases]].&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Write the image to your microSD card using your favorite method, examples:&lt;br /&gt;
#* Using ''dd'': On the device you're flashing the microSD card from, find the correct device under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; and then flash the image to the microSD card using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;. Make sure the target is the whole microSD card and not its first partition (''sdc1'' or ''mmcblk0p1'' are wrong!).&lt;br /&gt;
#* Using ''bmaptool'': Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run bmaptool with the correct device: Download the ''IMAGE.xz'' and the ''IMAGE.bmap'' files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap '''IMAGE.bmap''' '''IMAGE.xz''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;. This takes around 2.5 minutes to flash a 4 GB file.&lt;br /&gt;
#* Using ''a graphical tool'': A graphical tool such as Gnome Disks under Linux or Etcher under Windows may also be used.&lt;br /&gt;
# Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore, see [[:File:Pinephone_slots.png|here]].&lt;br /&gt;
# Boot the device using the following method:&lt;br /&gt;
#* On the '''Explorer Edition ordered after November 2023''' boot the phone without any further action.&lt;br /&gt;
#* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while booting.&lt;br /&gt;
#* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the back cover while booting (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
#* On the '''Developer Edition (sold to selected developers only)''' apply the bypass by shorting the testing pads while booting according to the datasheet (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
&lt;br /&gt;
Details regarding the boot order can be found in the [[PinePhone Pro#Boot order|Boot order]] section.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to the eMMC ====&lt;br /&gt;
Flashing to the eMMC (the internal memory of the PinePhone Pro) can either be done using ''Tow-Boot'''s USB Mass Storage mode (see [[#Boot order]] if you are unsure if the device comes with Tow-Bot pre-installed) or by booting an operating system from the microSD card (see the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]) and by writing to the eMMC directly from there:&lt;br /&gt;
&lt;br /&gt;
By using Tow-Boot:&lt;br /&gt;
&lt;br /&gt;
# Power off the device&lt;br /&gt;
# Power on the device and hold the ''volume up'' key before and during the second vibration&lt;br /&gt;
# The LED will turn blue if done successfully. This will only work if Tow-Boot is installed&lt;br /&gt;
# When connecting the device to a computer via USB it will behave like an USB drive now&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;, the output might look like the following:&lt;br /&gt;
#: '''''mmcblk2'''      179:0    0 115.2G  0 disk''&lt;br /&gt;
#: ''├─mmcblk2p1  179:1    0   122M  0 part /boot''&lt;br /&gt;
#: ''└─mmcblk2p2  179:2    0 115.1G  0 part /''&lt;br /&gt;
#: {{Info|In this example, '''/dev/mmcblk2''' is the device, while ''mmcblk2p1'' and ''mmcblk2p2'' are partitions of the device. The downloaded images are images from full devices, which means that the full device (''mmcblk2'' in this example) needs to be flashed. Ignore the partitions!}}&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''DEVICE''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'' and replace ''DEVICE'' with the correct device from the ''lsblk'' command)&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
By booting a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Boot an operating system [[PinePhone Pro#Flashing to microSD card|from the microSD card]]. If there is already a bootloader on the eMMC installed see the section [[PinePhone Pro#Boot order|Boot order]] to bypass it.&lt;br /&gt;
# Download or copy the desired image to the microSD card as file&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. If it doesn't appear in the output of the command, the eMMC wasn't initialized due to applying the above explained bypass method for a too long time during the boot&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/mmcblk2 bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'').&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone Pro is not booting (either booting incompletely into a boot splash or tty or if the PinePhone Pro is showing no signs of life) this will typically have the following two reasons:&lt;br /&gt;
&lt;br /&gt;
==== The battery is fully drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is drained then the board can reset during boot causing a boot loop because of undervoltage condition. It can happen on all stages of the boot including ''U-Boot'' bootloader, display initialization and USB (re-)configuration. In that case it is not possible to charge the phone. The battery can be charged by interrupting the boot loop by booting the PinePhone Pro into ''Maskrom mode'' or by charging the battery externally. It is possible to follow these instructions without a computer by using a wall charger, however it would not be possible to determine if Maskrom mode was started successfully. To boot the PinePhone Pro into ''Maskrom mode'':&lt;br /&gt;
&lt;br /&gt;
* Remove any microSD card from the phone and keep it removed for the below procedure&lt;br /&gt;
* Remove the battery, any USB cable and any serial cable&lt;br /&gt;
* Reinsert the battery&lt;br /&gt;
* Hold the ''RE'' button underneath the back cover of your ''Explorer Edition'' (or short the bypass contact points on the ''Developer Edition'') &lt;br /&gt;
{{Info|Confirm that the label of the button says ''RE'' and not ''RESET''! If the button label says ''RESET'' instead you probably have a regular PinePhone and you're reading the wrong page.}}&lt;br /&gt;
* Connect the phone to an USB port of a computer, while still holding the button for some time&lt;br /&gt;
* Confirm if the phone was booted in Maskrom mode:&lt;br /&gt;
** On ''Linux'' check if the Maskrom mode appears as device in the output of the terminal command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; on the computer, the expected ''VID:PID'' of the device is ''2207:330c''.&lt;br /&gt;
** On ''Windows'' this can be checked using the ''Device Manager'' and checking the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; of an ''Unknown device'' appears.&lt;br /&gt;
** On ''macOS'' this can be checked in ''/Applications/Utilities/System Information.app'' under ''USB'' and by checking if the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; is appearing for a ''Composite Device''.&lt;br /&gt;
* Let the phone charge for multiple hours&lt;br /&gt;
&lt;br /&gt;
{{Info|If the device doesn't appear under ''lsusb'' please try again with a different known good USB-C cable and make sure that there is no microSD card in the phone inserted.}}&lt;br /&gt;
&lt;br /&gt;
The device should now be able to boot from the boot medium again. If that is not the case the installation got corrupted, as explained below.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted ====&lt;br /&gt;
The PinePhone Pro won't be able to boot if the installation on the SPI flash, the eMMC or the microSD card got corrupted. To boot a working operating system:&lt;br /&gt;
&lt;br /&gt;
* Prepare a microSD card as explained in the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]&lt;br /&gt;
* Remove any USB-C cable or device or add-on case from the PinePhone Pro&lt;br /&gt;
* Make sure the device is powered off by shortly removing the battery for a second&lt;br /&gt;
* Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore.&lt;br /&gt;
* Power on the device (bypassing the SPI and eMMC might be required, see [[PinePhone Pro#Boot order|Boot order]])&lt;br /&gt;
&lt;br /&gt;
The device should now boot from the microSD card. If the phone does not boot from the microSD card the microSD card was flashed with an incompatible image or the battery got drained as explained above.&lt;br /&gt;
&lt;br /&gt;
=== Bootloaders ===&lt;br /&gt;
The following section contains notes regarding compatible bootloaders with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
==== U-Boot ====&lt;br /&gt;
The pre-installed operating system on the PinePhone Pro Explorer Edition, if sold prior to the end of July of 2022, is using [[U-Boot]] as default bootloader. Batches sold after July of 2022 are using ''Tow-Boot''&lt;br /&gt;
&lt;br /&gt;
==== Tow-Boot ====&lt;br /&gt;
Current batches of the PinePhone Pro ship with ''Tow-Boot'' pre-installed to the SPI flash, which is an opinionated distribution of ''U-Boot'' and brings numerous advantages over stock ''U-Boot'', such as the possibility to choose from booting the eMMC or microSD card using the volume buttons during boot, as well as a ''USB Mass Storage mode'', where the device can be written to by connecting the device to a computer via USB.&lt;br /&gt;
&lt;br /&gt;
The user can flash Tow-Boot to the PinePhone Pro using the [https://tow-boot.org/devices/pine64-pinephonePro.html instructions on the Tow-Boot website].&lt;br /&gt;
&lt;br /&gt;
==== levinboot ====&lt;br /&gt;
The levinboot bootloader is another option for the PinePhone Pro. The project repository can be found [https://gitlab.com/DeltaGem/levinboot/-/tree/master/ here]. (Pinephone Pro supporting fork is [https://xff.cz/git/levinboot/ here].)&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART¹ mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Note: The baud rate may be 1500000 instead of 115200.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used. &lt;br /&gt;
&lt;br /&gt;
''atinout'' example:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
''minicom'' example:&lt;br /&gt;
&lt;br /&gt;
 minicom -D /dev/ttyUSB2&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone and PinePhone Pro modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
 AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1,1&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to power off the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone Pro. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone and PinePhone Pro modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the documentation section.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone Pro has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone Pro may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.8 x 76.6 x 11.1mm&lt;br /&gt;
* '''Weight:''' Approx. 220g&lt;br /&gt;
* '''SIM Card:''' Nano-SIM (Micro-SIM before 07/2022)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 6 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' 1440 x 720 in-cell IPS with Gorilla Glass 4™&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' Rockchip RK3399S 64bit SoC – 2x A72 and 4x A53 CPU cores @ 1.5GHz&lt;br /&gt;
* '''RAM:''' 4GB LPDDR4 @ 800MHz&lt;br /&gt;
* '''Internal Storage:''' 128GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''NOR Flash:''' Listed as [GigaDevices] GD25LQ128EWIGR, but physical inspection found a SiliconKaiser SK25LP128.&lt;br /&gt;
* '''Back Camera:''' 13MP Sony IMX258 with Gorilla Glass 4™ protective layer, LED Flash&lt;br /&gt;
* '''Front Camera:''' 8MP, OmniVision OV8858 front-facing camera&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN &amp;amp; Bluetooth:''' Wi-Fi 802.11AC, hotspot capable + Bluetooth V5.0&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery; unglue bottom black plastic with your nail from Samsung battery before installation in order to match the dimensions)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
Most parts are available from the [https://pine64.com/product-category/pinephonepro-spare-parts/ Pine store]. Take care to use this link to avoid unintentionally ordering parts for the original PinePhone instead.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the mainboard ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced if it is faulty. The replacement board does not have an operating system pre-installed, to test if everything is working after swapping the mainboard a flashed SD card is required.&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an operating system from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone Pro’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the mainboard.&lt;br /&gt;
# Remove the phone's back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone, including the screw under the warranty sticker.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio and UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; for the regular PinePhone can be found [https://www.youtube.com/watch?v=5GbMoZ_zuZs here] or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here].&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Replacing the mainboard|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a silver-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the Pine Store ===&lt;br /&gt;
&lt;br /&gt;
The following parts are not available on the Pine Store for the '''regular PinePhone'''. The replacements are listed below and have not been validated for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Himax HX8394 compatible&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| IMX258&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| OV8858&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| AW3641EDNR&lt;br /&gt;
|-&lt;br /&gt;
| WiFi + Bluetooth&lt;br /&gt;
| [https://www.azurewave.com/img/wireless-modules/AW_CM256SM_DS_Rev15_CYW.pdf AzureWave AW-CM256SM]&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;3 Axis Magnetometer&amp;lt;/s&amp;gt;&lt;br /&gt;
| &amp;lt;s&amp;gt;[https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL]&amp;lt;/s&amp;gt; '''''Note:''''' The ''AF8133J'' is used instead.&lt;br /&gt;
|-&lt;br /&gt;
| Geo Magnetic Sensor&lt;br /&gt;
| [http://www.voltafield.com/products01.html Voltafield AF8133J]&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| STK3311-A&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| [https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6500/ TDK MPU-6500]&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec&lt;br /&gt;
| ALC5616 and ALC5640&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| [https://rockchip.fr/RK818%20datasheet%20V1.0.pdf RK818]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf PinePhone Pro mainboard Explorer Edition Released Schematic ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-top.pdf PinePhone Pro mainboard Explorer Edition component top placement ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-bottom.pdf PinePhone Pro mainboard Explorer Edition component bottom placement ver 1.0 20211127]&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro USB-C small board schematic:&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20FCC%20Certificate-S21101902805001.pdf PinePhone Pro FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20SAR%20Evaluation%20Report-S21101902806001.pdf PinePhone Pro SAR Evaluation Report]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20CE%20RED%20Certificate-S21101902802-R1.pdf PinePhone Pro CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20RoHS%20Test%20Report.pdf PinePhone Pro ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Factory Test Build for Hardware Checking ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-5.jpg|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by the support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, take out the PinePhone Pro Explorer Edition, then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press the RE button (bypass SPI and eMMC boot) underneath the back cover while plugging in the USB-C power. After 3 seconds release the RE button. &lt;br /&gt;
* When powering up, a battery icon screen will show up blow, press power key for two seconds, then the Rockchip logo screen shows up.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]][[File:PPP_Abdroid_Test_Utility-2.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Wait for the home screen, double tap on the test app icon (mark red circuit) and this will bring up the factory test screen. Please note that the SD test is disabled due in this is SD boot build.&lt;br /&gt;
* After running a particular test function, please snapshot the test result and pass it back to support team&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Please insert a functional SIM card when performing the SIM test&lt;br /&gt;
* When perform GPS test, the first result may fail and please ignore this false message.&lt;br /&gt;
* For light sensing test, please have a light shine to the PinePhone Pro when performing the test.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-4.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Factory Test Build for Battery charging ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and battery will start charging. &lt;br /&gt;
* The battery icon display for few seconds and then LCD panel turn off while charging. To check charging status, just quick press power button (about 0.5 second) and battery icon will display progress.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone Pro you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/pinephonepro/ Product Page]&lt;br /&gt;
* [https://www.youtube.com/watch?v=wP2-6Z74W44 Announcement video]&lt;br /&gt;
* [https://www.pine64.org/2021/10/15/october-update-introducing-the-pinephone-pro/ Blog post] with the announcement&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]][[Category:Rockchip RK3399]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePower&amp;diff=21487</id>
		<title>PinePower</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePower&amp;diff=21487"/>
		<updated>2024-06-26T16:27:15Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Readded text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PinePower_Charger_65W.jpeg|400px|thumb|right|PinePower 65W render]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePower''' devices (the ''PinePower'' and the ''PinePower Desktop'') are power supplies, which pack plenty of power. They capable of powering or charging multiple PINE64 devices, such as the Pinebook Pro, PinePhone and the PineTime simultaneously.&lt;br /&gt;
&lt;br /&gt;
== PinePower 65W GaN Charger ==&lt;br /&gt;
The PinePower is a small and compact palm size 65W wall socket power adapter. It features 2 USB-C ports and 1 USB-A port charger. [https://en.wikipedia.org/wiki/Gallium_nitride Gallium Nitride] technology ensures a small and light charger with high charging efficiency. It has a retractable US plug.&lt;br /&gt;
&lt;br /&gt;
=== General specifications ===&lt;br /&gt;
Body:&lt;br /&gt;
&lt;br /&gt;
* Dimensions: 74.8mm x 36.6mm x 32mm&lt;br /&gt;
* Weight: 130 grams&lt;br /&gt;
* Build: Plastic&lt;br /&gt;
* Color: Black&lt;br /&gt;
&lt;br /&gt;
Power:&lt;br /&gt;
&lt;br /&gt;
* Input: AC 100-240V 50/60Hz 1.5A Max&lt;br /&gt;
* Output: 65W&lt;br /&gt;
* Power switch&lt;br /&gt;
&lt;br /&gt;
Connections:&lt;br /&gt;
&lt;br /&gt;
* 240Vac input US plug, adapters for AU, EU, and UK,&lt;br /&gt;
* 1x USB-A&lt;br /&gt;
* 2x USB-C&lt;br /&gt;
&lt;br /&gt;
=== Power specifications ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Output&lt;br /&gt;
! Max output power&lt;br /&gt;
! Power ranges PD&lt;br /&gt;
! Power ranges QC&lt;br /&gt;
! Power ranges PPS&lt;br /&gt;
|-&lt;br /&gt;
| Single USB-C1 or C2&lt;br /&gt;
| 65W&lt;br /&gt;
| 5V3A, 9V3A, 12V3A, 15V3A, 20V3.5A&lt;br /&gt;
| -&lt;br /&gt;
| 3.3-11V5A&lt;br /&gt;
|-&lt;br /&gt;
| Single USB-A&lt;br /&gt;
| 65W&lt;br /&gt;
| -&lt;br /&gt;
| QC3.0 4.5V5A, 5V4.5A, 9V3A, 12V3A, 20V3A&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|USB-C1 &amp;amp; &lt;br /&gt;
USB-C2 combined&lt;br /&gt;
| &lt;br /&gt;
*45W&lt;br /&gt;
*18W&lt;br /&gt;
| &lt;br /&gt;
*5V3A, 9V3A, 12V3A, 15V3A&lt;br /&gt;
*5V3A, 9V2A, 12V1.5A&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| USB-C1 &amp;amp;&lt;br /&gt;
USB-A combined&lt;br /&gt;
| &lt;br /&gt;
*45W&lt;br /&gt;
*18W&lt;br /&gt;
|&lt;br /&gt;
*5V3A, 9V3A, 12V3A, 15V3A&lt;br /&gt;
*-&lt;br /&gt;
|&lt;br /&gt;
*-&lt;br /&gt;
*5V3A, 9V2A, 12V1.5A&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|USB-C1 &amp;amp;&lt;br /&gt;
USB-C2 + USB-A combined&lt;br /&gt;
|&lt;br /&gt;
*45W&lt;br /&gt;
*15W&lt;br /&gt;
|&lt;br /&gt;
*5V3A, 9V3A, 12V3A, 15V3A&lt;br /&gt;
*5V3A&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Certifications ===&lt;br /&gt;
* [https://files.pine64.org/doc/cert/65W%20PinePower%20FCC-SDO%20Certificate-LCSA110222005E.pdf 65W PinePower GaN Charger FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/65W%20PinePower%20GaN%20Charger%20CE%20EMC%20Certificate-LCSA110222003E.pdf 65W PinePower GaN Charger CE EMC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/65W%20PinePower%20GaN%20Charger%20CE%20LVD%20Certificate-LCSA110222004S.pdf 65W PinePower GaN Charger CE LVD Certificate]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
''TBA''&lt;br /&gt;
&lt;br /&gt;
== PinePower 120W Desktop Power Supply ==&lt;br /&gt;
[[File:PinePower-Desktop-2.jpg|400px|thumb|right|PinePower Desktop 120W render]]&lt;br /&gt;
&lt;br /&gt;
A 120W desktop power adapter. It features 1 USB-C port and 4 USB-A port. The 120W output is not per port, but total output power. This is calculated by combining the 65W USB-C, 3x15W USB-A and the 18W USB-A QC, making a total of 128W. The only difference between the US and EU edition is the supplied power cable. Every port, with exception of the wireless Q-charger, has a display, portraying the output voltage and amps. The display back light can be turned on and off by capacitive touch button, located on the top left side of the unit.&lt;br /&gt;
&lt;br /&gt;
=== General specifications ===&lt;br /&gt;
&lt;br /&gt;
Body:&lt;br /&gt;
&lt;br /&gt;
* Dimensions: 123mm x 115mm x 48mm&lt;br /&gt;
* Weight: 543 grams&lt;br /&gt;
* Build: Plastic&lt;br /&gt;
* Color: Black&lt;br /&gt;
&lt;br /&gt;
Display:&lt;br /&gt;
&lt;br /&gt;
* Individual port voltage status display&lt;br /&gt;
* Individual port current status display&lt;br /&gt;
&lt;br /&gt;
Controls:&lt;br /&gt;
&lt;br /&gt;
* Mains power toggle switch&lt;br /&gt;
* Capacitive power output display switch&lt;br /&gt;
&lt;br /&gt;
Power:&lt;br /&gt;
&lt;br /&gt;
* Input: AC 100-240V 50/60Hz ?A Max&lt;br /&gt;
* Output: 120w&lt;br /&gt;
&lt;br /&gt;
Connections:&lt;br /&gt;
&lt;br /&gt;
* 110/240VAC input (either US/EU/UK figure of 8 plug is supplied)&lt;br /&gt;
* 4x USB-A&lt;br /&gt;
* 1x USB-C&lt;br /&gt;
&lt;br /&gt;
=== Power specifications ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Output&lt;br /&gt;
! Protocol&lt;br /&gt;
! Version&lt;br /&gt;
! Max output power&lt;br /&gt;
! Power ranges&lt;br /&gt;
|-&lt;br /&gt;
| USB-C&lt;br /&gt;
| [https://en.wikipedia.org/wiki/USB_hardware#USB_Power_Delivery_(USB_PD) PD]&lt;br /&gt;
| ?&lt;br /&gt;
| 65W&lt;br /&gt;
| 5V3A, 9V3A, 12V3A, 15V3A, 20V3.25A&lt;br /&gt;
|-&lt;br /&gt;
| USB-A&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Quick_Charge QC]&lt;br /&gt;
| 3.1&lt;br /&gt;
| 18W&lt;br /&gt;
| 5V3A, 9V2A, 12V1.5A&lt;br /&gt;
|-&lt;br /&gt;
| USB-A&lt;br /&gt;
| USB&lt;br /&gt;
| ?&lt;br /&gt;
| 15W&lt;br /&gt;
| 5V3A&lt;br /&gt;
|-&lt;br /&gt;
| Wireless charger&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Qi_(standard) Qi]&lt;br /&gt;
| 1.2&lt;br /&gt;
| 10W&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Certifications ===&lt;br /&gt;
* [https://files.pine64.org/doc/cert/120W%20Desktop%20PinePower%20FCC%20Certificate-DL-20221129012C.pdf 120W PinePower Desktop Power Supply FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/120W%20Desktop%20PinePower%20CE%20EMC%20Certificate-DL-20221129011C.pdf 120W PinePower Desktop Power Supply CE EMC Certificate]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
&lt;br /&gt;
The power unit is not made to be disassembled, do so at your own risk. The front plate is secured with 4 tabs, that can be disengaged with a screwdriver. The complete assembly can be slid out, but do mind the same tab in the casing. The power button at the back of the case has a plug that can be disconnected from the main PCB. The wireless charging PCB has to be de-soldered, or forcefully removed from the inner casing, as it is glued to the top of the case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; heights=&amp;quot;180&amp;quot;&amp;gt;&lt;br /&gt;
File:PinPower-Desktop-front-plate-removal.jpg | (Removal of the front plate)&lt;br /&gt;
File:PinPower-Desktop-Display-front.jpg       | (Front view display PCB)&lt;br /&gt;
File:PinPower-Desktop-Display-back.jpg        | (Back side display PCB)&lt;br /&gt;
File:PinPower-Desktop-PCB-top.jpg             | (Top side main PCB)&lt;br /&gt;
File:PinPower-Desktop-PCB-bottom.jpg          | (Bottom view main PCB)&lt;br /&gt;
File:PinPower-Desktop-wireless-charger.jpg    | (Wireless charger)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some remarks: &lt;br /&gt;
&lt;br /&gt;
* This main PCB is marked as XR SEMI v1.1&lt;br /&gt;
* Two unmarked packages, control the display. &lt;br /&gt;
* An antenna is connected on the display PCB, lining up with the 'lamp' symbol. This is the capacitive touch button to control the display back light.&lt;br /&gt;
* The 65W PD USB-C port is controlled by a [http://www.hynetek.com/product/pdController/HUSB339/document/HUSB339_DS_EN_V1.2.pdf HUSB339] controller, paired with a GOFORD G16 MOSFET.&lt;br /&gt;
* The other ports have a [http://www.lshchip.com/pdf/Deep-pool/NDP1360KC_EN_Rev1.1.pdf NDP1360KC] as final power converter.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/2020/12/15/december-update-the-longest-one-yet/ Pine blog, containing news about the PinePower products]&lt;br /&gt;
* [https://pine64.com/product/pinepower-65w-gan-2c1a-charger-with-international-plugs/ PinePower 65W on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product/pinepower-120w-desktop-power-supply-eu-version/ PinePower 120W EU version on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product/pinepower-120w-desktop-power-supply-us-version/ PinePower 120W US version on the official Pine store]&lt;br /&gt;
* [https://www.printables.com/model/923335-pinepower-120w-under-shelf-mount-and-cable-organiz 3D printed PinePower 120W Under-Shelf Mount] ([https://makerworld.com/en/models/510799 in makerworl])&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePower]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePower&amp;diff=21486</id>
		<title>PinePower</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePower&amp;diff=21486"/>
		<updated>2024-06-26T16:26:27Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Categorization doesn't make sense&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PinePower_Charger_65W.jpeg|400px|thumb|right|PinePower 65W render]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePower''' devices (the ''PinePower'' and the ''PinePower Desktop'') are power supplies, which pack plenty of power. They capable of powering or charging multiple PINE64 devices, such as the Pinebook Pro, PinePhone and the PineTime simultaneously.&lt;br /&gt;
&lt;br /&gt;
== PinePower 65W GaN Charger ==&lt;br /&gt;
The PinePower is a small and compact palm size 65W wall socket power adapter. It features 2 USB-C ports and 1 USB-A port charger. [https://en.wikipedia.org/wiki/Gallium_nitride Gallium Nitride] technology ensures a small and light charger with high charging efficiency. It has a retractable US plug.&lt;br /&gt;
&lt;br /&gt;
=== General specifications ===&lt;br /&gt;
Body:&lt;br /&gt;
&lt;br /&gt;
* Dimensions: 74.8mm x 36.6mm x 32mm&lt;br /&gt;
* Weight: 130 grams&lt;br /&gt;
* Build: Plastic&lt;br /&gt;
* Color: Black&lt;br /&gt;
&lt;br /&gt;
Power:&lt;br /&gt;
&lt;br /&gt;
* Input: AC 100-240V 50/60Hz 1.5A Max&lt;br /&gt;
* Output: 65W&lt;br /&gt;
* Power switch&lt;br /&gt;
&lt;br /&gt;
Connections:&lt;br /&gt;
&lt;br /&gt;
* 240Vac input US plug, adapters for AU, EU, and UK,&lt;br /&gt;
* 1x USB-A&lt;br /&gt;
* 2x USB-C&lt;br /&gt;
&lt;br /&gt;
=== Power specifications ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Output&lt;br /&gt;
! Max output power&lt;br /&gt;
! Power ranges PD&lt;br /&gt;
! Power ranges QC&lt;br /&gt;
! Power ranges PPS&lt;br /&gt;
|-&lt;br /&gt;
| Single USB-C1 or C2&lt;br /&gt;
| 65W&lt;br /&gt;
| 5V3A, 9V3A, 12V3A, 15V3A, 20V3.5A&lt;br /&gt;
| -&lt;br /&gt;
| 3.3-11V5A&lt;br /&gt;
|-&lt;br /&gt;
| Single USB-A&lt;br /&gt;
| 65W&lt;br /&gt;
| -&lt;br /&gt;
| QC3.0 4.5V5A, 5V4.5A, 9V3A, 12V3A, 20V3A&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|USB-C1 &amp;amp; &lt;br /&gt;
USB-C2 combined&lt;br /&gt;
| &lt;br /&gt;
*45W&lt;br /&gt;
*18W&lt;br /&gt;
| &lt;br /&gt;
*5V3A, 9V3A, 12V3A, 15V3A&lt;br /&gt;
*5V3A, 9V2A, 12V1.5A&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| USB-C1 &amp;amp;&lt;br /&gt;
USB-A combined&lt;br /&gt;
| &lt;br /&gt;
*45W&lt;br /&gt;
*18W&lt;br /&gt;
|&lt;br /&gt;
*5V3A, 9V3A, 12V3A, 15V3A&lt;br /&gt;
*-&lt;br /&gt;
|&lt;br /&gt;
*-&lt;br /&gt;
*5V3A, 9V2A, 12V1.5A&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|USB-C1 &amp;amp;&lt;br /&gt;
USB-C2 + USB-A combined&lt;br /&gt;
|&lt;br /&gt;
*45W&lt;br /&gt;
*15W&lt;br /&gt;
|&lt;br /&gt;
*5V3A, 9V3A, 12V3A, 15V3A&lt;br /&gt;
*5V3A&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Certifications ===&lt;br /&gt;
* [https://files.pine64.org/doc/cert/65W%20PinePower%20FCC-SDO%20Certificate-LCSA110222005E.pdf 65W PinePower GaN Charger FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/65W%20PinePower%20GaN%20Charger%20CE%20EMC%20Certificate-LCSA110222003E.pdf 65W PinePower GaN Charger CE EMC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/65W%20PinePower%20GaN%20Charger%20CE%20LVD%20Certificate-LCSA110222004S.pdf 65W PinePower GaN Charger CE LVD Certificate]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
''TBA''&lt;br /&gt;
&lt;br /&gt;
== PinePower 120W Desktop Power Supply ==&lt;br /&gt;
[[File:PinePower-Desktop-2.jpg|400px|thumb|right|PinePower Desktop 120W render]]&lt;br /&gt;
&lt;br /&gt;
A 120W desktop power adapter. It features 1 USB-C port and 4 USB-A port. The 120W output is not per port, but total output power. This is calculated by combining the 65W USB-C, 3x15W USB-A and the 18W USB-A QC, making a total of 128W. The only difference between the US and EU edition is the supplied power cable. Every port, with exception of the wireless Q-charger, has a display, portraying the output voltage and amps. The display back light can be turned on and off by capacitive touch button, located on the top left side of the unit.&lt;br /&gt;
&lt;br /&gt;
=== General specifications ===&lt;br /&gt;
&lt;br /&gt;
Body:&lt;br /&gt;
&lt;br /&gt;
* Dimensions: 123mm x 115mm x 48mm&lt;br /&gt;
* Weight: 543 grams&lt;br /&gt;
* Build: Plastic&lt;br /&gt;
* Color: Black&lt;br /&gt;
&lt;br /&gt;
Display:&lt;br /&gt;
&lt;br /&gt;
* Individual port voltage status display&lt;br /&gt;
* Individual port current status display&lt;br /&gt;
&lt;br /&gt;
Controls:&lt;br /&gt;
&lt;br /&gt;
* Mains power toggle switch&lt;br /&gt;
* Capacitive power output display switch&lt;br /&gt;
&lt;br /&gt;
Power:&lt;br /&gt;
&lt;br /&gt;
* Input: AC 100-240V 50/60Hz ?A Max&lt;br /&gt;
* Output: 120w&lt;br /&gt;
&lt;br /&gt;
Connections:&lt;br /&gt;
&lt;br /&gt;
* 110/240VAC input (either US/EU/UK figure of 8 plug is supplied)&lt;br /&gt;
* 4x USB-A&lt;br /&gt;
* 1x USB-C&lt;br /&gt;
&lt;br /&gt;
=== Power specifications ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Output&lt;br /&gt;
! Protocol&lt;br /&gt;
! Version&lt;br /&gt;
! Max output power&lt;br /&gt;
! Power ranges&lt;br /&gt;
|-&lt;br /&gt;
| USB-C&lt;br /&gt;
| [https://en.wikipedia.org/wiki/USB_hardware#USB_Power_Delivery_(USB_PD) PD]&lt;br /&gt;
| ?&lt;br /&gt;
| 65W&lt;br /&gt;
| 5V3A, 9V3A, 12V3A, 15V3A, 20V3.25A&lt;br /&gt;
|-&lt;br /&gt;
| USB-A&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Quick_Charge QC]&lt;br /&gt;
| 3.1&lt;br /&gt;
| 18W&lt;br /&gt;
| 5V3A, 9V2A, 12V1.5A&lt;br /&gt;
|-&lt;br /&gt;
| USB-A&lt;br /&gt;
| USB&lt;br /&gt;
| ?&lt;br /&gt;
| 15W&lt;br /&gt;
| 5V3A&lt;br /&gt;
|-&lt;br /&gt;
| Wireless charger&lt;br /&gt;
| [https://en.wikipedia.org/wiki/Qi_(standard) Qi]&lt;br /&gt;
| 1.2&lt;br /&gt;
| 10W&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Certifications ===&lt;br /&gt;
* [https://files.pine64.org/doc/cert/120W%20Desktop%20PinePower%20FCC%20Certificate-DL-20221129012C.pdf 120W PinePower Desktop Power Supply FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/120W%20Desktop%20PinePower%20CE%20EMC%20Certificate-DL-20221129011C.pdf 120W PinePower Desktop Power Supply CE EMC Certificate]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
&lt;br /&gt;
The power unit is not made to be disassembled, do so at your own risk. The front plate is secured with 4 tabs, that can be disengaged with a screwdriver. The complete assembly can be slid out, but do mind the same tab in the casing. The power button at the back of the case has a plug that can be disconnected from the main PCB. The wireless charging PCB has to be de-soldered, or forcefully removed from the inner casing, as it is glued to the top of the case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; heights=&amp;quot;180&amp;quot;&amp;gt;&lt;br /&gt;
File:PinPower-Desktop-front-plate-removal.jpg | (Removal of the front plate)&lt;br /&gt;
File:PinPower-Desktop-Display-front.jpg       | (Front view display PCB)&lt;br /&gt;
File:PinPower-Desktop-Display-back.jpg        | (Back side display PCB)&lt;br /&gt;
File:PinPower-Desktop-PCB-top.jpg             | (Top side main PCB)&lt;br /&gt;
File:PinPower-Desktop-PCB-bottom.jpg          | (Bottom view main PCB)&lt;br /&gt;
File:PinPower-Desktop-wireless-charger.jpg    | (Wireless charger)&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This main PCB is marked as XR SEMI v1.1&lt;br /&gt;
* Two unmarked packages, control the display. &lt;br /&gt;
* An antenna is connected on the display PCB, lining up with the 'lamp' symbol. This is the capacitive touch button to control the display back light.&lt;br /&gt;
* The 65W PD USB-C port is controlled by a [http://www.hynetek.com/product/pdController/HUSB339/document/HUSB339_DS_EN_V1.2.pdf HUSB339] controller, paired with a GOFORD G16 MOSFET.&lt;br /&gt;
* The other ports have a [http://www.lshchip.com/pdf/Deep-pool/NDP1360KC_EN_Rev1.1.pdf NDP1360KC] as final power converter.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/2020/12/15/december-update-the-longest-one-yet/ Pine blog, containing news about the PinePower products]&lt;br /&gt;
* [https://pine64.com/product/pinepower-65w-gan-2c1a-charger-with-international-plugs/ PinePower 65W on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product/pinepower-120w-desktop-power-supply-eu-version/ PinePower 120W EU version on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product/pinepower-120w-desktop-power-supply-us-version/ PinePower 120W US version on the official Pine store]&lt;br /&gt;
* [https://www.printables.com/model/923335-pinepower-120w-under-shelf-mount-and-cable-organiz 3D printed PinePower 120W Under-Shelf Mount] ([https://makerworld.com/en/models/510799 in makerworl])&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePower]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Oz64&amp;diff=21482</id>
		<title>Oz64</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Oz64&amp;diff=21482"/>
		<updated>2024-06-24T16:52:58Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Oz64_SBC_600x600.jpg|thumb|right|The Oz64 SBC]]&lt;br /&gt;
[[File:Oz64_3D_model.png|thumb|right|The Oz64 3D model]]&lt;br /&gt;
[[File:RISC-V.png|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
The '''Oz64''' is a low cost single-board computer based on the Sophgo SG2000 SoC with dual T-Head C906 64-bit RISC-V cores, an ARM Cortex A53 64-bit RISC CPU core and an 8051 8-bit core supported by 512 MB of embedded DRAM memory, with WiFi and Bluetooh radio interfaces. The Oz64 SBC comes in a model-B form-factor, has a microSD card slot, an eMMC plugin connector, an USB 2.0 Type-A host port, and many other peripheral interfaces for makers to integrate with sensors and other devices.&lt;br /&gt;
&lt;br /&gt;
== Software Releases ==&lt;br /&gt;
&lt;br /&gt;
=== Quick Links to the Source of OS Images Build ===&lt;br /&gt;
&lt;br /&gt;
There is a community effort to bring updated kernels, peripherals and buildroot - Lots of communication happening in the #ox64-nutcracker channel. &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/lupyuen2/wip-nuttx/releases/download/sg2000-1/Image Nuttx Released Image] by Lup Yuen&lt;br /&gt;
&lt;br /&gt;
Toolchain:&lt;br /&gt;
&lt;br /&gt;
* elf_newlib_toolchain/bin/riscv64-unknown-elf-gcc (Xuantie-900 elf newlib gcc Toolchain V2.2.5 B-20220323) 10.2.0&lt;br /&gt;
* linux_toolchain/bin/riscv64-unknown-linux-gnu-gcc (Xuantie-900 linux-5.10.4 glibc gcc Toolchain V2.2.4 B-20211227) 10.2.0&lt;br /&gt;
* cmake version 3.19.3&lt;br /&gt;
&lt;br /&gt;
=== Software Development Kits ===&lt;br /&gt;
* [https://github.com/sophgo/tdl_models SG200x NPU TDL SDK]&lt;br /&gt;
* [https://github.com/Fishwaldo/sophgo-sg200x-debian/releases Fishwaldo SG200x Debian]&lt;br /&gt;
* [https://github.com/lupyuen/nuttx-sg2000 Lup Yuen Apache NuttX RTOS]&lt;br /&gt;
&lt;br /&gt;
== SoC and Memory Specification ==&lt;br /&gt;
&lt;br /&gt;
[[File:Sophgo-icon.jpg|right|200px]]&lt;br /&gt;
&lt;br /&gt;
Based on the [https://en.sophgo.com/sophon-u/product/introduce/sg200x.html Sophgo SG-200x]&lt;br /&gt;
&lt;br /&gt;
[[File:SG2000_Block_Diagram.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== CPU Architecture ===&lt;br /&gt;
&lt;br /&gt;
[[File:T-Head.png|right|200px]]&lt;br /&gt;
&lt;br /&gt;
T-Head C906 1GHz MHz 64-bit RISC-V CPU:&lt;br /&gt;
&lt;br /&gt;
* Supports RISC-V RV64IMAFCV instruction architecture&lt;br /&gt;
* Five-stage single-issue sequentially executed pipeline&lt;br /&gt;
* Level-1 instruction and data cache of Harvard architecture, with a size of 32 KB and a cache line of 64KB&lt;br /&gt;
* Level-2 128KB cache&lt;br /&gt;
* Sv39 memory management unit, realizing the conversion of virtual and real addresses and memory management&lt;br /&gt;
* jTLB that supports 128 entries&lt;br /&gt;
* Supports AXI 4.0 128-bit master interface&lt;br /&gt;
* Supports core local interrupt (CLINT) and platform-level interrupt controller (PLIC)&lt;br /&gt;
* With 80 external interrupt sources, 3 bits for configuring interrupt priority&lt;br /&gt;
* Supports BHT (8K) and BTB&lt;br /&gt;
* Compatible with RISC-V PMP, 8 configurable areas&lt;br /&gt;
* Supports hardware performance monitor (HPM) units&lt;br /&gt;
* See [https://www.t-head.cn/product/c906?lang=en here]&lt;br /&gt;
&lt;br /&gt;
T-Head C906 700Mhz MHz 64-bit RISC-V CPU:&lt;br /&gt;
&lt;br /&gt;
* Supports RISC-V RV64IMAFCV instruction architecture&lt;br /&gt;
* Five-stage single-issue sequentially executed pipeline&lt;br /&gt;
* Level-1 instruction and data cache of Harvard architecture, with a size of 16 KB and a cache line of 16KB&lt;br /&gt;
* Sv39 memory management unit, realizing the conversion of virtual and real addresses and memory management&lt;br /&gt;
* jTLB that supports 128 entries&lt;br /&gt;
* Supports AXI 4.0 128-bit master interface&lt;br /&gt;
* Supports core local interrupt (CLINT) and platform-level interrupt controller (PLIC)&lt;br /&gt;
* With 80 external interrupt sources, 3 bits for configuring interrupt priority&lt;br /&gt;
* Supports BHT (8K) and BTB&lt;br /&gt;
* Compatible with RISC-V PMP, 8 configurable areas&lt;br /&gt;
* Supports hardware performance monitor (HPM) units&lt;br /&gt;
* See [https://www.t-head.cn/product/c906?lang=en here]&lt;br /&gt;
&lt;br /&gt;
[[File:Arm-logo.png|right|200px]]&lt;br /&gt;
&lt;br /&gt;
ARM Cortex-A53 1GHz 64-bit RISC CPU:&lt;br /&gt;
&lt;br /&gt;
* [https://www.arm.com/products/processors/cortex-a/cortex-a53-processor.php Quad-core Cortex-A53 up to 1.0GHz CPU]&lt;br /&gt;
* Full implementation of the ARM architecture v8-A instruction set&lt;br /&gt;
* ARM Neon Advanced SIMD (single instruction, multiple data) support for accelerated media and signal processing computation&lt;br /&gt;
* ARMv8 Cryptography Extensions&lt;br /&gt;
* In-order pipeline with symmetric dual-issue of most instructions&lt;br /&gt;
* Unified system L2 128KB cache&lt;br /&gt;
* Includes VFP v3 hardware to support single and double-precision operations&lt;br /&gt;
* Integrated 32KB L1 instruction cache, 32KB 4-way set associative L1 data cache&lt;br /&gt;
* TrustZone technology support&lt;br /&gt;
* PD_A53: Cortex-A53 + Neon + FPU + L1 I/D Cache of core 2/3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8051 25-300MHz 8-bit CPU:&lt;br /&gt;
* Integrated 8K SRAM&lt;br /&gt;
&lt;br /&gt;
=== System Memory ===&lt;br /&gt;
* SIP DRAM 512MB&lt;br /&gt;
&lt;br /&gt;
== Board Features ==&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
* 2.4 GHz 1T1R WiFi6&lt;br /&gt;
* Bluetooth 5.2&lt;br /&gt;
* 10/100 Mbit/s Ethernet with optional PoE capability&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
* On-board eMMC module socket&lt;br /&gt;
* MicroSD, supports SDHC and SDXC&lt;br /&gt;
&lt;br /&gt;
=== Expansion Ports ===&lt;br /&gt;
* USB 2.0 Host port&lt;br /&gt;
* 26 GPIO pins, including SPI, I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C and UART functionality&lt;br /&gt;
* 2x Dual-lane MiPi CSI port&lt;br /&gt;
* Optional dual-lane MiPi DSI port&lt;br /&gt;
&lt;br /&gt;
== Board Information, Schematics and Certifications ==&lt;br /&gt;
&lt;br /&gt;
Board Dimensions: 85mm x 56mm x 18.8mm, see the [https://files.pine64.org/doc/rock64/rock64%20board%20dimension.pdf model-B board dimension drawing]&lt;br /&gt;
&lt;br /&gt;
Input Power: +5V @2A with 3.5mm/1.35mm Type H Barrel type DC connector (@1.5A will work if there is no heavy load on the USB 2.0 port)&lt;br /&gt;
&lt;br /&gt;
Pre-Production version schematic:&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/oz64/PINE64_Oz64_Schematic-20240517.pdf Oz64 Schematic 20240517 v1.0.0]&lt;br /&gt;
* [https://files.pine64.org/doc/oz64/PINE64_Oz64_PCB_Placement-Top-20240517.pdf Oz64 PCB Component placement(ToP) 20240517 v1.0.0]&lt;br /&gt;
* [https://files.pine64.org/doc/oz64/PINE64_Oz64_PCB_Placement-Bottom-20240517.pdf Oz64 PCB Component placement(Bottom) 20240517 v1.0.0]&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* Disclaimer: Please note that PINE64 SBC is not a &amp;quot;final&amp;quot; product and in general certification is not necessary.&lt;br /&gt;
* Not yet available&lt;br /&gt;
&lt;br /&gt;
== Datasheets for Components and Peripherals ==&lt;br /&gt;
Sophgo SG2000 SoC information:&lt;br /&gt;
* [https://github.com/sophgo/sophgo-doc/releases/download/sg2000-trm-v1.0/sg2000_trm_en.pdf Sophgo SG2000 SoC Technical Reference Manual]&lt;br /&gt;
&lt;br /&gt;
Wifi/BT information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/oz64/AIC8800DC%20Datasheet%20v1.0.pdf AIC Semi AIC8800DC Datasheet]&lt;br /&gt;
&lt;br /&gt;
Power Regulator information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/oz64/ETA3414_V1.6.pdf Empower ETA3414 1.5A 3MHz Step_down Converter Datasheet]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/oz64/ETA3418_V1.4.pdf Empower ETA3418 2.5A 3MHz Step_down Converter Datasheet]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/oz64/ETA5050_V2.4.pdf Empower ETA5050 500mA Low Noise, High PSRR, Fast Transient Response LDO Datasheet]&lt;br /&gt;
&lt;br /&gt;
MicroSD socket information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/ox64/TF%20PUSH%20type%20socket%20specification.pdf Push type microSD socket specification]&lt;br /&gt;
&lt;br /&gt;
== Resources and Articles ==&lt;br /&gt;
&lt;br /&gt;
== Development Efforts ==&lt;br /&gt;
&lt;br /&gt;
== Build==&lt;br /&gt;
&lt;br /&gt;
* [https://lupyuen.github.io/articles/sg2000#appendix-build-nuttx-for-sg2000 Nuttx Build] by Lup Yuen&lt;br /&gt;
&lt;br /&gt;
[[Category:Oz64]]&lt;br /&gt;
[[Category:Sophgo SG2000]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Ox64&amp;diff=21473</id>
		<title>Ox64</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Ox64&amp;diff=21473"/>
		<updated>2024-06-23T07:28:51Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Reverted edits by Kuratius (talk) to last revision by Pavlos1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Ox64_board.jpg|thumb|right|The Ox64]]&lt;br /&gt;
[[File:Ox64 pinout.png|thumb|Pinout of the production version]]&lt;br /&gt;
[[File:RISC-V.png|thumb|right|Powered by RISC-V]]&lt;br /&gt;
&lt;br /&gt;
The '''Ox64''' is a RISC-V based single-board computer based on the Bouffalo Lab BL808 RISC-V SoC with C906 64-bit and E907/E902 32-bit CPU cores supported by 64 MB of embedded PSRAM memory, and with built-in WiFi, Bluetooh and Zigbee radio interfaces. The Ox64 comes in a breadboard-friendly form-factor, has a microSD card slot, a USB 2.0 Type-C port, and many other peripheral interfaces for makers to integrate with sensors and other devices.&lt;br /&gt;
&lt;br /&gt;
== Software Releases ==&lt;br /&gt;
&lt;br /&gt;
=== Quick Links to the Source of OS Images Build ===&lt;br /&gt;
&lt;br /&gt;
There is a community effort to bring updated kernels, peripherals and buildroot - Lots of communication happening in the #ox64-nutcracker channel. &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/openbouffalo/buildroot_bouffalo buildroot] bringing all the work below together with a bootable kernel and updated filesystem images for SD cards &lt;br /&gt;
* [https://github.com/smaeul/u-boot/tree/bl808 U-Boot] and [https://github.com/smaeul/opensbi/tree/bl808 OpenSBI] work by Smauel&lt;br /&gt;
* [https://github.com/arm000/linux-bl808/tree/linux-next/mboxic Kernel] IRQChip, SDCard, and (WIP) USB by arm000, Alexander Horner and others&lt;br /&gt;
* [https://github.com/openbouffalo/OBLFR OpenBouffalo Firmware] low_load drivers by Fishwaldo and others&lt;br /&gt;
&lt;br /&gt;
Original Linux Images provided by Bouffalo - Very basic '''alpha build''' which are only fit for board bring up and testing purposes. &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bouffalolab/bl808_linux Linux for BL808]&lt;br /&gt;
* [https://wiki.pine64.org/wiki/File:Linux_BL808.pdf Installation Instructions for Linux on BL808 (Chinese)]&lt;br /&gt;
* [https://wiki.pine64.org/wiki/File:Linux_BL808_en.pdf Installation Instructions for Linux on BL808 (machine translated to English)]&lt;br /&gt;
&lt;br /&gt;
Toolchain:&lt;br /&gt;
&lt;br /&gt;
* elf_newlib_toolchain/bin/riscv64-unknown-elf-gcc (Xuantie-900 elf newlib gcc Toolchain V2.2.5 B-20220323) 10.2.0&lt;br /&gt;
* linux_toolchain/bin/riscv64-unknown-linux-gnu-gcc (Xuantie-900 linux-5.10.4 glibc gcc Toolchain V2.2.4 B-20211227) 10.2.0&lt;br /&gt;
* cmake version 3.19.3&lt;br /&gt;
&lt;br /&gt;
=== Software Development Kits ===&lt;br /&gt;
* [https://github.com/bouffalolab/bl_mcu_sdk BL808 MCU SDK]&lt;br /&gt;
* [https://dev.bouffalolab.com/download BLDevCube Flashing Tool for Windows, macOS and Ubuntu x64]&lt;br /&gt;
* [https://wiki.pine64.org/wiki/File:Ox64_BL808UART_connect.pdf Ox64 UART Flashing Guide], see the [https://gist.github.com/lupyuen/7a0c697b89abccda8e38b33dfe5ebaff notes]&lt;br /&gt;
* [https://github.com/lupyuen/lupyuen.github.io/releases/download/ox64/bl808_demo_event.bin BL808 Demo Firmware: bl808_demo_event.bin], see the [https://gist.github.com/lupyuen/7a0c697b89abccda8e38b33dfe5ebaff notes]&lt;br /&gt;
* [https://github.com/lupyuen/lupyuen.github.io/releases/download/ox64/whole_flash_data.bin BL808 UART Log Firmware: whole_flash_data.bin], see the [https://gist.github.com/lupyuen/7a0c697b89abccda8e38b33dfe5ebaff notes]&lt;br /&gt;
* [https://github.com/lupyuen/lupyuen.github.io/releases/download/ox64/BL808.DVK.Quick.Start.pdf BL808 DVK Quick Start]&lt;br /&gt;
* [https://github.com/bouffalolab/bl808_linux/tree/main/opensbi-0.6-808 OpenSBI for BL808]&lt;br /&gt;
* [https://github.com/bouffalolab/bl-pac/tree/main/bl808 Rust Peripheral Access Crate (PAC) for BL808]&lt;br /&gt;
* [https://github.com/bouffalolab/bl-pac/blob/main/bl808/bl808.svd System View Description (SVD) for BL808]&lt;br /&gt;
&lt;br /&gt;
== SoC and Memory Specification ==&lt;br /&gt;
&lt;br /&gt;
[[File:Bouffalo_Lab_icon.png|right]]&lt;br /&gt;
&lt;br /&gt;
Based on the [https://en.bouffalolab.com/product/ Bouffalo Lab BL808]&lt;br /&gt;
&lt;br /&gt;
[[File:BL808_Block_Diagram.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
=== CPU Architecture ===&lt;br /&gt;
&lt;br /&gt;
[[File:T-Head.png|right|200px]]&lt;br /&gt;
&lt;br /&gt;
T-Head C906 480 MHz 64-bit RISC-V CPU:&lt;br /&gt;
&lt;br /&gt;
* Supports RISC-V RV64IMAFCV instruction architecture&lt;br /&gt;
* Five-stage single-issue sequentially executed pipeline&lt;br /&gt;
* Level-1 instruction and data cache of Harvard architecture, with a size of 32 KB and a cache line of 64B&lt;br /&gt;
* Sv39 memory management unit, realizing the conversion of virtual and real addresses and memory management&lt;br /&gt;
* jTLB that supports 128 entries&lt;br /&gt;
* Supports AXI 4.0 128-bit master interface&lt;br /&gt;
* Supports core local interrupt (CLINT) and platform-level interrupt controller (PLIC)&lt;br /&gt;
* With 80 external interrupt sources, 3 bits for configuring interrupt priority&lt;br /&gt;
* Supports BHT (8K) and BTB&lt;br /&gt;
* Compatible with RISC-V PMP, 8 configurable areas&lt;br /&gt;
* Supports hardware performance monitor (HPM) units&lt;br /&gt;
* See [https://www.t-head.cn/product/c906?lang=en here]&lt;br /&gt;
&lt;br /&gt;
T-Head E907 320 MHz 32-bit RISC-V CPU:&lt;br /&gt;
&lt;br /&gt;
* Supports RISC-V RV32IMAFCP instruction set&lt;br /&gt;
* Supports RISC-V 32-bit/16-bit mixed instruction set&lt;br /&gt;
* Supports RISC-V machine mode and user mode&lt;br /&gt;
* Thirty-two 32-bit integer general purpose registers (GPR) and thirty-two 32-bit/64-bit floating-point GPRs&lt;br /&gt;
* Integer (5-stage)/floating-point (7-stage), single-issue, sequentially executed pipeline&lt;br /&gt;
* Supports AXI 4.0 main device interface and AHB 5.0 peripheral interface&lt;br /&gt;
* 32K instruction cache, two-way set associative structure&lt;br /&gt;
* 16K data cache, two-way set associative structure&lt;br /&gt;
* See [https://www.t-head.cn/product/e907?lang=en here]&lt;br /&gt;
&lt;br /&gt;
T-Head E902 150 MHz 32-bit RISC-V CPU:&lt;br /&gt;
&lt;br /&gt;
* See [https://www.t-head.cn/product/e902?lang=en here]&lt;br /&gt;
&lt;br /&gt;
=== System Memory ===&lt;br /&gt;
* Embedded 64MB PSRAM&lt;br /&gt;
&lt;br /&gt;
== Board Features ==&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
* 2.4 GHz 1T1R WiFi 802.11 b/g/n&lt;br /&gt;
* Bluetooth 5.2&lt;br /&gt;
* Zigbee&lt;br /&gt;
* 10/100 Mbit/s Ethernet (optional, on expansion board)&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
* On-board 16 Mbit (2 MB) or 128 Mbit (16 MB) XSPI NOR flash memory&lt;br /&gt;
* MicroSD, supports SDHC and SDXC (only on the 128 Mbit version)&lt;br /&gt;
&lt;br /&gt;
=== Expansion Ports ===&lt;br /&gt;
* USB 2.0 OTG port&lt;br /&gt;
* 26 GPIO pins, including SPI, I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;C and UART functionality, possible I&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;S and GMII expansion&lt;br /&gt;
* Dual-lane MiPi CSI port, located at USB-C port, for camera module&lt;br /&gt;
&lt;br /&gt;
=== Audio ===&lt;br /&gt;
* Microphone (optional, on the camera module)&lt;br /&gt;
* Speaker (optional, on the camera module)&lt;br /&gt;
&lt;br /&gt;
== Board Information, Schematics and Certifications ==&lt;br /&gt;
[[File:Ox64 ethphy.png|thumb|Pinout for wiring ethernet PHY to EMAC]]&lt;br /&gt;
&lt;br /&gt;
* Baseboard dimensions: 51 mm x 21 mm x 19 mm x 3.5 mm (breadboard friendly)&lt;br /&gt;
* Input power: 5 V, 0.5 A through the microUSB or USB-C ports&lt;br /&gt;
&lt;br /&gt;
Production version schematic:&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/ox64/PINE64_Ox64-Schematic-202221018.pdf Ox64 Schematic 20221018 v1.1]&lt;br /&gt;
* [https://files.pine64.org/doc/ox64/PINE64_Ox64_PCB_Placement-Top-20221018.pdf Ox64 PCB Component placement(ToP) 20221018 v1.1]&lt;br /&gt;
* [https://files.pine64.org/doc/ox64/PINE64_Ox64_PCB_Placement-Bottom-20221018.pdf Ox64 PCB Component placement(Bottom) 20221018 v1.1]&lt;br /&gt;
&lt;br /&gt;
Prototype (dispatched to developers) schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/ox64/PINE64_Ox64-Schematic-202221007.pdf Ox64 Schematic 20221007 v1.0]&lt;br /&gt;
* [https://files.pine64.org/doc/ox64/PINE64_Ox64_PCB_Placement-Top-20221007.pdf Ox64 PCB Component placement(ToP) 20221007 v1.0]&lt;br /&gt;
* [https://files.pine64.org/doc/ox64/PINE64_Ox64_PCB_Placement-Bottom-20221007.pdf Ox64 PCB Component placement(Bottom) 20221007 v1.0]&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* Disclaimer: Please note that PINE64 SBC is not a &amp;quot;final&amp;quot; product and in general certification is not necessary.&lt;br /&gt;
* Not yet available&lt;br /&gt;
&lt;br /&gt;
== Datasheets for Components and Peripherals ==&lt;br /&gt;
&lt;br /&gt;
Bouffalo BL808 SoC information:&lt;br /&gt;
* [https://raw.githubusercontent.com/bouffalolab/bl_docs/main/BL808_DS/en/BL808_DS_1.2_en.pdf Bouffalo Lab BL808 SoC Datasheet]&lt;br /&gt;
* [https://raw.githubusercontent.com/bouffalolab/bl_docs/main/BL808_RM/en/BL808_RM_en_1.3.pdf Bouffalo Lab BL808 SoC Reference Manual]&lt;br /&gt;
&lt;br /&gt;
SPI NOR Flash information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/ox64/gd25lq16e_rev1.2_20210108.pdf GigaDevice 16Mb XSPI-Flash Datasheet]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/star64/gd25lq128e_rev1.0_20210513.pdf GigaDevice 128Mb XSPI-Flash Datasheet]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/5d/W25Q128JW_RevB_11042019-1761358.pdf Winbond 128Mb QSPI-Flash Datasheet] (W25Q128JWSQ)&lt;br /&gt;
&lt;br /&gt;
Power Regulator information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/ox64/IA2014-03.pdf Innovation Analog Tech IA2014 Step_down Converter Datasheet]&lt;br /&gt;
&lt;br /&gt;
MicroSD socket information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/ox64/TF%20PUSH%20type%20socket%20specification.pdf Push type microSD socket specification]&lt;br /&gt;
&lt;br /&gt;
== Compatible UARTs when in bootloader mode ==&lt;br /&gt;
&lt;br /&gt;
When the Ox64 is in bootloader mode, some UARTs are unable to communicate with it. When this is the case, utilities such as BLDevCube are unable to actually program the device. If you see &amp;quot;Shake hand fail&amp;quot; and an empty ack, and your device is in bootloader mode, then it is likely an incompatible UART.&lt;br /&gt;
&lt;br /&gt;
The below devices have been tested and verified as working:&lt;br /&gt;
* Raspberry Pi Pico - running the following [https://github.com/sanjay900/ox64-uart/releases/tag/v1.1 UART firmware] (GP4 and GP5 are used for port 0, GP12 and GP13 for port 1)&lt;br /&gt;
* Compiled binary for Pi Pico and connectivity diagram is [https://github.com/Kris-Sekula/Pine64_Ox64_SBC/tree/main/uart here] &lt;br /&gt;
* ESP32 with CP210x - bridge the EN pin to ground to disable the ESP32 itself, and then connect the TX on the esp32 to 14 on the Ox64 and RX to pin 15. Note that only baud rate 115200 works, and this doesn't seem to work for everyone)&lt;br /&gt;
* Stand-alone CP2102 dongle works at 115200 baud. Brand used was HiLetgo.&lt;br /&gt;
* STM32F401 BlackPill - running the [https://github.com/blackmagic-debug/blackmagic/tree/main/src/platforms/blackpillv2 Black Magic Debug] firmware&lt;br /&gt;
* STM32F103C8T6 BluePill - running Black Magic Debug.&lt;br /&gt;
* Some UART adapters based on the FT232H (note that the FT232RL does not work, and neither does the Pine 64 JTAG)&lt;br /&gt;
* Some CH340G based adapters work and some don't.&lt;br /&gt;
&lt;br /&gt;
== Resources and Articles ==&lt;br /&gt;
* [https://youtube.com/watch?v=czRtF-UNiEY A short video] on how to connect to the Ox64, flash and boot&lt;br /&gt;
* [https://youtu.be/vPAk5sq_Ilc Another video] that covers soldering pins, connecting via Pi Pico and flashing Linux and U-Boot&lt;br /&gt;
* [https://wiki.pine64.org/images/5/59/How_to_Run_Ox64.pdf Step-by-step tutorial] for how to build, flash and run Ox64&lt;br /&gt;
* [https://gist.github.com/lupyuen/7a0c697b89abccda8e38b33dfe5ebaff First batch of Ox64 won't appear as USB serial port]&lt;br /&gt;
* [https://gist.github.com/lupyuen/2087e9b3fb40aab5e0795bb02a265a3b First batch of Ox64 tested OK with CH340C/G]&lt;br /&gt;
* [https://www.robertlipe.com/bl808-not-symmetric/ First thoughts on the (a)symmetry of Bouffalo Labs BL808 as in Pine64 Ox64]&lt;br /&gt;
* [https://thelittleengineerthatcould.blogspot.com/2022/12/the-8-linux-computer-part-2.html The $8 linux computer (with picoprobe-rp2040 programming instructions)]&lt;br /&gt;
* [https://github.com/p4ddy1/pine_ox64/blob/main/build_toolchain_macos.md Building the Xuantie GNU Toolchain for Ox64 on macOS and Apple Silicon]&lt;br /&gt;
&lt;br /&gt;
Ox64 BL808 RISC-V SBC articles by [https://lupyuen.codeberg.page/ Lup Yuen LEE]:&lt;br /&gt;
* [https://lupyuen.codeberg.page/articles/ox64.html Booting Linux and (maybe) Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.codeberg.page/articles/ox2.html Starting Apache NuttX real-time operating system]&lt;br /&gt;
* [https://lupyuen.codeberg.page/articles/mmu.html Sv39 Memory Management Unit]&lt;br /&gt;
* [https://lupyuen.codeberg.page/articles/app.html NuttX Apps and Initial RAM Disk]&lt;br /&gt;
* [https://lupyuen.codeberg.page/articles/plic2.html UART Interrupt and Platform-Level Interrupt Controller (PLIC)]&lt;br /&gt;
* [https://lupyuen.codeberg.page/articles/plic3.html Fixing the UART Interrupt and Platform-Level Interrupt Controller]&lt;br /&gt;
* [https://www.hackster.io/lupyuen/8-risc-v-sbc-on-a-real-time-operating-system-ox64-nuttx-474358 $8 RISC-V SBC on a Real-Time Operating System: Ox64 + NuttX]&lt;br /&gt;
* [https://lupyuen.codeberg.page/articles/nim.html Nim on a Real-Time Operating System: Apache NuttX RTOS + Ox64 BL808 SBC]&lt;br /&gt;
&lt;br /&gt;
Git repositories:&lt;br /&gt;
* [https://github.com/sfranzyshen/arduino-bl808 Community made Arduino Core specifically for the Bouffalo Labs BL808 RISC-V MCU] (initial development has been postponed until further notice)&lt;br /&gt;
&lt;br /&gt;
== Development Efforts ==&lt;br /&gt;
* [https://twitter.com/gamelaster/status/1583916501400068096 Ox64 boots Linux successfully]&lt;br /&gt;
* [https://twitter.com/btashton/status/1586381334439923713?t=w5xRRUR74HGK2O1Zg_aFyw&amp;amp;s=19 Brennan Ashton is porting Apache NuttX RTOS and OpenAMP (Asymmetric Multiprocessing) to BL808]&lt;br /&gt;
* [https://twitter.com/thanos_engine/status/1585153938092761093 Phone Concept for BL808]&lt;br /&gt;
&lt;br /&gt;
== Build==&lt;br /&gt;
Open the terminal and create a new directory for the build:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads/ox64&lt;br /&gt;
 mkdir buildroot_bouffalo &amp;amp;&amp;amp; cd buildroot_bouffalo&lt;br /&gt;
&lt;br /&gt;
Clone the primary Buildroot repository and the specific Buildroot Bouffalo repository:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/buildroot/buildroot&lt;br /&gt;
 git clone https://github.com/openbouffalo/buildroot_bouffalo&lt;br /&gt;
&lt;br /&gt;
Define an environment variable for the Buildroot Bouffalo overlay path:&lt;br /&gt;
&lt;br /&gt;
 export BR_BOUFFALO_OVERLAY_PATH=$(pwd)/buildroot_bouffalo&lt;br /&gt;
&lt;br /&gt;
Change directory into the cloned Buildroot folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads/ox64/buildroot_bouffalo/buildroot&lt;br /&gt;
&lt;br /&gt;
Apply the default configuration for Pine64 Ox64:&lt;br /&gt;
&lt;br /&gt;
 make BR2_EXTERNAL=$BR_BOUFFALO_OVERLAY_PATH pine64_ox64_defconfig&lt;br /&gt;
 # make clean # deletes all the already compiled object files&lt;br /&gt;
&lt;br /&gt;
Use the &amp;lt;code&amp;gt;menuconfig&amp;lt;/code&amp;gt; tool to adjust the build settings:&lt;br /&gt;
&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
[[File:target ABI setting.png|thumb|right|200px|target ABI setting]]&lt;br /&gt;
[[File:toolchain setting.png|thumb|right|200px|toolchain setting]]&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;code&amp;gt;menuconfig&amp;lt;/code&amp;gt;, configure the following:&lt;br /&gt;
* Navigate to &amp;lt;code&amp;gt;Target Options&amp;lt;/code&amp;gt;&lt;br /&gt;
* Enable &amp;lt;code&amp;gt;Integer Multiplication and Division (M)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Enable &amp;lt;code&amp;gt;Atomic Instructions (A)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Enable &amp;lt;code&amp;gt;Single-precision Floating-point (F)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Enable &amp;lt;code&amp;gt;Double-precision Floating-point (D)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set &amp;lt;code&amp;gt;Target ABI&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;lp64d&amp;lt;/code&amp;gt;&lt;br /&gt;
* Under &amp;lt;code&amp;gt;Toolchain&amp;lt;/code&amp;gt;, enable &amp;lt;code&amp;gt;Fortran support&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;OpenMP support&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initiate the build process, but make sure first that your &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt; variable contains no spaces:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
You will get the image files required for flashing in the &amp;lt;code&amp;gt;output/images&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
== Flashing Ox64 SBC and microSD Card ==&lt;br /&gt;
This section explains how to flash an Ox64 board and a microSD card to boot the system.&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Environment === &lt;br /&gt;
You need a Linux machine, a Raspberry Pi Pico to act as a UART adapter, the Ox64 board, and a microSD card.&lt;br /&gt;
&lt;br /&gt;
Start a terminal session and set the working directory to download some files.&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 mkdir ox64 ox64/pico&lt;br /&gt;
 cd ~/Downloads/ox64/pico&lt;br /&gt;
 wget https://github.com/Kris-Sekula/Pine64_Ox64_SBC/blob/main/uart/picoprobe.uf2&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads/ox64&lt;br /&gt;
 mkdir ox64/devcube&lt;br /&gt;
 cd ~/Downloads/ox64/devcube&lt;br /&gt;
&lt;br /&gt;
Get the DevCube 1.8.8 flasher from one of mirror servers listed below.&lt;br /&gt;
&lt;br /&gt;
* https://dev.bouffalolab.com/media/upload/download/BouffaloLabDevCube-v1.8.8.zip&lt;br /&gt;
&lt;br /&gt;
Verify the file hashes listed below.&lt;br /&gt;
&lt;br /&gt;
* SHA1: &amp;lt;code&amp;gt;0f2619e87d946f936f63ae97b0efd674357b1166&amp;lt;/code&amp;gt;&lt;br /&gt;
* SHA256: &amp;lt;code&amp;gt;e6e6db316359da40d29971a1889d41c9e97d5b1ff1a8636e9e6960b6ff960913&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, uncompress the downloaded archive; for example:&lt;br /&gt;
&lt;br /&gt;
 wget https://dev.bouffalolab.com/media/upload/download/BouffaloLabDevCube-v1.8.8.zip&lt;br /&gt;
 sha256sum BouffaloLabDevCube-v1.8.8.zip&lt;br /&gt;
 unzip BouffaloLabDevCube-v1.8.8.zip&lt;br /&gt;
 chmod u+x BLDevCube-ubuntu&lt;br /&gt;
&lt;br /&gt;
Download compressed file from https://github.com/openbouffalo/buildroot_bouffalo/releases/ and decompress it.&lt;br /&gt;
&lt;br /&gt;
(You can also get the compressed the file from https://github.com/openbouffalo/buildroot_bouffalo/releases/download/v1.0.1/bl808-linux-pine64_ox64_full_defconfig.tar.gz)&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads/ox64&lt;br /&gt;
 mkdir openbouffalo &amp;amp;&amp;amp; cd openbouffalo&lt;br /&gt;
 wget https://github.com/openbouffalo/buildroot_bouffalo/releases/download/v1.0.1/bl808-linux-pine64_ox64_full_defconfig.tar.gz&lt;br /&gt;
 tar -xvzf bl808-linux-pine64_ox64_full_defconfig.tar.gz&lt;br /&gt;
&lt;br /&gt;
You'll need the following files for the flashing process.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;m0_lowload_bl808_m0.bin&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;d0_lowload_bl808_d0.bin&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;bl808-firmware.bin&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sdcard.img&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Establish Serial Communication from PC to Ox64 using Pi Pico ===&lt;br /&gt;
Open a terminal and check the connected USB serial devices.&lt;br /&gt;
&lt;br /&gt;
 ls /dev/ttyACM*&lt;br /&gt;
&lt;br /&gt;
Set the Raspberry Pi Pico board into programming mode.&lt;br /&gt;
&lt;br /&gt;
* Press the BootSel button&lt;br /&gt;
* Apply power by plugging the USB cable to PC&lt;br /&gt;
* Release the BootSel button&lt;br /&gt;
&lt;br /&gt;
''Note: you could also ground pin28 to TP6 while powering.''&lt;br /&gt;
&lt;br /&gt;
Copy &amp;lt;code&amp;gt;picoprobe.uf2&amp;lt;/code&amp;gt; file into the new device &amp;lt;code&amp;gt;/media/&amp;lt;user&amp;gt;/RPI-RP2&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 cp ~/Downloads/ox64/pico/picoprobe.uf2 /media/&amp;lt;user&amp;gt;/RPI-RP2&lt;br /&gt;
&lt;br /&gt;
After flashing, the device will auto-set in serial UART communication mode according to the following wiring diagram.&lt;br /&gt;
&lt;br /&gt;
[[File:Pine Serial v2.png|thumb|right|Wiring Raspberry Pi Pico to Pine64 Ox64 SBC]]&lt;br /&gt;
&lt;br /&gt;
 OX64                      PI PICO&lt;br /&gt;
 uart0_Tx_GPIO14_pin1 &amp;lt;-&amp;gt;  uart0_Rx_pin17&lt;br /&gt;
 uart0_Rx_GPIO15_pin2 &amp;lt;-&amp;gt;  uart0_Tx_pin16&lt;br /&gt;
 Rxd_GPIO17_pin31     &amp;lt;-&amp;gt;  uart1_Tx_pin6&lt;br /&gt;
 Txd_GPIO16_pin32     &amp;lt;-&amp;gt;  uart1_Rx_pin7 &lt;br /&gt;
 gnd_pin38            &amp;lt;-&amp;gt;  gnd_pin38/3    &lt;br /&gt;
 vbus5v_pin40         &amp;lt;-&amp;gt;  vbus5v_pin40&lt;br /&gt;
&lt;br /&gt;
=== Flash Your Ox64 === &lt;br /&gt;
There are two new ports to choose from, &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; for serial console and &amp;lt;code&amp;gt;/dev/ttyACM1&amp;lt;/code&amp;gt; for DevCube flashing.&lt;br /&gt;
&lt;br /&gt;
 minicom -b 2000000 -D /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
Set the Ox64 board into programming mode.&lt;br /&gt;
&lt;br /&gt;
* Press the BOOT button&lt;br /&gt;
* Apply power or re-plug the USB cable&lt;br /&gt;
* Release the BOOT button&lt;br /&gt;
&lt;br /&gt;
Close &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt;. Open a new terminal window to run the DevCube flasher.&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads/ox64/devcube&lt;br /&gt;
 ./BLDevCube-ubuntu&lt;br /&gt;
&lt;br /&gt;
Select chip [BL808], press Finish and switch to [MCU] tab.&lt;br /&gt;
&lt;br /&gt;
 M0 Group[group0] Image Addr [0x58000000] [PATH to m0_lowload_bl808_m0.bin]&lt;br /&gt;
 D0 Group[group0] Image Addr [0x58100000] [PATH to d0_lowload_bl808_d0.bin]&lt;br /&gt;
 Interface: UART&lt;br /&gt;
 Port/SN: /dev/ttyACM1 (make sure you don't use /dev/ttyACM0, it's used by the minicom console)&lt;br /&gt;
 Uart rate 2000000&lt;br /&gt;
 UART TX is physical pin 1/GPIO 14.&lt;br /&gt;
 UART RX is physical pin 2/GPIO 15.&lt;br /&gt;
 Click 'Create &amp;amp; Download' and wait until it's done&lt;br /&gt;
&lt;br /&gt;
Switch to the [IOT] tab.&lt;br /&gt;
&lt;br /&gt;
 Enable 'Single Download', set Address with 0x800000, choose [PATH to bl808-firmware.bin]&lt;br /&gt;
 Port/SN: /dev/ttyACM1 (make sure you don't use ACM0, it's used by minicom console)&lt;br /&gt;
 Click 'Create &amp;amp; Download' again and wait until it's done&lt;br /&gt;
 Close DevCube&lt;br /&gt;
&lt;br /&gt;
==== Open-Source Flashing Using CLI ====&lt;br /&gt;
For those who do not want to use the DevCube, BouffaloLab provides open-source flashing packages &amp;lt;code&amp;gt;bflb-iot-tool&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;bflb-mcu-tool&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''Note: While these packages do contain binaries in addition to the Python source code, those binaries do not appear to be used for UART flashing.''&lt;br /&gt;
&lt;br /&gt;
First, install &amp;lt;code&amp;gt;bflb-iot-tool&amp;lt;/code&amp;gt; using your preferred method of managing PIP packages. One option is to set up a Python virtual environment as follows.&lt;br /&gt;
&lt;br /&gt;
 sudo apt install virtualenv python3-virtualenv python3.11-venv&lt;br /&gt;
 python3 -m venv ~/ox64_venv&lt;br /&gt;
 . ~/ox64_venv/bin/activate&lt;br /&gt;
 pip install bflb-iot-tool ''# we are *not* using bflb-mcu-tool''&lt;br /&gt;
&lt;br /&gt;
Note that each time you open a new terminal window you will need to re-run &amp;lt;code&amp;gt;. ~/ox64_venv/bin/activate&amp;lt;/code&amp;gt; to reactivate the virtual environment.&lt;br /&gt;
&lt;br /&gt;
Next, put Ox64 in programming mode (press the BOOT button when first applying power) and flash the BL808.&lt;br /&gt;
&lt;br /&gt;
 PORT=/dev/ttyACM1 ''# this will depend on which serial adapter you use''&lt;br /&gt;
 BAUD=115200       ''# safe value for macOS, if using Linux set to 2000000 for faster flashing''&lt;br /&gt;
 cd ~/Downloads/ox64/buildroot_bouffalo/buildroot/output/images&lt;br /&gt;
 &lt;br /&gt;
 bflb-iot-tool --chipname bl808 --interface uart --port $PORT --baudrate $BAUD --addr 0x000000 --firmware m0_lowload_bl808_m0.bin --single&lt;br /&gt;
 bflb-iot-tool --chipname bl808 --interface uart --port $PORT --baudrate $BAUD --addr 0x100000 --firmware d0_lowload_bl808_d0.bin --single&lt;br /&gt;
 bflb-iot-tool --chipname bl808 --interface uart --port $PORT --baudrate $BAUD --addr 0x800000 --firmware bl808-firmware.bin --single&lt;br /&gt;
&lt;br /&gt;
If you get permission errors when running the commands above, you may need to add your user to the &amp;lt;code&amp;gt;dialout&amp;lt;/code&amp;gt; group. Running the commands as &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; is not recommended since this will make &amp;lt;code&amp;gt;bflb-iot-tool&amp;lt;/code&amp;gt; create &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt;-owned files in your home directory.&lt;br /&gt;
&lt;br /&gt;
==== BL808 Address Details ====&lt;br /&gt;
Note that the addresses are different according to the flashing method, DevCube or CLI.&lt;br /&gt;
&lt;br /&gt;
              DevCube      CLI   &lt;br /&gt;
 M0 address   0x58000000   0x000000&lt;br /&gt;
 D0 address   0x58100000   0x100000&lt;br /&gt;
 LP address   0x58200000   0x200000&lt;br /&gt;
&lt;br /&gt;
=== Flash Your microSD Card ===&lt;br /&gt;
Insert microSD card into PC, locate its device file (&amp;lt;code&amp;gt;/dev/sdb&amp;lt;/code&amp;gt;, for example), erase the start of the card and proceed to flashing.&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads/ox64/buildroot_bouffalo/buildroot/output/images&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 &lt;br /&gt;
 sudo dd if=sdcard.img of=/dev/sdb bs=1M status=progress conv=fsync&lt;br /&gt;
&lt;br /&gt;
=== Booting for the First Time ===&lt;br /&gt;
Insert microSD card into Ox64 and set a UART connection to the Ox64 board, using the following parameters.&lt;br /&gt;
&lt;br /&gt;
* UART TX is physical pin 32/GPIO 16&lt;br /&gt;
* UART RX is physical pin 31/GPIO 17&lt;br /&gt;
* Baud rate is 2000000&lt;br /&gt;
&lt;br /&gt;
Choose from serial devices &amp;lt;code&amp;gt;/dev/ttyACM0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/dev/ttyACM1&amp;lt;/code&amp;gt;, using the lower number.&lt;br /&gt;
&lt;br /&gt;
 minicom -b 2000000 -D /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
Re-apply power to the Ox64 and enjoy the booting!&lt;br /&gt;
&lt;br /&gt;
[[Category:Ox64]]&lt;br /&gt;
[[Category:Bouffalo BL808]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21189</id>
		<title>PinePhone Pro</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21189"/>
		<updated>2023-12-21T21:30:26Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* The installation is corrupted */ updated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinephone_double.png|400px|thumb|right|Rendering of the PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone Pro''' is PINE64's flagship smartphone announced on October 15, 2021. It features 4GB of RAM, an 128GB eMMC and is using an Rockchip RK3399S SoC, which is a specialized version of the RK3399 made specifically for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone Pro is PINE64’s second smartphone and a successor to the original PinePhone. It does not, however, replace the original PinePhone. It should also not be considered a second generation PinePhone; it is a higher-end device, with much better specs, aimed at those who wish to daily-drive a open system stack. Achieving this goal will, however, take time as the software and overall smartphone software ecosystem needs to mature.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&amp;lt;sup&amp;gt;([[PinePhone Pro Software State|view separately]])&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:PinePhone Pro Software State}}&lt;br /&gt;
&lt;br /&gt;
=== Editions and revisions ===&lt;br /&gt;
Similarly to the original PinePhone, various PinePhone Pro editions are planned, the first of which is the Developer Edition (aimed at developers, as the name entails) followed by the Explorer Edition, which is aimed at early adopters.&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone Pro Developer Edition]]&lt;br /&gt;
* PinePhone Pro Explorer Edition&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this Wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time setup ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again. &lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot. Devices shipped after the end of July 2022 do only accept a nano-SIM, the SIM is inserted into a carriage released by slightly pulling on the handle in the lower slot (for information regarding devices shipped prior to end of July 2022 see below).&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the SIM card in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
{{Info|Information regarding devices shipped prior to end of July 2022: The PinePhone Pros shipped prior to the end of July 2022 come with a micro-SIM slot instead of a nano-SIM slot. Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. &amp;lt;br&amp;gt; If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The software section explains how to install the available software releases for the PinePhone Pro to the internal eMMC or a microSD card, how to boot them and how to solve common booting issues.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Pro Software Releases]] page has a complete list of currently supported phone-optimized operating system images that work with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
{{Info|Images of the regular PinePhone are not compatible with the PinePhone Pro.}}&lt;br /&gt;
&lt;br /&gt;
=== Boot order ===&lt;br /&gt;
&lt;br /&gt;
The RK3399S processor in the PinePhone Pro searches for the bootloader (such as ''U-Boot'' or ''Tow-Boot'') in the following order:&lt;br /&gt;
&lt;br /&gt;
# SPI flash&lt;br /&gt;
# eMMC (the internal memory)&lt;br /&gt;
# MicroSD card&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card temporarily ====&lt;br /&gt;
&lt;br /&gt;
To temporarily boot from an inserted '''microSD card''' do the following:&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after November 2023''' the microSD card is first in boot order due to using ''rk2aw'' instead of ''Tow-Boot'', see [https://xnux.eu/rk2aw/ here].&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while powering on the device. The batches bought after July 2022 come with ''Tow-Boot'' flashed to the SPI, which offers additional functionality over ''U-Boot'' as bootloader.&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the cover for a few seconds, while powering on the device. If the button is labeled ''RESET'' instead of ''RE'' please verify if the device is a regular [[PinePhone]] (or the Developer Edition). This is required because older batches don't ship with ''Tow-Boot'' on the SPI. Flashing ''Tow-Boot'' can be caught up by following [https://tow-boot.org/devices/pine64-pinephonePro.html this] instruction. Note: If ''Tow-Boot'' is flashed later, the microSD card can be selected at boot with the volume down key as well.&lt;br /&gt;
&lt;br /&gt;
* On the '''Developer Edition (sold to selected developers only)''' the SPI and the eMMC can be bypassed by shorting the bypass test points while booting. The process is explained in the article [[PinePhone Pro Developer Edition#Nuking the factory AOSP installation|PinePhone Pro Developer Edition]]. Please join the community chat for any questions regarding the process.&lt;br /&gt;
&lt;br /&gt;
The RE button disables the SPI and the eMMC at the hardware level while the button is held and the PinePhone Pro will try to boot from the next available boot medium, which is the microSD card. Note: When holding the ''RE'' button (or when shorting the contact points in case of the ''Developer Edition'') for a longer time at boot the operating system will not initialize the SPI and eMMC and it will not be possible to write to these storage mediums until the next reboot.&lt;br /&gt;
&lt;br /&gt;
{{Template:Info|The bootloader uses its own boot order for loading the kernel and other core operating system components at boot, which for example may result in the boot loader residing on the eMMC loading and booting the kernel from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card permanently ====&lt;br /&gt;
&lt;br /&gt;
The bootloader (such as ''U-Boot'') resides in the free space in front of the first partition. Wiping the bootloader from the eMMC to make the PinePhone Pro boot from microSD card can be done using &amp;lt;code&amp;gt;sudo dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/dev/mmcblk2 seek&amp;amp;#61;64 count&amp;amp;#61;400 conv&amp;amp;#61;fsync&amp;lt;/code&amp;gt;. Formatting the drive or deleting the partition table is not sufficient to wipe the bootloader.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
If you received your device after July of 2022, the bootloader resides on the SPI.&lt;br /&gt;
&lt;br /&gt;
See [[RK3399 boot sequence]] for further details regarding the boot sequence.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The software releases can be installed (the process is being referred to as ''flashing'') to the eMMC or to an microSD card.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to microSD card ====&lt;br /&gt;
To install an image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download a compatible image from [[PinePhone Pro Software Releases]].&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Write the image to your microSD card using your favorite method, examples:&lt;br /&gt;
#* Using ''dd'': On the device you're flashing the microSD card from, find the correct device under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; and then flash the image to the microSD card using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;. Make sure the target is the whole microSD card and not its first partition (''sdc1'' or ''mmcblk0p1'' are wrong!).&lt;br /&gt;
#* Using ''bmaptool'': Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run bmaptool with the correct device: Download the ''IMAGE.xz'' and the ''IMAGE.bmap'' files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap '''IMAGE.bmap''' '''IMAGE.xz''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;. This takes around 2.5 minutes to flash a 4 GB file.&lt;br /&gt;
#* Using ''a graphical tool'': A graphical tool such as Gnome Disks under Linux or Etcher under Windows may also be used.&lt;br /&gt;
# Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore, see [[:File:Pinephone_slots.png|here]].&lt;br /&gt;
# Boot the device using the following method:&lt;br /&gt;
#* On the '''Explorer Edition ordered after November 2023''' boot the phone without any further action.&lt;br /&gt;
#* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while booting.&lt;br /&gt;
#* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the back cover while booting (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
#* On the '''Developer Edition (sold to selected developers only)''' apply the bypass by shorting the testing pads while booting according to the datasheet (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
&lt;br /&gt;
Details regarding the boot order can be found in the [[PinePhone Pro#Boot order|Boot order]] section.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to the eMMC ====&lt;br /&gt;
Flashing to the eMMC (the internal memory of the PinePhone Pro) can either be done using ''Tow-Boot'''s USB Mass Storage mode (see [[#Boot order]] if you are unsure if the device comes with Tow-Bot pre-installed) or by booting an operating system from the microSD card (see the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]) and by writing to the eMMC directly from there:&lt;br /&gt;
&lt;br /&gt;
By using Tow-Boot:&lt;br /&gt;
&lt;br /&gt;
# Power off the device&lt;br /&gt;
# Power on the device and hold the ''volume up'' key before and during the second vibration&lt;br /&gt;
# The LED will turn blue if done successfully. This will only work if Tow-Boot is installed&lt;br /&gt;
# When connecting the device to a computer via USB it will behave like an USB drive now&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;, the output might look like the following:&lt;br /&gt;
#: '''''mmcblk2'''      179:0    0 115.2G  0 disk''&lt;br /&gt;
#: ''├─mmcblk2p1  179:1    0   122M  0 part /boot''&lt;br /&gt;
#: ''└─mmcblk2p2  179:2    0 115.1G  0 part /''&lt;br /&gt;
#: {{Info|In this example, '''/dev/mmcblk2''' is the device, while ''mmcblk2p1'' and ''mmcblk2p2'' are partitions of the device. The downloaded images are images from full devices, which means that the full device (''mmcblk2'' in this example) needs to be flashed. Ignore the partitions!}}&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''DEVICE''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'' and replace ''DEVICE'' with the correct device from the ''lsblk'' command)&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
By booting a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Boot an operating system [[PinePhone Pro#Flashing to microSD card|from the microSD card]]. If there is already a bootloader on the eMMC installed see the section [[PinePhone Pro#Boot order|Boot order]] to bypass it.&lt;br /&gt;
# Download or copy the desired image to the microSD card as file&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. If it doesn't appear in the output of the command, the eMMC wasn't initialized due to applying the above explained bypass method for a too long time during the boot&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/mmcblk2 bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'').&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone Pro is not booting (either booting incompletely into a boot splash or tty or if the PinePhone Pro is showing no signs of life) this will typically have the following two reasons:&lt;br /&gt;
&lt;br /&gt;
==== The battery is fully drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is drained then the board can reset during boot causing a boot loop because of undervoltage condition. It can happen on all stages of the boot including ''U-Boot'' bootloader, display initialization and USB (re-)configuration. In that case it is not possible to charge the phone. The battery can be charged by interrupting the boot loop by booting the PinePhone Pro into ''Maskrom mode'' or by charging the battery externally. It is possible to follow these instructions without a computer by using a wall charger, however it would not be possible to determine if Maskrom mode was started successfully. To boot the PinePhone Pro into ''Maskrom mode'':&lt;br /&gt;
&lt;br /&gt;
* Remove any microSD card from the phone and keep it removed for the below procedure&lt;br /&gt;
* Remove the battery, any USB cable and any serial cable&lt;br /&gt;
* Reinsert the battery&lt;br /&gt;
* Hold the ''RE'' button underneath the back cover of your ''Explorer Edition'' (or short the bypass contact points on the ''Developer Edition'') &lt;br /&gt;
{{Info|Confirm that the label of the button says ''RE'' and not ''RESET''! If the button label says ''RESET'' instead you probably have a regular PinePhone and you're reading the wrong page.}}&lt;br /&gt;
* Connect the phone to an USB port of a computer, while still holding the button for some time&lt;br /&gt;
* Confirm if the phone was booted in Maskrom mode:&lt;br /&gt;
** On ''Linux'' check if the Maskrom mode appears as device in the output of the terminal command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; on the computer, the expected ''VID:PID'' of the device is ''2207:330c''.&lt;br /&gt;
** On ''Windows'' this can be checked using the ''Device Manager'' and checking the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; of an ''Unknown device'' appears.&lt;br /&gt;
** On ''macOS'' this can be checked in ''/Applications/Utilities/System Information.app'' under ''USB'' and by checking if the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; is appearing for a ''Composite Device''.&lt;br /&gt;
* Let the phone charge for multiple hours&lt;br /&gt;
&lt;br /&gt;
{{Info|If the device doesn't appear under ''lsusb'' please try again with a different known good USB-C cable and make sure that there is no microSD card in the phone inserted.}}&lt;br /&gt;
&lt;br /&gt;
The device should now be able to boot from the boot medium again. If that is not the case the installation got corrupted, as explained below.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted ====&lt;br /&gt;
The PinePhone Pro won't be able to boot if the installation on the SPI flash, the eMMC or the microSD card got corrupted. To boot a working operating system:&lt;br /&gt;
&lt;br /&gt;
* Prepare a microSD card as explained in the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]&lt;br /&gt;
* Remove any USB-C cable or device or add-on case from the PinePhone Pro&lt;br /&gt;
* Make sure the device is powered off by shortly removing the battery for a second&lt;br /&gt;
* Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore.&lt;br /&gt;
* Power on the device (bypassing the SPI and eMMC might be required, see [[PinePhone Pro#Boot order|Boot order]])&lt;br /&gt;
&lt;br /&gt;
The device should now boot from the microSD card. If the phone does not boot from the microSD card the microSD card was flashed with an incompatible image or the battery got drained as explained above.&lt;br /&gt;
&lt;br /&gt;
=== Bootloaders ===&lt;br /&gt;
The following section contains notes regarding compatible bootloaders with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
==== U-Boot ====&lt;br /&gt;
The pre-installed operating system on the PinePhone Pro Explorer Edition, if sold prior to the end of July of 2022, is using [[U-Boot]] as default bootloader. Batches sold after July of 2022 are using ''Tow-Boot''&lt;br /&gt;
&lt;br /&gt;
==== Tow-Boot ====&lt;br /&gt;
Current batches of the PinePhone Pro ship with ''Tow-Boot'' pre-installed to the SPI flash, which is an opinionated distribution of ''U-Boot'' and brings numerous advantages over stock ''U-Boot'', such as the possibility to choose from booting the eMMC or microSD card using the volume buttons during boot, as well as a ''USB Mass Storage mode'', where the device can be written to by connecting the device to a computer via USB.&lt;br /&gt;
&lt;br /&gt;
The user can flash Tow-Boot to the PinePhone Pro using the [https://tow-boot.org/devices/pine64-pinephonePro.html instructions on the Tow-Boot website].&lt;br /&gt;
&lt;br /&gt;
==== levinboot ====&lt;br /&gt;
The levinboot bootloader is another option for the PinePhone Pro. The project repository can be found [https://gitlab.com/DeltaGem/levinboot/-/tree/master/ here]. (Pinephone Pro supporting fork is [https://xff.cz/git/levinboot/ here].)&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART¹ mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Note: The baud rate may be 1500000 instead of 115200.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used. &lt;br /&gt;
&lt;br /&gt;
''atinout'' example:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
''minicom'' example:&lt;br /&gt;
&lt;br /&gt;
 minicom -D /dev/ttyUSB2&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone and PinePhone Pro modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
 AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1,1&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to power off the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone Pro. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone and PinePhone Pro modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the documentation section.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone Pro has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone Pro may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.8 x 76.6 x 11.1mm&lt;br /&gt;
* '''Weight:''' Approx. 220g&lt;br /&gt;
* '''SIM Card:''' Nano-SIM (Micro-SIM before 07/2022)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 6 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' 1440 x 720 in-cell IPS with Gorilla Glass 4™&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' Rockchip RK3399S 64bit SoC – 2x A72 and 4x A53 CPU cores @ 1.5GHz&lt;br /&gt;
* '''RAM:''' 4GB LPDDR4 @ 800MHz&lt;br /&gt;
* '''Internal Storage:''' 128GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''NOR Flash:''' Listed as [GigaDevices] GD25LQ128EWIGR, but physical inspection found a SiliconKaiser SK25LP128.&lt;br /&gt;
* '''Back Camera:''' 13MP Sony IMX258 with Gorilla Glass 4™ protective layer, LED Flash&lt;br /&gt;
* '''Front Camera:''' 8MP, OmniVision OV8858 front-facing camera&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN &amp;amp; Bluetooth:''' Wi-Fi 802.11AC, hotspot capable + Bluetooth V5.0&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery; unglue bottom black plastic with your nail from Samsung battery before installation in order to match the dimensions)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
Most parts are available from the [https://pine64.com/product-category/pinephonepro-spare-parts/ Pine store]. Take care to use this link to avoid unintentionally ordering parts for the original PinePhone instead.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the mainboard ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced if it is faulty. The replacement board does not have an operating system pre-installed, to test if everything is working after swapping the mainboard a flashed SD card is required.&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an operating system from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone Pro’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the mainboard.&lt;br /&gt;
# Remove the phone's back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone, including the screw under the warranty sticker.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio and UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; for the regular PinePhone can be found [https://www.youtube.com/watch?v=5GbMoZ_zuZs here] or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here].&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Replacing the mainboard|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a silver-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the Pine Store ===&lt;br /&gt;
&lt;br /&gt;
The following parts are not available on the Pine Store for the '''regular PinePhone'''. The replacements are listed below and have not been validated for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Himax HX8394 compatible&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| IMX258&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| OV8858&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| AW3641EDNR&lt;br /&gt;
|-&lt;br /&gt;
| WiFi + Bluetooth&lt;br /&gt;
| [https://www.azurewave.com/img/wireless-modules/AW_CM256SM_DS_Rev15_CYW.pdf AzureWave AW-CM256SM]&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;3 Axis Magnetometer&amp;lt;/s&amp;gt;&lt;br /&gt;
| &amp;lt;s&amp;gt;[https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL]&amp;lt;/s&amp;gt; '''''Note:''''' The ''AF8133J'' is used instead.&lt;br /&gt;
|-&lt;br /&gt;
| Geo Magnetic Sensor&lt;br /&gt;
| [http://www.voltafield.com/products01.html Voltafield AF8133J]&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| STK3311-A&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| [https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6500/ TDK MPU-6500]&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec&lt;br /&gt;
| ALC5616 and ALC5640&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| [https://rockchip.fr/RK818%20datasheet%20V1.0.pdf RK818]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf PinePhone Pro mainboard Explorer Edition Released Schematic ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-top.pdf PinePhone Pro mainboard Explorer Edition component top placement ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-bottom.pdf PinePhone Pro mainboard Explorer Edition component bottom placement ver 1.0 20211127]&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro USB-C small board schematic:&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20FCC%20Certificate-S21101902805001.pdf PinePhone Pro FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20SAR%20Evaluation%20Report-S21101902806001.pdf PinePhone Pro SAR Evaluation Report]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20CE%20RED%20Certificate-S21101902802-R1.pdf PinePhone Pro CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20RoHS%20Test%20Report.pdf PinePhone Pro ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Factory Test Build for Hardware Checking ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-5.jpg|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by the support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, take out the PinePhone Pro Explorer Edition, then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press the RE button (bypass SPI and eMMC boot) underneath the back cover while plugging in the USB-C power. After 3 seconds release the RE button. &lt;br /&gt;
* When powering up, a battery icon screen will show up blow, press power key for two seconds, then the Rockchip logo screen shows up.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]][[File:PPP_Abdroid_Test_Utility-2.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Wait for the home screen, double tap on the test app icon (mark red circuit) and this will bring up the factory test screen. Please note that the SD test is disabled due in this is SD boot build.&lt;br /&gt;
* After running a particular test function, please snapshot the test result and pass it back to support team&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Please insert a functional SIM card when performing the SIM test&lt;br /&gt;
* When perform GPS test, the first result may fail and please ignore this false message.&lt;br /&gt;
* For light sensing test, please have a light shine to the PinePhone Pro when performing the test.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-4.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Factory Test Build for Battery charging ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and battery will start charging. &lt;br /&gt;
* The battery icon display for few seconds and then LCD panel turn off while charging. To check charging status, just quick press power button (about 0.5 second) and battery icon will display progress.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone Pro you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/pinephonepro/ Product Page]&lt;br /&gt;
* [https://www.youtube.com/watch?v=wP2-6Z74W44 Announcement video]&lt;br /&gt;
* [https://www.pine64.org/2021/10/15/october-update-introducing-the-pinephone-pro/ Blog post] with the announcement&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]][[Category:Rockchip RK3399]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21188</id>
		<title>PinePhone Pro</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21188"/>
		<updated>2023-12-21T21:29:30Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Flashing to microSD card */ +1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinephone_double.png|400px|thumb|right|Rendering of the PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone Pro''' is PINE64's flagship smartphone announced on October 15, 2021. It features 4GB of RAM, an 128GB eMMC and is using an Rockchip RK3399S SoC, which is a specialized version of the RK3399 made specifically for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone Pro is PINE64’s second smartphone and a successor to the original PinePhone. It does not, however, replace the original PinePhone. It should also not be considered a second generation PinePhone; it is a higher-end device, with much better specs, aimed at those who wish to daily-drive a open system stack. Achieving this goal will, however, take time as the software and overall smartphone software ecosystem needs to mature.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&amp;lt;sup&amp;gt;([[PinePhone Pro Software State|view separately]])&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:PinePhone Pro Software State}}&lt;br /&gt;
&lt;br /&gt;
=== Editions and revisions ===&lt;br /&gt;
Similarly to the original PinePhone, various PinePhone Pro editions are planned, the first of which is the Developer Edition (aimed at developers, as the name entails) followed by the Explorer Edition, which is aimed at early adopters.&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone Pro Developer Edition]]&lt;br /&gt;
* PinePhone Pro Explorer Edition&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this Wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time setup ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again. &lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot. Devices shipped after the end of July 2022 do only accept a nano-SIM, the SIM is inserted into a carriage released by slightly pulling on the handle in the lower slot (for information regarding devices shipped prior to end of July 2022 see below).&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the SIM card in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
{{Info|Information regarding devices shipped prior to end of July 2022: The PinePhone Pros shipped prior to the end of July 2022 come with a micro-SIM slot instead of a nano-SIM slot. Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. &amp;lt;br&amp;gt; If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The software section explains how to install the available software releases for the PinePhone Pro to the internal eMMC or a microSD card, how to boot them and how to solve common booting issues.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Pro Software Releases]] page has a complete list of currently supported phone-optimized operating system images that work with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
{{Info|Images of the regular PinePhone are not compatible with the PinePhone Pro.}}&lt;br /&gt;
&lt;br /&gt;
=== Boot order ===&lt;br /&gt;
&lt;br /&gt;
The RK3399S processor in the PinePhone Pro searches for the bootloader (such as ''U-Boot'' or ''Tow-Boot'') in the following order:&lt;br /&gt;
&lt;br /&gt;
# SPI flash&lt;br /&gt;
# eMMC (the internal memory)&lt;br /&gt;
# MicroSD card&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card temporarily ====&lt;br /&gt;
&lt;br /&gt;
To temporarily boot from an inserted '''microSD card''' do the following:&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after November 2023''' the microSD card is first in boot order due to using ''rk2aw'' instead of ''Tow-Boot'', see [https://xnux.eu/rk2aw/ here].&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while powering on the device. The batches bought after July 2022 come with ''Tow-Boot'' flashed to the SPI, which offers additional functionality over ''U-Boot'' as bootloader.&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the cover for a few seconds, while powering on the device. If the button is labeled ''RESET'' instead of ''RE'' please verify if the device is a regular [[PinePhone]] (or the Developer Edition). This is required because older batches don't ship with ''Tow-Boot'' on the SPI. Flashing ''Tow-Boot'' can be caught up by following [https://tow-boot.org/devices/pine64-pinephonePro.html this] instruction. Note: If ''Tow-Boot'' is flashed later, the microSD card can be selected at boot with the volume down key as well.&lt;br /&gt;
&lt;br /&gt;
* On the '''Developer Edition (sold to selected developers only)''' the SPI and the eMMC can be bypassed by shorting the bypass test points while booting. The process is explained in the article [[PinePhone Pro Developer Edition#Nuking the factory AOSP installation|PinePhone Pro Developer Edition]]. Please join the community chat for any questions regarding the process.&lt;br /&gt;
&lt;br /&gt;
The RE button disables the SPI and the eMMC at the hardware level while the button is held and the PinePhone Pro will try to boot from the next available boot medium, which is the microSD card. Note: When holding the ''RE'' button (or when shorting the contact points in case of the ''Developer Edition'') for a longer time at boot the operating system will not initialize the SPI and eMMC and it will not be possible to write to these storage mediums until the next reboot.&lt;br /&gt;
&lt;br /&gt;
{{Template:Info|The bootloader uses its own boot order for loading the kernel and other core operating system components at boot, which for example may result in the boot loader residing on the eMMC loading and booting the kernel from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card permanently ====&lt;br /&gt;
&lt;br /&gt;
The bootloader (such as ''U-Boot'') resides in the free space in front of the first partition. Wiping the bootloader from the eMMC to make the PinePhone Pro boot from microSD card can be done using &amp;lt;code&amp;gt;sudo dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/dev/mmcblk2 seek&amp;amp;#61;64 count&amp;amp;#61;400 conv&amp;amp;#61;fsync&amp;lt;/code&amp;gt;. Formatting the drive or deleting the partition table is not sufficient to wipe the bootloader.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
If you received your device after July of 2022, the bootloader resides on the SPI.&lt;br /&gt;
&lt;br /&gt;
See [[RK3399 boot sequence]] for further details regarding the boot sequence.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The software releases can be installed (the process is being referred to as ''flashing'') to the eMMC or to an microSD card.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to microSD card ====&lt;br /&gt;
To install an image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download a compatible image from [[PinePhone Pro Software Releases]].&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Write the image to your microSD card using your favorite method, examples:&lt;br /&gt;
#* Using ''dd'': On the device you're flashing the microSD card from, find the correct device under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; and then flash the image to the microSD card using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;. Make sure the target is the whole microSD card and not its first partition (''sdc1'' or ''mmcblk0p1'' are wrong!).&lt;br /&gt;
#* Using ''bmaptool'': Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run bmaptool with the correct device: Download the ''IMAGE.xz'' and the ''IMAGE.bmap'' files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap '''IMAGE.bmap''' '''IMAGE.xz''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;. This takes around 2.5 minutes to flash a 4 GB file.&lt;br /&gt;
#* Using ''a graphical tool'': A graphical tool such as Gnome Disks under Linux or Etcher under Windows may also be used.&lt;br /&gt;
# Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore, see [[:File:Pinephone_slots.png|here]].&lt;br /&gt;
# Boot the device using the following method:&lt;br /&gt;
#* On the '''Explorer Edition ordered after November 2023''' boot the phone without any further action.&lt;br /&gt;
#* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while booting.&lt;br /&gt;
#* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the back cover while booting (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
#* On the '''Developer Edition (sold to selected developers only)''' apply the bypass by shorting the testing pads while booting according to the datasheet (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
&lt;br /&gt;
Details regarding the boot order can be found in the [[PinePhone Pro#Boot order|Boot order]] section.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to the eMMC ====&lt;br /&gt;
Flashing to the eMMC (the internal memory of the PinePhone Pro) can either be done using ''Tow-Boot'''s USB Mass Storage mode (see [[#Boot order]] if you are unsure if the device comes with Tow-Bot pre-installed) or by booting an operating system from the microSD card (see the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]) and by writing to the eMMC directly from there:&lt;br /&gt;
&lt;br /&gt;
By using Tow-Boot:&lt;br /&gt;
&lt;br /&gt;
# Power off the device&lt;br /&gt;
# Power on the device and hold the ''volume up'' key before and during the second vibration&lt;br /&gt;
# The LED will turn blue if done successfully. This will only work if Tow-Boot is installed&lt;br /&gt;
# When connecting the device to a computer via USB it will behave like an USB drive now&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;, the output might look like the following:&lt;br /&gt;
#: '''''mmcblk2'''      179:0    0 115.2G  0 disk''&lt;br /&gt;
#: ''├─mmcblk2p1  179:1    0   122M  0 part /boot''&lt;br /&gt;
#: ''└─mmcblk2p2  179:2    0 115.1G  0 part /''&lt;br /&gt;
#: {{Info|In this example, '''/dev/mmcblk2''' is the device, while ''mmcblk2p1'' and ''mmcblk2p2'' are partitions of the device. The downloaded images are images from full devices, which means that the full device (''mmcblk2'' in this example) needs to be flashed. Ignore the partitions!}}&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''DEVICE''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'' and replace ''DEVICE'' with the correct device from the ''lsblk'' command)&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
By booting a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Boot an operating system [[PinePhone Pro#Flashing to microSD card|from the microSD card]]. If there is already a bootloader on the eMMC installed see the section [[PinePhone Pro#Boot order|Boot order]] to bypass it.&lt;br /&gt;
# Download or copy the desired image to the microSD card as file&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. If it doesn't appear in the output of the command, the eMMC wasn't initialized due to applying the above explained bypass method for a too long time during the boot&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/mmcblk2 bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'').&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone Pro is not booting (either booting incompletely into a boot splash or tty or if the PinePhone Pro is showing no signs of life) this will typically have the following two reasons:&lt;br /&gt;
&lt;br /&gt;
==== The battery is fully drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is drained then the board can reset during boot causing a boot loop because of undervoltage condition. It can happen on all stages of the boot including ''U-Boot'' bootloader, display initialization and USB (re-)configuration. In that case it is not possible to charge the phone. The battery can be charged by interrupting the boot loop by booting the PinePhone Pro into ''Maskrom mode'' or by charging the battery externally. It is possible to follow these instructions without a computer by using a wall charger, however it would not be possible to determine if Maskrom mode was started successfully. To boot the PinePhone Pro into ''Maskrom mode'':&lt;br /&gt;
&lt;br /&gt;
* Remove any microSD card from the phone and keep it removed for the below procedure&lt;br /&gt;
* Remove the battery, any USB cable and any serial cable&lt;br /&gt;
* Reinsert the battery&lt;br /&gt;
* Hold the ''RE'' button underneath the back cover of your ''Explorer Edition'' (or short the bypass contact points on the ''Developer Edition'') &lt;br /&gt;
{{Info|Confirm that the label of the button says ''RE'' and not ''RESET''! If the button label says ''RESET'' instead you probably have a regular PinePhone and you're reading the wrong page.}}&lt;br /&gt;
* Connect the phone to an USB port of a computer, while still holding the button for some time&lt;br /&gt;
* Confirm if the phone was booted in Maskrom mode:&lt;br /&gt;
** On ''Linux'' check if the Maskrom mode appears as device in the output of the terminal command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; on the computer, the expected ''VID:PID'' of the device is ''2207:330c''.&lt;br /&gt;
** On ''Windows'' this can be checked using the ''Device Manager'' and checking the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; of an ''Unknown device'' appears.&lt;br /&gt;
** On ''macOS'' this can be checked in ''/Applications/Utilities/System Information.app'' under ''USB'' and by checking if the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; is appearing for a ''Composite Device''.&lt;br /&gt;
* Let the phone charge for multiple hours&lt;br /&gt;
&lt;br /&gt;
{{Info|If the device doesn't appear under ''lsusb'' please try again with a different known good USB-C cable and make sure that there is no microSD card in the phone inserted.}}&lt;br /&gt;
&lt;br /&gt;
The device should now be able to boot from the boot medium again. If that is not the case the installation got corrupted, as explained below.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted ====&lt;br /&gt;
The PinePhone Pro won't be able to boot if the installation on the SPI flash, the eMMC or the microSD card got corrupted. To boot a working operating system:&lt;br /&gt;
&lt;br /&gt;
* Prepare a microSD card as explained in the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]&lt;br /&gt;
* Remove any USB-C cable or device or add-on case from the PinePhone Pro&lt;br /&gt;
* Make sure the device is powered off by shortly removing the battery for a second&lt;br /&gt;
* Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore.&lt;br /&gt;
* Power on the device while bypassing the SPI and eMMC as explained under [[PinePhone Pro#Boot order|Boot order]]&lt;br /&gt;
&lt;br /&gt;
The device should now boot from the microSD card. If the phone does not boot from the microSD card the microSD card was flashed with an incompatible image or the battery got drained as explained above.&lt;br /&gt;
&lt;br /&gt;
=== Bootloaders ===&lt;br /&gt;
The following section contains notes regarding compatible bootloaders with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
==== U-Boot ====&lt;br /&gt;
The pre-installed operating system on the PinePhone Pro Explorer Edition, if sold prior to the end of July of 2022, is using [[U-Boot]] as default bootloader. Batches sold after July of 2022 are using ''Tow-Boot''&lt;br /&gt;
&lt;br /&gt;
==== Tow-Boot ====&lt;br /&gt;
Current batches of the PinePhone Pro ship with ''Tow-Boot'' pre-installed to the SPI flash, which is an opinionated distribution of ''U-Boot'' and brings numerous advantages over stock ''U-Boot'', such as the possibility to choose from booting the eMMC or microSD card using the volume buttons during boot, as well as a ''USB Mass Storage mode'', where the device can be written to by connecting the device to a computer via USB.&lt;br /&gt;
&lt;br /&gt;
The user can flash Tow-Boot to the PinePhone Pro using the [https://tow-boot.org/devices/pine64-pinephonePro.html instructions on the Tow-Boot website].&lt;br /&gt;
&lt;br /&gt;
==== levinboot ====&lt;br /&gt;
The levinboot bootloader is another option for the PinePhone Pro. The project repository can be found [https://gitlab.com/DeltaGem/levinboot/-/tree/master/ here]. (Pinephone Pro supporting fork is [https://xff.cz/git/levinboot/ here].)&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART¹ mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Note: The baud rate may be 1500000 instead of 115200.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used. &lt;br /&gt;
&lt;br /&gt;
''atinout'' example:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
''minicom'' example:&lt;br /&gt;
&lt;br /&gt;
 minicom -D /dev/ttyUSB2&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone and PinePhone Pro modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
 AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1,1&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to power off the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone Pro. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone and PinePhone Pro modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the documentation section.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone Pro has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone Pro may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.8 x 76.6 x 11.1mm&lt;br /&gt;
* '''Weight:''' Approx. 220g&lt;br /&gt;
* '''SIM Card:''' Nano-SIM (Micro-SIM before 07/2022)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 6 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' 1440 x 720 in-cell IPS with Gorilla Glass 4™&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' Rockchip RK3399S 64bit SoC – 2x A72 and 4x A53 CPU cores @ 1.5GHz&lt;br /&gt;
* '''RAM:''' 4GB LPDDR4 @ 800MHz&lt;br /&gt;
* '''Internal Storage:''' 128GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''NOR Flash:''' Listed as [GigaDevices] GD25LQ128EWIGR, but physical inspection found a SiliconKaiser SK25LP128.&lt;br /&gt;
* '''Back Camera:''' 13MP Sony IMX258 with Gorilla Glass 4™ protective layer, LED Flash&lt;br /&gt;
* '''Front Camera:''' 8MP, OmniVision OV8858 front-facing camera&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN &amp;amp; Bluetooth:''' Wi-Fi 802.11AC, hotspot capable + Bluetooth V5.0&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery; unglue bottom black plastic with your nail from Samsung battery before installation in order to match the dimensions)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
Most parts are available from the [https://pine64.com/product-category/pinephonepro-spare-parts/ Pine store]. Take care to use this link to avoid unintentionally ordering parts for the original PinePhone instead.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the mainboard ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced if it is faulty. The replacement board does not have an operating system pre-installed, to test if everything is working after swapping the mainboard a flashed SD card is required.&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an operating system from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone Pro’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the mainboard.&lt;br /&gt;
# Remove the phone's back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone, including the screw under the warranty sticker.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio and UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; for the regular PinePhone can be found [https://www.youtube.com/watch?v=5GbMoZ_zuZs here] or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here].&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Replacing the mainboard|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a silver-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the Pine Store ===&lt;br /&gt;
&lt;br /&gt;
The following parts are not available on the Pine Store for the '''regular PinePhone'''. The replacements are listed below and have not been validated for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Himax HX8394 compatible&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| IMX258&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| OV8858&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| AW3641EDNR&lt;br /&gt;
|-&lt;br /&gt;
| WiFi + Bluetooth&lt;br /&gt;
| [https://www.azurewave.com/img/wireless-modules/AW_CM256SM_DS_Rev15_CYW.pdf AzureWave AW-CM256SM]&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;3 Axis Magnetometer&amp;lt;/s&amp;gt;&lt;br /&gt;
| &amp;lt;s&amp;gt;[https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL]&amp;lt;/s&amp;gt; '''''Note:''''' The ''AF8133J'' is used instead.&lt;br /&gt;
|-&lt;br /&gt;
| Geo Magnetic Sensor&lt;br /&gt;
| [http://www.voltafield.com/products01.html Voltafield AF8133J]&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| STK3311-A&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| [https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6500/ TDK MPU-6500]&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec&lt;br /&gt;
| ALC5616 and ALC5640&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| [https://rockchip.fr/RK818%20datasheet%20V1.0.pdf RK818]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf PinePhone Pro mainboard Explorer Edition Released Schematic ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-top.pdf PinePhone Pro mainboard Explorer Edition component top placement ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-bottom.pdf PinePhone Pro mainboard Explorer Edition component bottom placement ver 1.0 20211127]&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro USB-C small board schematic:&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20FCC%20Certificate-S21101902805001.pdf PinePhone Pro FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20SAR%20Evaluation%20Report-S21101902806001.pdf PinePhone Pro SAR Evaluation Report]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20CE%20RED%20Certificate-S21101902802-R1.pdf PinePhone Pro CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20RoHS%20Test%20Report.pdf PinePhone Pro ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Factory Test Build for Hardware Checking ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-5.jpg|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by the support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, take out the PinePhone Pro Explorer Edition, then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press the RE button (bypass SPI and eMMC boot) underneath the back cover while plugging in the USB-C power. After 3 seconds release the RE button. &lt;br /&gt;
* When powering up, a battery icon screen will show up blow, press power key for two seconds, then the Rockchip logo screen shows up.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]][[File:PPP_Abdroid_Test_Utility-2.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Wait for the home screen, double tap on the test app icon (mark red circuit) and this will bring up the factory test screen. Please note that the SD test is disabled due in this is SD boot build.&lt;br /&gt;
* After running a particular test function, please snapshot the test result and pass it back to support team&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Please insert a functional SIM card when performing the SIM test&lt;br /&gt;
* When perform GPS test, the first result may fail and please ignore this false message.&lt;br /&gt;
* For light sensing test, please have a light shine to the PinePhone Pro when performing the test.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-4.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Factory Test Build for Battery charging ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and battery will start charging. &lt;br /&gt;
* The battery icon display for few seconds and then LCD panel turn off while charging. To check charging status, just quick press power button (about 0.5 second) and battery icon will display progress.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone Pro you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/pinephonepro/ Product Page]&lt;br /&gt;
* [https://www.youtube.com/watch?v=wP2-6Z74W44 Announcement video]&lt;br /&gt;
* [https://www.pine64.org/2021/10/15/october-update-introducing-the-pinephone-pro/ Blog post] with the announcement&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]][[Category:Rockchip RK3399]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21187</id>
		<title>PinePhone Pro</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21187"/>
		<updated>2023-12-21T21:28:40Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Notes */ Removed outdated instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinephone_double.png|400px|thumb|right|Rendering of the PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone Pro''' is PINE64's flagship smartphone announced on October 15, 2021. It features 4GB of RAM, an 128GB eMMC and is using an Rockchip RK3399S SoC, which is a specialized version of the RK3399 made specifically for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone Pro is PINE64’s second smartphone and a successor to the original PinePhone. It does not, however, replace the original PinePhone. It should also not be considered a second generation PinePhone; it is a higher-end device, with much better specs, aimed at those who wish to daily-drive a open system stack. Achieving this goal will, however, take time as the software and overall smartphone software ecosystem needs to mature.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&amp;lt;sup&amp;gt;([[PinePhone Pro Software State|view separately]])&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:PinePhone Pro Software State}}&lt;br /&gt;
&lt;br /&gt;
=== Editions and revisions ===&lt;br /&gt;
Similarly to the original PinePhone, various PinePhone Pro editions are planned, the first of which is the Developer Edition (aimed at developers, as the name entails) followed by the Explorer Edition, which is aimed at early adopters.&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone Pro Developer Edition]]&lt;br /&gt;
* PinePhone Pro Explorer Edition&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this Wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time setup ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again. &lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot. Devices shipped after the end of July 2022 do only accept a nano-SIM, the SIM is inserted into a carriage released by slightly pulling on the handle in the lower slot (for information regarding devices shipped prior to end of July 2022 see below).&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the SIM card in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
{{Info|Information regarding devices shipped prior to end of July 2022: The PinePhone Pros shipped prior to the end of July 2022 come with a micro-SIM slot instead of a nano-SIM slot. Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. &amp;lt;br&amp;gt; If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The software section explains how to install the available software releases for the PinePhone Pro to the internal eMMC or a microSD card, how to boot them and how to solve common booting issues.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Pro Software Releases]] page has a complete list of currently supported phone-optimized operating system images that work with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
{{Info|Images of the regular PinePhone are not compatible with the PinePhone Pro.}}&lt;br /&gt;
&lt;br /&gt;
=== Boot order ===&lt;br /&gt;
&lt;br /&gt;
The RK3399S processor in the PinePhone Pro searches for the bootloader (such as ''U-Boot'' or ''Tow-Boot'') in the following order:&lt;br /&gt;
&lt;br /&gt;
# SPI flash&lt;br /&gt;
# eMMC (the internal memory)&lt;br /&gt;
# MicroSD card&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card temporarily ====&lt;br /&gt;
&lt;br /&gt;
To temporarily boot from an inserted '''microSD card''' do the following:&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after November 2023''' the microSD card is first in boot order due to using ''rk2aw'' instead of ''Tow-Boot'', see [https://xnux.eu/rk2aw/ here].&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while powering on the device. The batches bought after July 2022 come with ''Tow-Boot'' flashed to the SPI, which offers additional functionality over ''U-Boot'' as bootloader.&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the cover for a few seconds, while powering on the device. If the button is labeled ''RESET'' instead of ''RE'' please verify if the device is a regular [[PinePhone]] (or the Developer Edition). This is required because older batches don't ship with ''Tow-Boot'' on the SPI. Flashing ''Tow-Boot'' can be caught up by following [https://tow-boot.org/devices/pine64-pinephonePro.html this] instruction. Note: If ''Tow-Boot'' is flashed later, the microSD card can be selected at boot with the volume down key as well.&lt;br /&gt;
&lt;br /&gt;
* On the '''Developer Edition (sold to selected developers only)''' the SPI and the eMMC can be bypassed by shorting the bypass test points while booting. The process is explained in the article [[PinePhone Pro Developer Edition#Nuking the factory AOSP installation|PinePhone Pro Developer Edition]]. Please join the community chat for any questions regarding the process.&lt;br /&gt;
&lt;br /&gt;
The RE button disables the SPI and the eMMC at the hardware level while the button is held and the PinePhone Pro will try to boot from the next available boot medium, which is the microSD card. Note: When holding the ''RE'' button (or when shorting the contact points in case of the ''Developer Edition'') for a longer time at boot the operating system will not initialize the SPI and eMMC and it will not be possible to write to these storage mediums until the next reboot.&lt;br /&gt;
&lt;br /&gt;
{{Template:Info|The bootloader uses its own boot order for loading the kernel and other core operating system components at boot, which for example may result in the boot loader residing on the eMMC loading and booting the kernel from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card permanently ====&lt;br /&gt;
&lt;br /&gt;
The bootloader (such as ''U-Boot'') resides in the free space in front of the first partition. Wiping the bootloader from the eMMC to make the PinePhone Pro boot from microSD card can be done using &amp;lt;code&amp;gt;sudo dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/dev/mmcblk2 seek&amp;amp;#61;64 count&amp;amp;#61;400 conv&amp;amp;#61;fsync&amp;lt;/code&amp;gt;. Formatting the drive or deleting the partition table is not sufficient to wipe the bootloader.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
If you received your device after July of 2022, the bootloader resides on the SPI.&lt;br /&gt;
&lt;br /&gt;
See [[RK3399 boot sequence]] for further details regarding the boot sequence.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The software releases can be installed (the process is being referred to as ''flashing'') to the eMMC or to an microSD card.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to microSD card ====&lt;br /&gt;
To install an image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download a compatible image from [[PinePhone Pro Software Releases]].&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Write the image to your microSD card using your favorite method, examples:&lt;br /&gt;
#* Using ''dd'': On the device you're flashing the microSD card from, find the correct device under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; and then flash the image to the microSD card using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;. Make sure the target is the whole microSD card and not its first partition (''sdc1'' or ''mmcblk0p1'' are wrong!).&lt;br /&gt;
#* Using ''bmaptool'': Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run bmaptool with the correct device: Download the ''IMAGE.xz'' and the ''IMAGE.bmap'' files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap '''IMAGE.bmap''' '''IMAGE.xz''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;. This takes around 2.5 minutes to flash a 4 GB file.&lt;br /&gt;
#* Using ''a graphical tool'': A graphical tool such as Gnome Disks under Linux or Etcher under Windows may also be used.&lt;br /&gt;
# Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore, see [[:File:Pinephone_slots.png|here]].&lt;br /&gt;
# Boot the device using the following method:&lt;br /&gt;
#* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while booting.&lt;br /&gt;
#* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the back cover while booting (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
#* On the '''Developer Edition (sold to selected developers only)''' apply the bypass by shorting the testing pads while booting according to the datasheet (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
&lt;br /&gt;
Details regarding the boot order can be found in the [[PinePhone Pro#Boot order|Boot order]] section.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to the eMMC ====&lt;br /&gt;
Flashing to the eMMC (the internal memory of the PinePhone Pro) can either be done using ''Tow-Boot'''s USB Mass Storage mode (see [[#Boot order]] if you are unsure if the device comes with Tow-Bot pre-installed) or by booting an operating system from the microSD card (see the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]) and by writing to the eMMC directly from there:&lt;br /&gt;
&lt;br /&gt;
By using Tow-Boot:&lt;br /&gt;
&lt;br /&gt;
# Power off the device&lt;br /&gt;
# Power on the device and hold the ''volume up'' key before and during the second vibration&lt;br /&gt;
# The LED will turn blue if done successfully. This will only work if Tow-Boot is installed&lt;br /&gt;
# When connecting the device to a computer via USB it will behave like an USB drive now&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;, the output might look like the following:&lt;br /&gt;
#: '''''mmcblk2'''      179:0    0 115.2G  0 disk''&lt;br /&gt;
#: ''├─mmcblk2p1  179:1    0   122M  0 part /boot''&lt;br /&gt;
#: ''└─mmcblk2p2  179:2    0 115.1G  0 part /''&lt;br /&gt;
#: {{Info|In this example, '''/dev/mmcblk2''' is the device, while ''mmcblk2p1'' and ''mmcblk2p2'' are partitions of the device. The downloaded images are images from full devices, which means that the full device (''mmcblk2'' in this example) needs to be flashed. Ignore the partitions!}}&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''DEVICE''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'' and replace ''DEVICE'' with the correct device from the ''lsblk'' command)&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
By booting a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Boot an operating system [[PinePhone Pro#Flashing to microSD card|from the microSD card]]. If there is already a bootloader on the eMMC installed see the section [[PinePhone Pro#Boot order|Boot order]] to bypass it.&lt;br /&gt;
# Download or copy the desired image to the microSD card as file&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. If it doesn't appear in the output of the command, the eMMC wasn't initialized due to applying the above explained bypass method for a too long time during the boot&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/mmcblk2 bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'').&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone Pro is not booting (either booting incompletely into a boot splash or tty or if the PinePhone Pro is showing no signs of life) this will typically have the following two reasons:&lt;br /&gt;
&lt;br /&gt;
==== The battery is fully drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is drained then the board can reset during boot causing a boot loop because of undervoltage condition. It can happen on all stages of the boot including ''U-Boot'' bootloader, display initialization and USB (re-)configuration. In that case it is not possible to charge the phone. The battery can be charged by interrupting the boot loop by booting the PinePhone Pro into ''Maskrom mode'' or by charging the battery externally. It is possible to follow these instructions without a computer by using a wall charger, however it would not be possible to determine if Maskrom mode was started successfully. To boot the PinePhone Pro into ''Maskrom mode'':&lt;br /&gt;
&lt;br /&gt;
* Remove any microSD card from the phone and keep it removed for the below procedure&lt;br /&gt;
* Remove the battery, any USB cable and any serial cable&lt;br /&gt;
* Reinsert the battery&lt;br /&gt;
* Hold the ''RE'' button underneath the back cover of your ''Explorer Edition'' (or short the bypass contact points on the ''Developer Edition'') &lt;br /&gt;
{{Info|Confirm that the label of the button says ''RE'' and not ''RESET''! If the button label says ''RESET'' instead you probably have a regular PinePhone and you're reading the wrong page.}}&lt;br /&gt;
* Connect the phone to an USB port of a computer, while still holding the button for some time&lt;br /&gt;
* Confirm if the phone was booted in Maskrom mode:&lt;br /&gt;
** On ''Linux'' check if the Maskrom mode appears as device in the output of the terminal command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; on the computer, the expected ''VID:PID'' of the device is ''2207:330c''.&lt;br /&gt;
** On ''Windows'' this can be checked using the ''Device Manager'' and checking the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; of an ''Unknown device'' appears.&lt;br /&gt;
** On ''macOS'' this can be checked in ''/Applications/Utilities/System Information.app'' under ''USB'' and by checking if the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; is appearing for a ''Composite Device''.&lt;br /&gt;
* Let the phone charge for multiple hours&lt;br /&gt;
&lt;br /&gt;
{{Info|If the device doesn't appear under ''lsusb'' please try again with a different known good USB-C cable and make sure that there is no microSD card in the phone inserted.}}&lt;br /&gt;
&lt;br /&gt;
The device should now be able to boot from the boot medium again. If that is not the case the installation got corrupted, as explained below.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted ====&lt;br /&gt;
The PinePhone Pro won't be able to boot if the installation on the SPI flash, the eMMC or the microSD card got corrupted. To boot a working operating system:&lt;br /&gt;
&lt;br /&gt;
* Prepare a microSD card as explained in the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]&lt;br /&gt;
* Remove any USB-C cable or device or add-on case from the PinePhone Pro&lt;br /&gt;
* Make sure the device is powered off by shortly removing the battery for a second&lt;br /&gt;
* Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore.&lt;br /&gt;
* Power on the device while bypassing the SPI and eMMC as explained under [[PinePhone Pro#Boot order|Boot order]]&lt;br /&gt;
&lt;br /&gt;
The device should now boot from the microSD card. If the phone does not boot from the microSD card the microSD card was flashed with an incompatible image or the battery got drained as explained above.&lt;br /&gt;
&lt;br /&gt;
=== Bootloaders ===&lt;br /&gt;
The following section contains notes regarding compatible bootloaders with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
==== U-Boot ====&lt;br /&gt;
The pre-installed operating system on the PinePhone Pro Explorer Edition, if sold prior to the end of July of 2022, is using [[U-Boot]] as default bootloader. Batches sold after July of 2022 are using ''Tow-Boot''&lt;br /&gt;
&lt;br /&gt;
==== Tow-Boot ====&lt;br /&gt;
Current batches of the PinePhone Pro ship with ''Tow-Boot'' pre-installed to the SPI flash, which is an opinionated distribution of ''U-Boot'' and brings numerous advantages over stock ''U-Boot'', such as the possibility to choose from booting the eMMC or microSD card using the volume buttons during boot, as well as a ''USB Mass Storage mode'', where the device can be written to by connecting the device to a computer via USB.&lt;br /&gt;
&lt;br /&gt;
The user can flash Tow-Boot to the PinePhone Pro using the [https://tow-boot.org/devices/pine64-pinephonePro.html instructions on the Tow-Boot website].&lt;br /&gt;
&lt;br /&gt;
==== levinboot ====&lt;br /&gt;
The levinboot bootloader is another option for the PinePhone Pro. The project repository can be found [https://gitlab.com/DeltaGem/levinboot/-/tree/master/ here]. (Pinephone Pro supporting fork is [https://xff.cz/git/levinboot/ here].)&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART¹ mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Note: The baud rate may be 1500000 instead of 115200.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used. &lt;br /&gt;
&lt;br /&gt;
''atinout'' example:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
''minicom'' example:&lt;br /&gt;
&lt;br /&gt;
 minicom -D /dev/ttyUSB2&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone and PinePhone Pro modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
 AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1,1&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to power off the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone Pro. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone and PinePhone Pro modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the documentation section.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone Pro has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone Pro may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.8 x 76.6 x 11.1mm&lt;br /&gt;
* '''Weight:''' Approx. 220g&lt;br /&gt;
* '''SIM Card:''' Nano-SIM (Micro-SIM before 07/2022)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 6 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' 1440 x 720 in-cell IPS with Gorilla Glass 4™&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' Rockchip RK3399S 64bit SoC – 2x A72 and 4x A53 CPU cores @ 1.5GHz&lt;br /&gt;
* '''RAM:''' 4GB LPDDR4 @ 800MHz&lt;br /&gt;
* '''Internal Storage:''' 128GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''NOR Flash:''' Listed as [GigaDevices] GD25LQ128EWIGR, but physical inspection found a SiliconKaiser SK25LP128.&lt;br /&gt;
* '''Back Camera:''' 13MP Sony IMX258 with Gorilla Glass 4™ protective layer, LED Flash&lt;br /&gt;
* '''Front Camera:''' 8MP, OmniVision OV8858 front-facing camera&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN &amp;amp; Bluetooth:''' Wi-Fi 802.11AC, hotspot capable + Bluetooth V5.0&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery; unglue bottom black plastic with your nail from Samsung battery before installation in order to match the dimensions)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
Most parts are available from the [https://pine64.com/product-category/pinephonepro-spare-parts/ Pine store]. Take care to use this link to avoid unintentionally ordering parts for the original PinePhone instead.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the mainboard ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced if it is faulty. The replacement board does not have an operating system pre-installed, to test if everything is working after swapping the mainboard a flashed SD card is required.&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an operating system from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone Pro’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the mainboard.&lt;br /&gt;
# Remove the phone's back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone, including the screw under the warranty sticker.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio and UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; for the regular PinePhone can be found [https://www.youtube.com/watch?v=5GbMoZ_zuZs here] or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here].&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Replacing the mainboard|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a silver-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the Pine Store ===&lt;br /&gt;
&lt;br /&gt;
The following parts are not available on the Pine Store for the '''regular PinePhone'''. The replacements are listed below and have not been validated for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Himax HX8394 compatible&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| IMX258&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| OV8858&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| AW3641EDNR&lt;br /&gt;
|-&lt;br /&gt;
| WiFi + Bluetooth&lt;br /&gt;
| [https://www.azurewave.com/img/wireless-modules/AW_CM256SM_DS_Rev15_CYW.pdf AzureWave AW-CM256SM]&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;3 Axis Magnetometer&amp;lt;/s&amp;gt;&lt;br /&gt;
| &amp;lt;s&amp;gt;[https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL]&amp;lt;/s&amp;gt; '''''Note:''''' The ''AF8133J'' is used instead.&lt;br /&gt;
|-&lt;br /&gt;
| Geo Magnetic Sensor&lt;br /&gt;
| [http://www.voltafield.com/products01.html Voltafield AF8133J]&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| STK3311-A&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| [https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6500/ TDK MPU-6500]&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec&lt;br /&gt;
| ALC5616 and ALC5640&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| [https://rockchip.fr/RK818%20datasheet%20V1.0.pdf RK818]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf PinePhone Pro mainboard Explorer Edition Released Schematic ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-top.pdf PinePhone Pro mainboard Explorer Edition component top placement ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-bottom.pdf PinePhone Pro mainboard Explorer Edition component bottom placement ver 1.0 20211127]&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro USB-C small board schematic:&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20FCC%20Certificate-S21101902805001.pdf PinePhone Pro FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20SAR%20Evaluation%20Report-S21101902806001.pdf PinePhone Pro SAR Evaluation Report]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20CE%20RED%20Certificate-S21101902802-R1.pdf PinePhone Pro CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20RoHS%20Test%20Report.pdf PinePhone Pro ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Factory Test Build for Hardware Checking ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-5.jpg|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by the support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, take out the PinePhone Pro Explorer Edition, then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press the RE button (bypass SPI and eMMC boot) underneath the back cover while plugging in the USB-C power. After 3 seconds release the RE button. &lt;br /&gt;
* When powering up, a battery icon screen will show up blow, press power key for two seconds, then the Rockchip logo screen shows up.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]][[File:PPP_Abdroid_Test_Utility-2.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Wait for the home screen, double tap on the test app icon (mark red circuit) and this will bring up the factory test screen. Please note that the SD test is disabled due in this is SD boot build.&lt;br /&gt;
* After running a particular test function, please snapshot the test result and pass it back to support team&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Please insert a functional SIM card when performing the SIM test&lt;br /&gt;
* When perform GPS test, the first result may fail and please ignore this false message.&lt;br /&gt;
* For light sensing test, please have a light shine to the PinePhone Pro when performing the test.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-4.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Factory Test Build for Battery charging ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and battery will start charging. &lt;br /&gt;
* The battery icon display for few seconds and then LCD panel turn off while charging. To check charging status, just quick press power button (about 0.5 second) and battery icon will display progress.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone Pro you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/pinephonepro/ Product Page]&lt;br /&gt;
* [https://www.youtube.com/watch?v=wP2-6Z74W44 Announcement video]&lt;br /&gt;
* [https://www.pine64.org/2021/10/15/october-update-introducing-the-pinephone-pro/ Blog post] with the announcement&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]][[Category:Rockchip RK3399]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21186</id>
		<title>PinePhone Pro</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=21186"/>
		<updated>2023-12-21T21:26:35Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Boot from microSD card temporarily */ addition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinephone_double.png|400px|thumb|right|Rendering of the PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone Pro''' is PINE64's flagship smartphone announced on October 15, 2021. It features 4GB of RAM, an 128GB eMMC and is using an Rockchip RK3399S SoC, which is a specialized version of the RK3399 made specifically for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone Pro is PINE64’s second smartphone and a successor to the original PinePhone. It does not, however, replace the original PinePhone. It should also not be considered a second generation PinePhone; it is a higher-end device, with much better specs, aimed at those who wish to daily-drive a open system stack. Achieving this goal will, however, take time as the software and overall smartphone software ecosystem needs to mature.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&amp;lt;sup&amp;gt;([[PinePhone Pro Software State|view separately]])&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:PinePhone Pro Software State}}&lt;br /&gt;
&lt;br /&gt;
=== Editions and revisions ===&lt;br /&gt;
Similarly to the original PinePhone, various PinePhone Pro editions are planned, the first of which is the Developer Edition (aimed at developers, as the name entails) followed by the Explorer Edition, which is aimed at early adopters.&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone Pro Developer Edition]]&lt;br /&gt;
* PinePhone Pro Explorer Edition&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this Wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time setup ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again. &lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot. Devices shipped after the end of July 2022 do only accept a nano-SIM, the SIM is inserted into a carriage released by slightly pulling on the handle in the lower slot (for information regarding devices shipped prior to end of July 2022 see below).&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the SIM card in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
{{Info|Information regarding devices shipped prior to end of July 2022: The PinePhone Pros shipped prior to the end of July 2022 come with a micro-SIM slot instead of a nano-SIM slot. Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. &amp;lt;br&amp;gt; If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The software section explains how to install the available software releases for the PinePhone Pro to the internal eMMC or a microSD card, how to boot them and how to solve common booting issues.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Pro Software Releases]] page has a complete list of currently supported phone-optimized operating system images that work with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
{{Info|Images of the regular PinePhone are not compatible with the PinePhone Pro.}}&lt;br /&gt;
&lt;br /&gt;
=== Boot order ===&lt;br /&gt;
&lt;br /&gt;
The RK3399S processor in the PinePhone Pro searches for the bootloader (such as ''U-Boot'' or ''Tow-Boot'') in the following order:&lt;br /&gt;
&lt;br /&gt;
# SPI flash&lt;br /&gt;
# eMMC (the internal memory)&lt;br /&gt;
# MicroSD card&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card temporarily ====&lt;br /&gt;
&lt;br /&gt;
To temporarily boot from an inserted '''microSD card''' do the following:&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after November 2023''' the microSD card is first in boot order due to using ''rk2aw'' instead of ''Tow-Boot'', see [https://xnux.eu/rk2aw/ here].&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while powering on the device. The batches bought after July 2022 come with ''Tow-Boot'' flashed to the SPI, which offers additional functionality over ''U-Boot'' as bootloader.&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the cover for a few seconds, while powering on the device. If the button is labeled ''RESET'' instead of ''RE'' please verify if the device is a regular [[PinePhone]] (or the Developer Edition). This is required because older batches don't ship with ''Tow-Boot'' on the SPI. Flashing ''Tow-Boot'' can be caught up by following [https://tow-boot.org/devices/pine64-pinephonePro.html this] instruction. Note: If ''Tow-Boot'' is flashed later, the microSD card can be selected at boot with the volume down key as well.&lt;br /&gt;
&lt;br /&gt;
* On the '''Developer Edition (sold to selected developers only)''' the SPI and the eMMC can be bypassed by shorting the bypass test points while booting. The process is explained in the article [[PinePhone Pro Developer Edition#Nuking the factory AOSP installation|PinePhone Pro Developer Edition]]. Please join the community chat for any questions regarding the process.&lt;br /&gt;
&lt;br /&gt;
The RE button disables the SPI and the eMMC at the hardware level while the button is held and the PinePhone Pro will try to boot from the next available boot medium, which is the microSD card. Note: When holding the ''RE'' button (or when shorting the contact points in case of the ''Developer Edition'') for a longer time at boot the operating system will not initialize the SPI and eMMC and it will not be possible to write to these storage mediums until the next reboot.&lt;br /&gt;
&lt;br /&gt;
{{Template:Info|The bootloader uses its own boot order for loading the kernel and other core operating system components at boot, which for example may result in the boot loader residing on the eMMC loading and booting the kernel from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card permanently ====&lt;br /&gt;
&lt;br /&gt;
The bootloader (such as ''U-Boot'') resides in the free space in front of the first partition. Wiping the bootloader from the eMMC to make the PinePhone Pro boot from microSD card can be done using &amp;lt;code&amp;gt;sudo dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/dev/mmcblk2 seek&amp;amp;#61;64 count&amp;amp;#61;400 conv&amp;amp;#61;fsync&amp;lt;/code&amp;gt;. Formatting the drive or deleting the partition table is not sufficient to wipe the bootloader.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
If you received your device after July of 2022, the bootloader (''Tow-Boot'') resides on the SPI. To boot to an SD card, place the SD card in your PinePhone Pro and turn it on. The phone will vibrate once. At this point, hold down the volume down button until you feel the device vibrate again then release the button. The LED color should change to blue and your display should remain black for a few seconds. In a few seconds you should see the SD card booting, the indications of which are dependent on what image you chose. If the LED is flashing instead, the boot from SD failed. Erasing the SPI can be achieved via the Tow-Boot installer image. Instructions are available here [https://tow-boot.org/devices/pine64-pinephonePro.html Tow-Boot PinePhone Pro Instructions].&lt;br /&gt;
&lt;br /&gt;
See [[RK3399 boot sequence]] for further details regarding the boot sequence.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The software releases can be installed (the process is being referred to as ''flashing'') to the eMMC or to an microSD card.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to microSD card ====&lt;br /&gt;
To install an image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download a compatible image from [[PinePhone Pro Software Releases]].&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Write the image to your microSD card using your favorite method, examples:&lt;br /&gt;
#* Using ''dd'': On the device you're flashing the microSD card from, find the correct device under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; and then flash the image to the microSD card using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;. Make sure the target is the whole microSD card and not its first partition (''sdc1'' or ''mmcblk0p1'' are wrong!).&lt;br /&gt;
#* Using ''bmaptool'': Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run bmaptool with the correct device: Download the ''IMAGE.xz'' and the ''IMAGE.bmap'' files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap '''IMAGE.bmap''' '''IMAGE.xz''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;. This takes around 2.5 minutes to flash a 4 GB file.&lt;br /&gt;
#* Using ''a graphical tool'': A graphical tool such as Gnome Disks under Linux or Etcher under Windows may also be used.&lt;br /&gt;
# Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore, see [[:File:Pinephone_slots.png|here]].&lt;br /&gt;
# Boot the device using the following method:&lt;br /&gt;
#* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while booting.&lt;br /&gt;
#* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the back cover while booting (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
#* On the '''Developer Edition (sold to selected developers only)''' apply the bypass by shorting the testing pads while booting according to the datasheet (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
&lt;br /&gt;
Details regarding the boot order can be found in the [[PinePhone Pro#Boot order|Boot order]] section.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to the eMMC ====&lt;br /&gt;
Flashing to the eMMC (the internal memory of the PinePhone Pro) can either be done using ''Tow-Boot'''s USB Mass Storage mode (see [[#Boot order]] if you are unsure if the device comes with Tow-Bot pre-installed) or by booting an operating system from the microSD card (see the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]) and by writing to the eMMC directly from there:&lt;br /&gt;
&lt;br /&gt;
By using Tow-Boot:&lt;br /&gt;
&lt;br /&gt;
# Power off the device&lt;br /&gt;
# Power on the device and hold the ''volume up'' key before and during the second vibration&lt;br /&gt;
# The LED will turn blue if done successfully. This will only work if Tow-Boot is installed&lt;br /&gt;
# When connecting the device to a computer via USB it will behave like an USB drive now&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;, the output might look like the following:&lt;br /&gt;
#: '''''mmcblk2'''      179:0    0 115.2G  0 disk''&lt;br /&gt;
#: ''├─mmcblk2p1  179:1    0   122M  0 part /boot''&lt;br /&gt;
#: ''└─mmcblk2p2  179:2    0 115.1G  0 part /''&lt;br /&gt;
#: {{Info|In this example, '''/dev/mmcblk2''' is the device, while ''mmcblk2p1'' and ''mmcblk2p2'' are partitions of the device. The downloaded images are images from full devices, which means that the full device (''mmcblk2'' in this example) needs to be flashed. Ignore the partitions!}}&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''DEVICE''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'' and replace ''DEVICE'' with the correct device from the ''lsblk'' command)&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
By booting a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Boot an operating system [[PinePhone Pro#Flashing to microSD card|from the microSD card]]. If there is already a bootloader on the eMMC installed see the section [[PinePhone Pro#Boot order|Boot order]] to bypass it.&lt;br /&gt;
# Download or copy the desired image to the microSD card as file&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. If it doesn't appear in the output of the command, the eMMC wasn't initialized due to applying the above explained bypass method for a too long time during the boot&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/mmcblk2 bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'').&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone Pro is not booting (either booting incompletely into a boot splash or tty or if the PinePhone Pro is showing no signs of life) this will typically have the following two reasons:&lt;br /&gt;
&lt;br /&gt;
==== The battery is fully drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is drained then the board can reset during boot causing a boot loop because of undervoltage condition. It can happen on all stages of the boot including ''U-Boot'' bootloader, display initialization and USB (re-)configuration. In that case it is not possible to charge the phone. The battery can be charged by interrupting the boot loop by booting the PinePhone Pro into ''Maskrom mode'' or by charging the battery externally. It is possible to follow these instructions without a computer by using a wall charger, however it would not be possible to determine if Maskrom mode was started successfully. To boot the PinePhone Pro into ''Maskrom mode'':&lt;br /&gt;
&lt;br /&gt;
* Remove any microSD card from the phone and keep it removed for the below procedure&lt;br /&gt;
* Remove the battery, any USB cable and any serial cable&lt;br /&gt;
* Reinsert the battery&lt;br /&gt;
* Hold the ''RE'' button underneath the back cover of your ''Explorer Edition'' (or short the bypass contact points on the ''Developer Edition'') &lt;br /&gt;
{{Info|Confirm that the label of the button says ''RE'' and not ''RESET''! If the button label says ''RESET'' instead you probably have a regular PinePhone and you're reading the wrong page.}}&lt;br /&gt;
* Connect the phone to an USB port of a computer, while still holding the button for some time&lt;br /&gt;
* Confirm if the phone was booted in Maskrom mode:&lt;br /&gt;
** On ''Linux'' check if the Maskrom mode appears as device in the output of the terminal command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; on the computer, the expected ''VID:PID'' of the device is ''2207:330c''.&lt;br /&gt;
** On ''Windows'' this can be checked using the ''Device Manager'' and checking the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; of an ''Unknown device'' appears.&lt;br /&gt;
** On ''macOS'' this can be checked in ''/Applications/Utilities/System Information.app'' under ''USB'' and by checking if the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; is appearing for a ''Composite Device''.&lt;br /&gt;
* Let the phone charge for multiple hours&lt;br /&gt;
&lt;br /&gt;
{{Info|If the device doesn't appear under ''lsusb'' please try again with a different known good USB-C cable and make sure that there is no microSD card in the phone inserted.}}&lt;br /&gt;
&lt;br /&gt;
The device should now be able to boot from the boot medium again. If that is not the case the installation got corrupted, as explained below.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted ====&lt;br /&gt;
The PinePhone Pro won't be able to boot if the installation on the SPI flash, the eMMC or the microSD card got corrupted. To boot a working operating system:&lt;br /&gt;
&lt;br /&gt;
* Prepare a microSD card as explained in the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]&lt;br /&gt;
* Remove any USB-C cable or device or add-on case from the PinePhone Pro&lt;br /&gt;
* Make sure the device is powered off by shortly removing the battery for a second&lt;br /&gt;
* Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore.&lt;br /&gt;
* Power on the device while bypassing the SPI and eMMC as explained under [[PinePhone Pro#Boot order|Boot order]]&lt;br /&gt;
&lt;br /&gt;
The device should now boot from the microSD card. If the phone does not boot from the microSD card the microSD card was flashed with an incompatible image or the battery got drained as explained above.&lt;br /&gt;
&lt;br /&gt;
=== Bootloaders ===&lt;br /&gt;
The following section contains notes regarding compatible bootloaders with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
==== U-Boot ====&lt;br /&gt;
The pre-installed operating system on the PinePhone Pro Explorer Edition, if sold prior to the end of July of 2022, is using [[U-Boot]] as default bootloader. Batches sold after July of 2022 are using ''Tow-Boot''&lt;br /&gt;
&lt;br /&gt;
==== Tow-Boot ====&lt;br /&gt;
Current batches of the PinePhone Pro ship with ''Tow-Boot'' pre-installed to the SPI flash, which is an opinionated distribution of ''U-Boot'' and brings numerous advantages over stock ''U-Boot'', such as the possibility to choose from booting the eMMC or microSD card using the volume buttons during boot, as well as a ''USB Mass Storage mode'', where the device can be written to by connecting the device to a computer via USB.&lt;br /&gt;
&lt;br /&gt;
The user can flash Tow-Boot to the PinePhone Pro using the [https://tow-boot.org/devices/pine64-pinephonePro.html instructions on the Tow-Boot website].&lt;br /&gt;
&lt;br /&gt;
==== levinboot ====&lt;br /&gt;
The levinboot bootloader is another option for the PinePhone Pro. The project repository can be found [https://gitlab.com/DeltaGem/levinboot/-/tree/master/ here]. (Pinephone Pro supporting fork is [https://xff.cz/git/levinboot/ here].)&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART¹ mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Note: The baud rate may be 1500000 instead of 115200.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used. &lt;br /&gt;
&lt;br /&gt;
''atinout'' example:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
''minicom'' example:&lt;br /&gt;
&lt;br /&gt;
 minicom -D /dev/ttyUSB2&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone and PinePhone Pro modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
 AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1,1&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to power off the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone Pro. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone and PinePhone Pro modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the documentation section.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone Pro has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone Pro may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.8 x 76.6 x 11.1mm&lt;br /&gt;
* '''Weight:''' Approx. 220g&lt;br /&gt;
* '''SIM Card:''' Nano-SIM (Micro-SIM before 07/2022)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 6 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' 1440 x 720 in-cell IPS with Gorilla Glass 4™&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' Rockchip RK3399S 64bit SoC – 2x A72 and 4x A53 CPU cores @ 1.5GHz&lt;br /&gt;
* '''RAM:''' 4GB LPDDR4 @ 800MHz&lt;br /&gt;
* '''Internal Storage:''' 128GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''NOR Flash:''' Listed as [GigaDevices] GD25LQ128EWIGR, but physical inspection found a SiliconKaiser SK25LP128.&lt;br /&gt;
* '''Back Camera:''' 13MP Sony IMX258 with Gorilla Glass 4™ protective layer, LED Flash&lt;br /&gt;
* '''Front Camera:''' 8MP, OmniVision OV8858 front-facing camera&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN &amp;amp; Bluetooth:''' Wi-Fi 802.11AC, hotspot capable + Bluetooth V5.0&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery; unglue bottom black plastic with your nail from Samsung battery before installation in order to match the dimensions)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
Most parts are available from the [https://pine64.com/product-category/pinephonepro-spare-parts/ Pine store]. Take care to use this link to avoid unintentionally ordering parts for the original PinePhone instead.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the mainboard ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced if it is faulty. The replacement board does not have an operating system pre-installed, to test if everything is working after swapping the mainboard a flashed SD card is required.&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an operating system from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone Pro’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the mainboard.&lt;br /&gt;
# Remove the phone's back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone, including the screw under the warranty sticker.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio and UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; for the regular PinePhone can be found [https://www.youtube.com/watch?v=5GbMoZ_zuZs here] or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here].&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Replacing the mainboard|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a silver-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the Pine Store ===&lt;br /&gt;
&lt;br /&gt;
The following parts are not available on the Pine Store for the '''regular PinePhone'''. The replacements are listed below and have not been validated for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Himax HX8394 compatible&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| IMX258&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| OV8858&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| AW3641EDNR&lt;br /&gt;
|-&lt;br /&gt;
| WiFi + Bluetooth&lt;br /&gt;
| [https://www.azurewave.com/img/wireless-modules/AW_CM256SM_DS_Rev15_CYW.pdf AzureWave AW-CM256SM]&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;3 Axis Magnetometer&amp;lt;/s&amp;gt;&lt;br /&gt;
| &amp;lt;s&amp;gt;[https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL]&amp;lt;/s&amp;gt; '''''Note:''''' The ''AF8133J'' is used instead.&lt;br /&gt;
|-&lt;br /&gt;
| Geo Magnetic Sensor&lt;br /&gt;
| [http://www.voltafield.com/products01.html Voltafield AF8133J]&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| STK3311-A&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| [https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6500/ TDK MPU-6500]&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec&lt;br /&gt;
| ALC5616 and ALC5640&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| [https://rockchip.fr/RK818%20datasheet%20V1.0.pdf RK818]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf PinePhone Pro mainboard Explorer Edition Released Schematic ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-top.pdf PinePhone Pro mainboard Explorer Edition component top placement ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-bottom.pdf PinePhone Pro mainboard Explorer Edition component bottom placement ver 1.0 20211127]&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro USB-C small board schematic:&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20FCC%20Certificate-S21101902805001.pdf PinePhone Pro FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20SAR%20Evaluation%20Report-S21101902806001.pdf PinePhone Pro SAR Evaluation Report]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20CE%20RED%20Certificate-S21101902802-R1.pdf PinePhone Pro CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20RoHS%20Test%20Report.pdf PinePhone Pro ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Factory Test Build for Hardware Checking ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-5.jpg|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by the support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, take out the PinePhone Pro Explorer Edition, then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press the RE button (bypass SPI and eMMC boot) underneath the back cover while plugging in the USB-C power. After 3 seconds release the RE button. &lt;br /&gt;
* When powering up, a battery icon screen will show up blow, press power key for two seconds, then the Rockchip logo screen shows up.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]][[File:PPP_Abdroid_Test_Utility-2.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Wait for the home screen, double tap on the test app icon (mark red circuit) and this will bring up the factory test screen. Please note that the SD test is disabled due in this is SD boot build.&lt;br /&gt;
* After running a particular test function, please snapshot the test result and pass it back to support team&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Please insert a functional SIM card when performing the SIM test&lt;br /&gt;
* When perform GPS test, the first result may fail and please ignore this false message.&lt;br /&gt;
* For light sensing test, please have a light shine to the PinePhone Pro when performing the test.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-4.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Factory Test Build for Battery charging ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and battery will start charging. &lt;br /&gt;
* The battery icon display for few seconds and then LCD panel turn off while charging. To check charging status, just quick press power button (about 0.5 second) and battery icon will display progress.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone Pro you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/pinephonepro/ Product Page]&lt;br /&gt;
* [https://www.youtube.com/watch?v=wP2-6Z74W44 Announcement video]&lt;br /&gt;
* [https://www.pine64.org/2021/10/15/october-update-introducing-the-pinephone-pro/ Blog post] with the announcement&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]][[Category:Rockchip RK3399]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab2_FAQ&amp;diff=21181</id>
		<title>PineTab2 FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab2_FAQ&amp;diff=21181"/>
		<updated>2023-12-15T21:10:55Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Please no html code, the wiki is not a website&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a collection of tutorials and frequently asked questions for the [[PineTab2]].&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Putting the Device into Maskrom Mode ===&lt;br /&gt;
&lt;br /&gt;
To recover from a bad eMMC/SPI flash, plug the included debug adapter into the charging USB-C port and switch the white switch to its &amp;quot;ON&amp;quot; position to bypass eMMC/SPI boot. This tries to boot from SD, and if no SD is inserted, enters Maskrom mode.&lt;br /&gt;
&lt;br /&gt;
=== Networking using USB ===&lt;br /&gt;
&lt;br /&gt;
Until the internal BES2600 WIFI has a stable driver, the community suggests that you connect using USB. This section summarizes the more detailed information in [[File:PineTab2_USB_Guide.pdf]], which covers connecting via [[#Performing USB Tethering with an Android Phone|a tethered Android phone]], [[#Selecting a USB WIFI Adapter|a suitable USB WIFI adapter]], a wired USB Ethernet adapter, and a tethered iOS device.&lt;br /&gt;
&lt;br /&gt;
==== Selecting a USB WIFI Adapter ====&lt;br /&gt;
&lt;br /&gt;
Insert a supported WIFI dongle in the upper USB port, using a USB-C to USB-A adapter as necessary. As a general rule, single state adapters are recommended. Even better, select one from this list: https://github.com/morrownr/USB-WiFi/blob/main/home/The_Short_List.md&lt;br /&gt;
&lt;br /&gt;
If you must use a multi-state adapter and it isn't recognized by the kernel, you can try ejecting the device. This ''should'' force it back into adapter mode. If this does not work, you can try installing [https://man.archlinux.org/man/usb_modeswitch.1.en usb_modeswitch] to troubleshoot. You will need to temporarily use another method to get internet (such as phone tethering below) or load the package on an SD card to install it.&lt;br /&gt;
&lt;br /&gt;
==== Performing USB Tethering with an Android Phone ====&lt;br /&gt;
&lt;br /&gt;
This guide simply describes HOW to undertake this option. The user is responsible for ensuring that their wireless plan permits such use, and for any fees incurred.&lt;br /&gt;
&lt;br /&gt;
You can use an Android phone as a network adapter.&lt;br /&gt;
&lt;br /&gt;
You'll need:&lt;br /&gt;
&lt;br /&gt;
* An Android phone&lt;br /&gt;
* A USB OTG adapter (or the USB-C to USB-C cable)&lt;br /&gt;
* Some knowledge of your variation of Android&lt;br /&gt;
&lt;br /&gt;
Do the following in order:&lt;br /&gt;
&lt;br /&gt;
* Plug in the device to the PineTab2 using the USB cable and a USB OTG adapter&lt;br /&gt;
* On your android phone, open the settings app (specifics from here may vary on version)&lt;br /&gt;
** Navigate to &amp;quot;Network &amp;amp; Internet&amp;quot;&lt;br /&gt;
** Navigate to &amp;quot;Hotspot &amp;amp; Tethering&amp;quot;&lt;br /&gt;
** Tap on &amp;quot;USB Tethering&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You should now see a new network interface on the PineTab2.&lt;br /&gt;
&lt;br /&gt;
==== Performing USB Tethering with an iPhone ====&lt;br /&gt;
&lt;br /&gt;
Prerequisite:&lt;br /&gt;
&lt;br /&gt;
On the iPhone make sure that Settings -&amp;gt; Personal Hotspot -&amp;gt; Allow others to join is turned on.&lt;br /&gt;
&lt;br /&gt;
# Use an Lightning (Apple) to USB-C (Pinetab2) cable to connect the devices.&lt;br /&gt;
# In the Pinetab make sure to use the USB-C port next to the volume keys.&lt;br /&gt;
# Once the cable is connected open your iPhone.&lt;br /&gt;
# You will see a request to trust the new device. Trust it.&lt;br /&gt;
# Confirm by typing in your Apple Device PIN&lt;br /&gt;
&lt;br /&gt;
This should be it. The Pinetab2 will show you the new device and the network connects to `Wired connection 1`&lt;br /&gt;
&lt;br /&gt;
Make sure to open the iPhone once you reconnect.&lt;br /&gt;
&lt;br /&gt;
==== Performing USB Tethering with a KaiOS phone ====&lt;br /&gt;
&lt;br /&gt;
This guide simply describes HOW to undertake this option. The user is responsible for ensuring that their wireless plan permits such use, and for any fees incurred.&lt;br /&gt;
&lt;br /&gt;
You can use a KaiOS phone for mobile Internet use with your PineTab2.&lt;br /&gt;
&lt;br /&gt;
You'll need:&lt;br /&gt;
&lt;br /&gt;
* A KaiOS phone&lt;br /&gt;
* A USB OTG adapter&lt;br /&gt;
* Your device’s charging cable&lt;br /&gt;
* Some knowledge of your KaiOS phone&lt;br /&gt;
&lt;br /&gt;
Do the following in order:&lt;br /&gt;
&lt;br /&gt;
* Plug the device into the PineTab2 using the USB cable and a USB OTG adapter&lt;br /&gt;
* On your KaiOS phone, open settings (specifics from here may vary on version)&lt;br /&gt;
* Navigate to &amp;quot;Network &amp;amp; Connectivity&amp;quot;&lt;br /&gt;
* Navigate to &amp;quot;Internet Sharing&amp;quot;&lt;br /&gt;
* Select &amp;quot;USB&amp;quot; and select On under USB tethering (Note: This option will be greyed out unless connected to the PineTab2)&lt;br /&gt;
&lt;br /&gt;
You should now see a new network interface on the PineTab2 and it should show a wired connection icon.&lt;br /&gt;
&lt;br /&gt;
=== Screen Rotation ===&lt;br /&gt;
==== Auto-rotating the Screen ====&lt;br /&gt;
Auto-rotation is handled by your operating system. However, the following general steps should work on distributions that support iio-sensor-proxy:&lt;br /&gt;
&lt;br /&gt;
* To enable auto-rotation, install the iio-sensor-proxy package: &amp;lt;code&amp;gt;sudo pacman -S iio-sensor-proxy&amp;lt;/code&amp;gt; and reboot.&lt;br /&gt;
* Some desktop environments, such as KDE, default to only allowing screen rotation while in tablet mode (detached from the case.) To enable it with the keyboard attached, go to System Settings--&amp;gt;Display and Monitor -&amp;gt; Display Configuration -&amp;gt; Uncheck &amp;quot;Only when in tablet mode&amp;quot; and click &amp;quot;Apply.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Rotating the Login Screen ====&lt;br /&gt;
Login screen orientation is handled by your operating system. Below are the instructions for the SDDM login screen that ships with the factory image:&lt;br /&gt;
&lt;br /&gt;
By default, the login screen is set to display in portrait mode. If you wish to change it to landscape mode to match the keyboard while in the case, use the following steps ([https://forum.pine64.org/showthread.php?tid=18313 Credit to chzbacon]) :&lt;br /&gt;
&lt;br /&gt;
* Install necessary software: &amp;lt;code&amp;gt;sudo pacman -S xorg-xrandr xorg-xinput&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit /usr/share/sddm/scripts/Xsetup. For example, using nano: &amp;lt;code&amp;gt;sudo nano /usr/share/sddm/scripts/Xsetup&amp;lt;/code&amp;gt; and add the following two lines to the end of file:&lt;br /&gt;
** &amp;lt;code&amp;gt;xrandr --output DSI-1 --mode 800x1280 --rate 60.00 --rotate right&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;xinput set-prop &amp;quot;pointer:Goodix Capacitive TouchScreen&amp;quot; --type=float &amp;quot;Coordinate Transformation Matrix&amp;quot; 0 1 0 -1 0 1 0 0 1&amp;lt;/code&amp;gt;&lt;br /&gt;
* Now edit /etc/sddm.conf.d/sddm.conf, for example: &amp;lt;code&amp;gt;sudo nano /etc/sddm.conf.d/sddm.conf&amp;lt;/code&amp;gt; and add the following two lines (case sensitive):&lt;br /&gt;
** &amp;lt;code&amp;gt;[X11]&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;DisplayCommand=/usr/share/sddm/scripts/Xsetup&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reboot, and your login screen should now display in landscape mode.&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
==== How does the PineTab2 compare to the Pinebook Pro? ====&lt;br /&gt;
It's slower, as it is intended to be a successor to the PineTab1, not the Pinebook Pro. It'll still handle web browsing, video playback and documents fine though.&lt;br /&gt;
&lt;br /&gt;
==== What is the Performance of the PineTab2 compared to the PineTab-V? ====&lt;br /&gt;
The PineTab2 is notably faster than the PineTab-V. You can see this by [https://github.com/ThomasKaiser/sbc-bench/blob/master/Results.md comparing the Quartz64 sbc-bench results to the Star64 ones]. Performance should not be a factor of consideration when purchasing a PineTab-V.&lt;br /&gt;
&lt;br /&gt;
==== I am a casual user with minimal Linux experience. Is this device for me? ====&lt;br /&gt;
The PineTab 2 is considered early release at this point, and the community is expected to develop support for it over time. For example, the [[PineTab2#Known_Issues]] page details several features that are not yet fully working. You may at times need to troubleshoot this device and some development experience is ideal if you want to realize the tablet's full potential at this stage.&lt;br /&gt;
&lt;br /&gt;
For these reasons, the PineTab2 may not be the ideal device for casual users. However, if you feel up to the challenge and want to learn while joining a great community, you are more than welcome! Please join one of our [[Main_Page#Chat_Platforms|chat platforms]]: the community is always happy to help!&lt;br /&gt;
&lt;br /&gt;
==== What works, what doesn't? ====&lt;br /&gt;
&lt;br /&gt;
Please see [[PineTab2#Known_Issues]].&lt;br /&gt;
&lt;br /&gt;
==== I only know Python, can I help with drivers? ====&lt;br /&gt;
Drivers are (at least typically) written in the C programming language. Unfortunately, there is no way to &amp;quot;code drivers in Python&amp;quot; because usually drivers need to access and process memory allocation directly. If you feel like this is interesting to you, we suggest you to spend some time learning the C programming language, maybe with an emphasis in device driver development. The good news is that, since you already know a programming language, you already know part of the skill.&lt;br /&gt;
&lt;br /&gt;
In short, you can only help with drivers development if you learn the C programming language first.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
==== Does the Tablet support a Pen? ====&lt;br /&gt;
No, adding a digitiser for pen inputs would make the price too high.&lt;br /&gt;
&lt;br /&gt;
==== Is there SPI Flash? ====&lt;br /&gt;
Yes! A 128 Mbit flash chip (sk25lp128) is reportedly present on production devices.&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
==== What operating systems are currently available? ====&lt;br /&gt;
The PineTab2 uses ARM operating systems. Please see [[PineTab2 Releases]] for a current list of software releases.&lt;br /&gt;
&lt;br /&gt;
==== How can I install an operating system on the SD card / eMMC? ====&lt;br /&gt;
&lt;br /&gt;
See the article [[PineTab2]].&lt;br /&gt;
&lt;br /&gt;
==== Can I run Android on it? ====&lt;br /&gt;
&lt;br /&gt;
Theoretically yes, practically there's little chance anyone wants to make a well-supported Android build for this device. If you're looking for an Android tablet, buy any mainstream tablet, and you'll get better value for your money.&lt;br /&gt;
&lt;br /&gt;
However, if you just need to run a few simple android apps, you might want to have a look at [https://docs.waydro.id/usage/install-on-desktops Waydroid] which can be installed on Arch Linux ARM using the following command: &amp;lt;code&amp;gt;sudo pacman -S waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting ===&lt;br /&gt;
&lt;br /&gt;
==== What's the boot order for SD cards and eMMC? ====&lt;br /&gt;
&lt;br /&gt;
The SPI and the internal memory (eMMC) have a higher boot priority than the microSD card. Please see the [[PineTab2]] for more detailed information.&lt;br /&gt;
&lt;br /&gt;
==== Can I install a different OS on my PineTab2? ====&lt;br /&gt;
&lt;br /&gt;
Yes! While all PineTab2 come with an OS preinstalled, you are free to use any OS on the integrated storage (the eMMC) or an SD card. See [[PineTab2]] and [[PineTab2 Releases]] for how to install them.&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth ===&lt;br /&gt;
&lt;br /&gt;
==== The Bluetooth isn't working ====&lt;br /&gt;
&lt;br /&gt;
The BES2600 Bluetooth driver still needs to be implemented. Please see the [[#Networking Using USB]] section above for a workaround.&lt;br /&gt;
&lt;br /&gt;
=== Wi-Fi ===&lt;br /&gt;
&lt;br /&gt;
==== The Wi-Fi isn't working ====&lt;br /&gt;
The [https://gitlab.com/TuxThePenguin0/bes2600 BES2600 Wi-Fi driver] needs major cleanup and bugfixing: at the moment it causes system crashes. Please see the [[#Networking Using USB]] section above for a workaround.&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
&lt;br /&gt;
==== Can PineTab2 play back DRM content such as Netflix? ====&lt;br /&gt;
&lt;br /&gt;
Yes. Procedure below was confirmed to get working Disney+, Amazon Prime and Netflix, as of 2023-12-14.&lt;br /&gt;
&lt;br /&gt;
1 '''Install [https://aur.archlinux.org/packages/glibc-widevine glibc-widevine] from AUR.'''&lt;br /&gt;
&lt;br /&gt;
This adds the necessary bits that are missing from glibc versions below 2.36. It's available in AUR, so you can follow the standard installation process for any AUR package. E.g. &amp;lt;code&amp;gt;yay -S glibc-widevine&amp;lt;/code&amp;gt; if you use &amp;lt;code&amp;gt;yay&amp;lt;/code&amp;gt;. During installation it says it conflicts with, and will replace, glibc. That's OK, as expected.&lt;br /&gt;
&lt;br /&gt;
Doing this explicitly is no longer actually necessary, as installing [https://aur.archlinux.org/packages/widevine widevine] should automatically install &amp;lt;code&amp;gt;glibc-widevine&amp;lt;/code&amp;gt; too.&lt;br /&gt;
&lt;br /&gt;
2. '''Install [https://aur.archlinux.org/packages/widevine widevine] from AUR.'''&lt;br /&gt;
&lt;br /&gt;
It automatically registers the libraries with Firefox and Chromium. After first installation, you will need to log out and back in. It might also be required to restart the browser up to 2 times before the widevine library is fully recognized and registered.&lt;br /&gt;
&lt;br /&gt;
3. '''Test.'''&lt;br /&gt;
&lt;br /&gt;
At this point, playing some DRM content should already work. It is best to test https://bitmovin.com/demos/drm . Disney+ and Amazon Prime also should already work fine.&lt;br /&gt;
&lt;br /&gt;
4. '''User agent spoofing for Netflix.'''&lt;br /&gt;
&lt;br /&gt;
For Netflix, you will need an extra step -- spoof the user agent, i.e. pretend you're using a different device. For some reason, Netflix doesn't tolerate &amp;quot;WWW browser on Linux on 64-bit Arm&amp;quot; which you use. You can use various Firefox or Chromium extensions to change the user agent, like  like [https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/ User-Agent Switcher and Manager for Firefox]. You have to pretend to be a user agent coming from ChromeOS, so it matches the ARM architecture (choosing a popular user agent like Windows on x86_64 will not work). You can peek at sample user agent strings on https://user-agents.net/platforms/chromeos/user-agents .&lt;br /&gt;
&lt;br /&gt;
User agent confirmed to work on 2023-12-11:&lt;br /&gt;
     &lt;br /&gt;
 Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36&lt;br /&gt;
&lt;br /&gt;
In the preferences of the extension (for Firefox or Chromium) you should be able to define a new entry to pretend you're using ''ChromeOS'' with the user agent string as above. Double-check you changed the user agent correctly by visiting e.g. [https://duckduckgo.com/?q=my+user+agent&amp;amp;t=ffab&amp;amp;ia=answer DuckDuckGo answer for &amp;quot;my user agent&amp;quot;]. &lt;br /&gt;
&lt;br /&gt;
Once this is set up correctly, Netflix should work.&lt;br /&gt;
&lt;br /&gt;
When you're confident Netflix works, you can change the &amp;quot;user agent spoofing&amp;quot; extension preferences to only change the user agent for the &amp;lt;code&amp;gt;*.netflix.com&amp;lt;/code&amp;gt; domains. Otherwise you are pretending for all sites that you come from ''ChromeOS'' -- which is unnecessary (albeit harmless).&lt;br /&gt;
&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
&lt;br /&gt;
* https://aur.archlinux.org/packages/glibc-widevine has version 2.35 . And that is OK, despite e.g. https://github.com/AsahiLinux/widevine-installer saying that ''&amp;quot;Using Widevine requires glibc version 2.36 or later.&amp;quot;'' . The https://aur.archlinux.org/packages/glibc-widevine adds the necessary glibc RELRO bits and that's enough for widevine to work.&lt;br /&gt;
* In case you have &amp;lt;code&amp;gt;mobile-config-firefox&amp;lt;/code&amp;gt; installed, it may cause issues according to https://forum.pine64.org/showthread.php?tid=18933&amp;amp;pid=120956#pid120956 . Check do you have it by a command like &amp;lt;code&amp;gt;sudo pacman -Qi mobile-config-firefox&amp;lt;/code&amp;gt;. Remove it by a command like &amp;lt;code&amp;gt;sudo pacman -R mobile-config-firefox&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Rockchip RK3566]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=20993</id>
		<title>PinePhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=20993"/>
		<updated>2023-10-23T15:26:14Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Pogo pins */ Pulled more information, changed the style&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PinePhone Beta Edition.png|400px|thumb|right|Rendering of the PinePhone Beta Edition]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone''' is a smartphone created by PINE64. It is capable of running mainline Linux and is supported by many partner projects.&lt;br /&gt;
&lt;br /&gt;
The Braveheart Edition of the PinePhone was the first publicly available version of the phone. It shipped without a fully functional operating system and was geared specifically towards early adopters. The Braveheart Edition's successors were the Community Editions, which featured a branded backcover and box of selected community projects. The Community Editions became available in June 2020. The Beta Edition featuring Manjaro with Plasma Mobile is the latest edition, it became available in March 2021.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone is not a regular phone and you might not get the latest and greatest hardware and this years' newest innovation. You will get a device with good mainline support with a great community behind it.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&lt;br /&gt;
First things first, the PinePhone is aimed solely at early adopters - more specifically, the units are solely intended to find their way into the hands of users with extensive operating system experience.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is very early, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the community chat (see [[Main Page#Community and Support]])!&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time installation ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again.&lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The PinePhone's SIM slot only accepts a micro-SIM, please do not insert a nano-SIM without an adapter and make sure that the nano-SIM does not get released from its adapter. The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot.&lt;br /&gt;
&lt;br /&gt;
{{Info|Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the micro-SIM in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
An adapter from a nano to a micro-SIM might be included under tape in the camera notch of the phone's packaging. Some nano-SIMs will not fit firmly into that adapter that comes with the PinePhone and if the included adapter is used without a well-fitting nano-SIM, the contact pins might get damaged. In that case it is highly recommended to acquire a better fitting adapter.&lt;br /&gt;
&lt;br /&gt;
== Operating systems ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distribution (because the PinePhone uses the mainline kernel), there are a few that are designed specifically for mobile use on devices like the PinePhone.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Software Releases]] page has a complete list of currently supported phone-optimized Operating System images that work with the PinePhone as well as other related software information. As soon as more patches get mainlined and distributions ship with the updated kernel, they will also be able to run unmodified on the device. To update any installed operating system please see [[PinePhone Updating Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The instructions to install an operating system to the internal memory (&amp;quot;eMMC&amp;quot;) or a microSD card can be found here: [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone is not booting from eMMC and/or microSD card anymore it can have two causes:&lt;br /&gt;
&lt;br /&gt;
==== The battery is drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is fully drained, most operating systems and distributions won't boot anymore. One of the exceptions which still boots is the utility ''Jumpdrive'', which can usually be used to expose the eMMC and microSD card as drives to a USB-connected computer. Mind that JumpDrive won't expose the eMMC and microSD card with a drained battery but it still can be flashed and booted from microSD card to confirm that the phone still functions and boots up fine. &lt;br /&gt;
&lt;br /&gt;
JumpDrive can be downloaded from [https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.8/pine64-pinephone.img.xz here] (not compatible with the PinePhone Pro!). &lt;br /&gt;
&lt;br /&gt;
{{Info|If JumpDrive boots and other releases do not boot, the battery is likely drained. In that case let it charge while running JumpDrive with a compatible charger for multiple hours and make sure to not fully drain the battery in the future anymore, as that significantly reduces the battery lifetime.}}&lt;br /&gt;
&lt;br /&gt;
Alternatively to testing JumpDrive, the issue can also be diagnosed by checking the battery charge. Simply remove the battery from the device and measure the voltage on the (+) and (-) contacts on the battery. Make sure to not shorten the contacts as shorting battery pins is a severe life and safety danger.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted or incorrect ====&lt;br /&gt;
&lt;br /&gt;
If the installation of the prioritized boot medium is corrupted or incorrect, the PinePhone will not boot anymore. The following problems are common:&lt;br /&gt;
&lt;br /&gt;
* The microSD card is in the wrong slot (see [[#First time installation|first time installation]])&lt;br /&gt;
* The image file was flashed to partition 1 (example: ''sdx1'', ''nvme0x1p1'') instead of the whole device (example: ''sdx'', ''nvme0x1'')&lt;br /&gt;
* An image without bootloader was flashed (mind the ''Tow-Boot'' bootloader requirements of ''Mobian'' and ''postmarketOS'')&lt;br /&gt;
* The operating systems got corrupted, for example after running updates (reflash the device, see [[PinePhone Installation Instructions]])&lt;br /&gt;
* An incompatible image was flashed (make sure that the images are compatible. Images for the PinePhone Pro won't boot on the PinePhone and vice versa. Check your invoice to see if you ordered a PinePhone or a PinePhone Pro).&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.5 x 76.6 x 9.2mm&lt;br /&gt;
* '''Weight:''' Between 180 ~ 200 grams&lt;br /&gt;
* '''SIM Card:''' Micro-SIM&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 5.95 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' [https://linux-sunxi.org/A64 Allwinner A64]&lt;br /&gt;
* '''RAM:''' 2GB or 3GB LPDDR3 SDRAM&lt;br /&gt;
* '''Internal Storage:''' 16GB or 32GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''Back Camera:''' Single 5MP, 1/4&amp;quot;, LED Flash&lt;br /&gt;
* '''Front Camera:''' Single 2MP, f/2.8, 1/5&amp;quot;&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN:''' Wi-Fi 802.11 b/g/n, single-band, hotspot&lt;br /&gt;
** '''Bluetooth:''' 4.0, A2DP&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| OmniVision OV5640&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| SGMICRO SGM3140&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| GalaxyCore GC2145&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Xingbangda XBD599&lt;br /&gt;
|-&lt;br /&gt;
| WiFi&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| Magnetometer&lt;br /&gt;
| ST LIS3MDL&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| SensorTek STK3335&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| InvenSense MPU-6050&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| Unknown model&lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See the [[PinePhone_component_list|PinePhone Component List]].&lt;br /&gt;
&lt;br /&gt;
== Hardware revisions ==&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone_revisions.png|400px|thumb|right|The history of the PinePhone CEs]]&lt;br /&gt;
&lt;br /&gt;
The following are all hardware revisions of the PinePhone that have existed, ordered by the time of their releases:&lt;br /&gt;
&lt;br /&gt;
* [[Project Anakin]] - Development kit&lt;br /&gt;
* [[Project Don't be evil]] - Development kit&lt;br /&gt;
* [[PinePhone v1.0 - Dev|PinePhone v1.0]] - Developer Edition&lt;br /&gt;
* [[PinePhone v1.1 - Braveheart|PinePhone v1.1]] - Braveheart Edition&lt;br /&gt;
* [[PinePhone v1.2]] - Ubports Community Edition&lt;br /&gt;
* [[PinePhone v1.2a]] - postmarketOS Community Edition&lt;br /&gt;
* [[PinePhone v1.2b]] - Manjaro Community Edition, KDE Community Edition, Mobian Community Edition and Beta Edition&lt;br /&gt;
&lt;br /&gt;
== Hardware accessory ==&lt;br /&gt;
&lt;br /&gt;
=== Add-ons ===&lt;br /&gt;
The PinePhone (and PinePhone Pro) is compatible with the official add-on cases, such as the keyboard, the LoRa add-on, the Qi wireless charging add-on and the fingerprint reader add-on. Details can be found under:&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone (Pro) Add-ons]]&lt;br /&gt;
* [[PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
=== PinePhone Accessories ===&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]] for a list of devices working with the PinePhone (depending on their OS support).&lt;br /&gt;
&lt;br /&gt;
The USB-C can be used to power the device, and offers USB2 host and OTG capabilities, and also can make use of the USB-C capability to integrate HDMI signals. Some USB-C hubs are available that offer power throughput, USB connection, an HDMI port and Ethernet connection.&lt;br /&gt;
&lt;br /&gt;
=== Pogo pins ===&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone pogo.png|400px|thumb|right|The pogo pins, as visible under the back cover.]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone has six pogo pins on the back allowing for custom hardware extensions such as wireless charging, an IR blaster, a keyboard extension or extended battery case. The pogo pins provide access to an interrupt line, power inputs/outputs and an I2C interface.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Interrupt&lt;br /&gt;
| SDA&lt;br /&gt;
| SCL&lt;br /&gt;
|-&lt;br /&gt;
| DCIN&lt;br /&gt;
| USB-5V&lt;br /&gt;
| GND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PINE64 store currently sells the [https://pine64.com/product/pinephone-flex-break-out-board/?v=0446c16e2e66 PinePhone Flex Breakout Board]. With the pitch being 2.54 mm, this Flex Breakout Board may have leads soldered directly to the contacts for use in a solderless board. A non-soldered solution would be to use a [https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/5-520315-6/2258879 TE AMP Connector] that will accept a Flat Flexible Cable 2.54 mm pitch.&lt;br /&gt;
&lt;br /&gt;
The following community resources are using the pogo pin connections:&lt;br /&gt;
* The [https://github.com/SMR404/PinephonePogoBreakout ''PinephonePogoBreakout''] breakout board from the community member ''SMR404''&lt;br /&gt;
* Martijn Braams' [https://blog.brixit.nl/making-a-backcover-extension-for-the-pinephone/ ''Making a backcover extension for the PinePhone'']&lt;br /&gt;
&lt;br /&gt;
{{Warning|The following information in this subsection is only partially correct.  A rewrite is currently pending.}}&lt;br /&gt;
&lt;br /&gt;
DCIN and USB-5V are the names used in the schematics. The actual behavior of these pogo pins is not obvious based on their names. DCIN is connected both to the VBUS line of the USB Type-C connector and to the ACIN/VBUS inputs on the PMIC. This means that, depending on a number of factors, DCIN may be at 0&amp;amp;nbsp;V or 5&amp;amp;nbsp;V. USB-5V is connected at the output of an LP6226 DC/DC boost converter (5&amp;amp;nbsp;V), which in turn is fed by the PS output of the PMIC. The boost converter is enabled or disabled by a GPIO output from the A64 SoC, controlled by software (e.g. the Linux kernel). Depending on inputs and decision made by the PMIC, PS may be at the battery voltage (fed &amp;quot;directly&amp;quot; by the battery through a [https://www.zxcompo.com/ transistor] controlled by the PMIC), or at the &amp;quot;USB&amp;quot; voltage (fed by the PMIC's ACIN/VBUS inputs). This means that depending on a number of factors, USB-5V may be at battery voltage (between 3.0&amp;amp;nbsp;V and 4.3&amp;amp;nbsp;V), or at 5&amp;amp;nbsp;V.&lt;br /&gt;
&lt;br /&gt;
Because the PinePhone may act as a USB host (providing 5&amp;amp;nbsp;V at the USB Type-C connector's VBUS to a connected device) or as a USB device (drawing from a 5&amp;amp;nbsp;V source on the USB Type-C connector's VBUS), DCIN is actually not strictly an input nor an output. Some community analysis of the PinePhone schematic (and some testing) indicates that you can connect a 5&amp;amp;nbsp;V power supply to DCIN in order to power the phone at the PMIC's ACIN/VBUS inputs (and, as a side effect, charge the battery). This may not be safe to do in all conditions, e.g., when the phone is acting as a USB host to a connected USB device. It should also be safe to use DCIN as a power output from the PinePhone, e.g., when a USB Type-C charger is connected, you can draw current directly from the USB Type-C port's VBUS, which is provided by the charger. Please note that, when using DCIN as an output from the PinePhone, DCIN isn't &amp;quot;always on&amp;quot;; it may be 0&amp;amp;nbsp;V. It is currently not documented on how much current can be safely drawn.&lt;br /&gt;
&lt;br /&gt;
USB-5V should be safe to use as an &amp;quot;always on&amp;quot; power output from the PinePhone. Depending on a number of factors, voltage may be from 3&amp;amp;nbsp;V to 5&amp;amp;nbsp;V; thus, if you are using USB-5V to power your pogo-pins expansion board, you will probably need to use DC/DC converters/regulators as appropriate. USB-5V is on even while the A64 SoC is powered down.&lt;br /&gt;
&lt;br /&gt;
The I2C and interrupt lines have pull-ups on the phone side. The I2C lines are pulled up to 3v3 by the phone.&lt;br /&gt;
&lt;br /&gt;
=== Back cover ===&lt;br /&gt;
A step file for the back cover for creating custom cases is freely available [https://files.pine64.org/doc/PinePhone/PinePhone%20Back%20Cover%20ver%200.5.stp here].&lt;br /&gt;
&lt;br /&gt;
=== Serial console ===&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone_Serial_Cable.png|400px|thumb|right|Pinout of the serial adapter. This shows signals from the PinePhone's point of view, so connect the adapter's Rx to Ring 1 and Tx to Tip]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone has a serial port in the headphone connector, it's activated by the 6th contact on the dipswitch. If the switch is set to &amp;quot;on&amp;quot;, the headphone connector is in audio mode, if it is set to &amp;quot;off&amp;quot; it's in UART mode. The UART serial connection can also be used for communication with other devices from the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The UART is 115200n8.&lt;br /&gt;
&lt;br /&gt;
The pinout for the serial connector is:&lt;br /&gt;
&lt;br /&gt;
* Tip: RX&lt;br /&gt;
* Ring: TX&lt;br /&gt;
* Sleeve: GND&lt;br /&gt;
&lt;br /&gt;
You can buy a serial debug cable from the [https://pine64.com/product/pinebook-pinephone-pinetab-serial-console/ PINE64 Store]. The store cable uses a 4 ring plug, as seen in the [https://files.pine64.org/doc/pinebook/guide/Pinebook_Earphone_Serial_Console_Developer_Guide.pdf here], but a 3 ring plug works just as well. The cable uses a CH340 chipset based serial to USB converter, but any 3.3v serial connection can be used. Because it is a &amp;quot;host&amp;quot;/DTE it means that you need a ''cross modem cable'' ([https://en.wikipedia.org/wiki/Null_modem Null Modem]) with TX on Tip to be connected to RX. A cable like e.g. [https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm FTDI TTL-232R-3V3-AJ] which has TX on Tip and RX on Ring fits perfectly.&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Camera ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone has two cameras, OmniVision OV5640 with 5MP (up to 2592 x 1944 pixels) as rear camera and GalaxyCore GC2145 with 2MP (up to 1600 x 1200 pixels) as front camera.&lt;br /&gt;
&lt;br /&gt;
[[File:Rose.jpg|400px|thumb|none|Example picture taken on the PinePhone's rear camera by Martijn Braam using his app ''Megapixels''.]]&lt;br /&gt;
&lt;br /&gt;
Further details regarding the camera and the Megapixels camera app can be found on [https://blog.brixit.nl/tag/phones/ Martijn's blog].&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
The phone ships with a protective plastic sticker between the battery and the phone to protect the device from turning on during shipping. You need to gently open the back cover, then remove the battery and finally remove the sticker and check that the pins aren't bent. Note: If the battery is stuck inside the phone, the mid screw in the lower part of the midframe needs to be slightly loosened, see [[PinePhone_FAQ#The_battery_is_stuck_inside_the_phone|here]].&lt;br /&gt;
&lt;br /&gt;
{{Info|The EG25-G modem and the RTL8723CS WiFi and Bluetooth do not work without a battery and with a drained battery, even when enough power is supplied to the PinePhone via the USB Type-C port. Most operating systems won't boot without a battery or with a drained battery.}}&lt;br /&gt;
&lt;br /&gt;
The [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf supplied battery] is meant to be compatible with Samsung part number EB-BJ700BBC / BBE / CBE from the 2015 J7 phone. The extended life aftermarket BBU does fit, although it is a tight fit.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Using an aftermarket battery with a higher capacity is done at own risk. Batteries with a higher capacity especially in combination with an external charger can lead to overvoltage, which fries the modem and/or the Bluetooth and WiFi chip.}}&lt;br /&gt;
&lt;br /&gt;
The battery terminals, from the nearest to the battery edge to the nearest to the middle of battery, are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | +ve&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | thermistor&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | -ve&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | not connected&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The battery includes a protection circuit that isolates it in a number of fault conditions, including if it is discharged too far. The fully discharged battery can be recharged by connecting the phone to a charger with a sufficient output. Once it has charged sufficiently you will be able to boot the phone.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;atinout&amp;lt;/i&amp;gt; example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;minicom&amp;lt;/i&amp;gt; example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;minicom -D /dev/ttyUSB2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone's modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CFUN=1,1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to poweroff the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the [[PinePhone#Datasheets for components and peripherals|documentation section]] below.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Safety ==&lt;br /&gt;
&lt;br /&gt;
=== General recommendations ===&lt;br /&gt;
&lt;br /&gt;
Due to the greater control the user is having over the device and its software comes also greater responsibility. It is necessary to verify the configuration of the device to make sure that responsible settings are used. The different operating systems may come with non-sane default settings, including SSH with weak password authentication being enabled by default and exposed to the public Internet, the absence of a firewall, default passwords, unencrypted files, too high temperature zones and emergency shutoff values or an enabled root account. The usage of public resources to verify such settings (such as the in case of GNU/Linux, the Arch Linux [https://wiki.archlinux.org/title/security security] wiki page, or the [https://wiki.archlinux.org/title/general_recommendations general recommendations]) as well as the corresponding operating system's or distribution's resources are strongly recommended.&lt;br /&gt;
&lt;br /&gt;
=== Charging safety ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone supports up to 5V 3A (15W) Quick Charge, it follows the USB Power Delivery specification. Only compatible phone chargers may be used, charging the phone with incompatible chargers (for example laptop chargers with a higher voltage) is prohibited. Charging the phone releases heat, general safety recommendations must be followed, see the section ''Thermal safety''.&lt;br /&gt;
&lt;br /&gt;
=== Thermal safety ===&lt;br /&gt;
&lt;br /&gt;
With the Allwinner A64 being an older generation SoC with a large 40nm chip, the phone produces quite some heat with medium or higher use and especially also during charging or when using USB accessories, like a docking station. Measurements to prevent damage to the phone and to its surroundings need to be taken by the user. This includes especially a proper handling of the phone: do not charge the phone in a way where heat builds up around the phone without being able to escape. Especially don't charge your phone under a pillow, blankets, in pockets or bags. Charging the phone produces heat and charging the phone in a way, where the excessive heat can't dispose around the phone poses an immediate fire risk.&lt;br /&gt;
&lt;br /&gt;
The user might notice that the phone gets warm under usage, compared to phones with more up-to-date hardware. Under normal circumstances these temperatures don't pose a risk while being in the levels within the safe operating temperatures (which lay far beyond the point where components can be too hot to touch). Higher temperatures might especially be experienced on the top side of the screen and on the inside of the phone at the RF shield of the modem. The higher temperature of the RF shield of the modem is commonly caused by the SoC on the opposite side of the mainboard, the RF shield of the modem is used to disperse heat of the SoC. In newer mainboard revisions starting from 1.2a there are also thermal pads on the back cover and between the SoC's RF shield and the screen, dispersing heat on the screen and on the back cover. In the past there has been safety issues regarding thermal safety functions, causing temperature reads to not properly work over an extended period of time, which was causing heat damage in some cases (see the documentation of that issue by the developer Megous [http://xnux.eu/log/#018 here] and [http://xnux.eu/log/#017 here]). While the developers are working hard to prevent such issues, they can't be excluded under all circumstances (see [[PinePhone#State_of_the_software|state of the software]]). The users are expected to monitor their phones' thermal safety at every point at this state of the software.&lt;br /&gt;
&lt;br /&gt;
It is highly recommend to update the phone on a regular basis to always get the latest improvements. The default settings to throttle the performance and to shut down the phone when reaching critical temperatures might be set to a too high point depending on the specific usage and usage length. Under GNU/Linux the phone's thermal management behavior can be modified via the Thermal Sysfs driver to achieve lower temperatures and preventing the screen and other components to potentially take damage, see [[PinePhone Thermal Tweaks]] for the details.&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
For a list of frequently asked questions (including information regarding the shipping) see [[PinePhone FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
=== Swapping in a new mainboard revision ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced, for example for upgrading to a newer hardware revision or if it is faulty. The replacement board does not have an OS preinstalled, to test if everything is working after swapping the mainboard a flashed SD card is required. The mainboard also comes with a non-functional firmware on the ANX chip, a newer firmware version has to be flashed as explained below to get certain USB functionality to work.&lt;br /&gt;
&lt;br /&gt;
==== Replacing the mainboard ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an OS from SD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the PinePhone’s mainboard.&lt;br /&gt;
# Remove the PinePhone’s back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio/ UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Check that the rubber proximity sensor housing is in the chassis, not stuck to the removed mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; can be found here (or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here]):&lt;br /&gt;
[[File:Pinephone_martijn_pcb_replacement.png|thumb|none|600px|link=https://www.youtube.com/watch?v=5GbMoZ_zuZs|Watch Martijn Braam's video tutorial here: https://www.youtube.com/watch?v=5GbMoZ_zuZs.]]&lt;br /&gt;
&lt;br /&gt;
==== Flashing the ANX firmware ====&lt;br /&gt;
&lt;br /&gt;
===== Method 1 =====&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the ANX7688 chip has to be flashed for full USB functionality.&lt;br /&gt;
&lt;br /&gt;
Under GNU/Linux this can be done by downloading the latest ANX7688 firmware image on the phone:&lt;br /&gt;
&lt;br /&gt;
 wget https://xff.cz/git/linux-firmware/plain/anx7688-fw.bin&lt;br /&gt;
&lt;br /&gt;
and executing as root (&amp;quot;sudo su&amp;quot;) on the phone:&lt;br /&gt;
&lt;br /&gt;
 cp anx7688-fw.bin /lib/firmware/&lt;br /&gt;
 echo 1 &amp;gt; /sys/class/typec/port0/device/flash_eeprom&lt;br /&gt;
&lt;br /&gt;
===== Method 2 =====&lt;br /&gt;
&lt;br /&gt;
Booting a factory test image will automatically flash the ANX7688 chip. See [[PinePhone Software Releases#Factory Test OS|Factory Test OS]] for such an image.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Swapping in a new mainboard revision|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a gold-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the PINE64 store ===&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
=== Other hardware issues ===&lt;br /&gt;
&lt;br /&gt;
See also [[PinePhone Hardware Issues]] for more issues and how-to's.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== PinePhone board information, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2b%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2b]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2a%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2a]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2]&lt;br /&gt;
* [[PinePhone_v1.2|PinePhone schematic ver 1.2 change list]]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20Schematic%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard Schematic ver 1.1]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20top%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component top placement drawing ver 1.1]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20bottom%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component bottom placement drawing ver 1.1]&lt;br /&gt;
* [[PinePhone component list]]&lt;br /&gt;
&lt;br /&gt;
PinePhone USB-C small board schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20schematic%20v1.0%2020190730.pdf PinePhone USB-C small board Schematic ver 1.0]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20top%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component top placement drawing ver 1.0]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20bottom%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component bottom placement drawing ver 1.0]&lt;br /&gt;
&lt;br /&gt;
PinePhone certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20FCC%20SDOC%20Certificate-S19112602605001.pdf PinePhone FCC Certificate]&lt;br /&gt;
* [https://fcc.report/FCC-ID/2AWAG-PINEPHONE RF Exposure SAR Information from FCC ID site]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20CE%20RED%20Certificate-S19112602602.pdf PinePhone CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20ROHS%20Report.pdf PinePhone ROHS Report]&lt;br /&gt;
* Note: PinePhone's Type Allocation Code (TAC) is &amp;lt;i&amp;gt;86769804&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
&lt;br /&gt;
Allwinner A64 SoC information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
X-Powers AXP803 PMIC (Power Management IC) information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
eMMC information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/Kimtigo_fbga153_16_32_64_eMMC_datasheet_v1.3.pdf Kimtigo eMMC datasheet]&lt;br /&gt;
&lt;br /&gt;
CMOS camera module information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/QZ01-rear-2019-0717(HW)%20Model.pdf PinePhone 5M Pixel Real CMOS Image Sensor Module]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
* [https://usermanual.wiki/Document/OV5640FirmwareUserGuideV10.952852672.pdf OV5640 Embedded Firmware User Guide&amp;amp;nbsp;&amp;amp;ndash; VCM AF Module]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/QZ01-front-2019-0717(HW)%20Model.pdf PinePhone 2M Pixel Front CMOS Image Sensor Module]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
LCD touch screen panel information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20LCD-QZ01.pdf 5.99&amp;quot; 1440x720 LCD IPS Panel specification]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/ST7703_DS_v01_20160128.pdf ST7703 LCD Controller datasheet]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/GT917S-Datasheet.pdf GOODiX GT917S Capacitive Touch Controller datasheet]&lt;br /&gt;
&lt;br /&gt;
Lithium battery information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf PinePhone Lithium Battery specification]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20ZCV%20Curve%20Chart.xlsx PinePhone Lithium Battery ZCV curve chart]&lt;br /&gt;
* [https://cad.onshape.com/documents/5194d6303f021e6f300b70a0/w/7b63ac4c32ed63dfd78c7840/e/5d43c0ce5b665bae10082a08 PinePhone Lithium Battery 3D onshape drawing]&lt;br /&gt;
&lt;br /&gt;
WiFi/BT module information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
LTE module information:&lt;br /&gt;
* [[File:Quectel_EG25-G_LTE_Standard_Specification_V1.3.pdf]]&lt;br /&gt;
* [[File:Quectel_EG25-G_Hardware_Design_V1.4.pdf]]&lt;br /&gt;
* [[File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf]]&lt;br /&gt;
* [[File:Quectel_EC2xEG25-GEG9xEM05_FILE_AT_Commands_Manual_V1.0.pdf]]&lt;br /&gt;
* [[File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_GNSS_Application_Note_V1.3.pdf]]&lt;br /&gt;
&lt;br /&gt;
Sensors:&lt;br /&gt;
* [https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL 3-axis Magnetometer Datasheet]&lt;br /&gt;
* [https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/ InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS datasheet]&lt;br /&gt;
* [https://www.sensortek.com.tw/en/product/Proximity_Sensor_with_ALS.html SensorTek STK3335 Ambient Light Sensor and Proximity Sensor]&lt;br /&gt;
&lt;br /&gt;
Digital video to USB-C bridge:&lt;br /&gt;
* [https://www.analogix.com/en/system/files/AA-002281-PB-6-ANX7688_Product_Brief.pdf ANX7688 product brief]&lt;br /&gt;
&lt;br /&gt;
Case information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Exploded%20Diagram%20ver%201.0.pdf PinePhone case exploded diagram]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Back%20Cover.stp PinePhone back cover 3D file]&lt;br /&gt;
&lt;br /&gt;
Other components:&lt;br /&gt;
* See the [[PinePhone_component_list|Component List]]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
The following articles contain more specific information:&lt;br /&gt;
* [[PinePhone Accessibility]]&lt;br /&gt;
* [[PinePhone Power Management]]&lt;br /&gt;
* [[PinePhone Security]]&lt;br /&gt;
* [[PinePhone UBports OS Design Discussion]]&lt;br /&gt;
&lt;br /&gt;
The following resources have been made available by Ondřej Jirman, a developer for the Pinephone:&lt;br /&gt;
* [https://xnux.eu/howtos/pine64-pinephone-getting-started.html Getting started with PinePhone Hardware]&lt;br /&gt;
* [https://xnux.eu/devices/pine64-pinephone.html State of development progress]&lt;br /&gt;
* [https://xnux.eu/log/ Development log]&lt;br /&gt;
* [https://xnux.eu/news.html PinePhone Technical News and Update, also applies to other Allwinner devices including PINE A64 SBC]&lt;br /&gt;
* [https://xnux.eu/contribute.html Contributions to the kernel development]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://pine64.com/product-category/pinephone/ The PinePhone on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product-category/smartphone-spare-parts/ PinePhone spare parts on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product-category/smartphone-accessories/ PinePhone accessories on the official Pine store]&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=20992</id>
		<title>PinePhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=20992"/>
		<updated>2023-10-23T15:22:12Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Pogo pins */ Pulled unproblematic information on top&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PinePhone Beta Edition.png|400px|thumb|right|Rendering of the PinePhone Beta Edition]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone''' is a smartphone created by PINE64. It is capable of running mainline Linux and is supported by many partner projects.&lt;br /&gt;
&lt;br /&gt;
The Braveheart Edition of the PinePhone was the first publicly available version of the phone. It shipped without a fully functional operating system and was geared specifically towards early adopters. The Braveheart Edition's successors were the Community Editions, which featured a branded backcover and box of selected community projects. The Community Editions became available in June 2020. The Beta Edition featuring Manjaro with Plasma Mobile is the latest edition, it became available in March 2021.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone is not a regular phone and you might not get the latest and greatest hardware and this years' newest innovation. You will get a device with good mainline support with a great community behind it.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&lt;br /&gt;
First things first, the PinePhone is aimed solely at early adopters - more specifically, the units are solely intended to find their way into the hands of users with extensive operating system experience.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is very early, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the community chat (see [[Main Page#Community and Support]])!&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time installation ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again.&lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The PinePhone's SIM slot only accepts a micro-SIM, please do not insert a nano-SIM without an adapter and make sure that the nano-SIM does not get released from its adapter. The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot.&lt;br /&gt;
&lt;br /&gt;
{{Info|Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the micro-SIM in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
An adapter from a nano to a micro-SIM might be included under tape in the camera notch of the phone's packaging. Some nano-SIMs will not fit firmly into that adapter that comes with the PinePhone and if the included adapter is used without a well-fitting nano-SIM, the contact pins might get damaged. In that case it is highly recommended to acquire a better fitting adapter.&lt;br /&gt;
&lt;br /&gt;
== Operating systems ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distribution (because the PinePhone uses the mainline kernel), there are a few that are designed specifically for mobile use on devices like the PinePhone.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Software Releases]] page has a complete list of currently supported phone-optimized Operating System images that work with the PinePhone as well as other related software information. As soon as more patches get mainlined and distributions ship with the updated kernel, they will also be able to run unmodified on the device. To update any installed operating system please see [[PinePhone Updating Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The instructions to install an operating system to the internal memory (&amp;quot;eMMC&amp;quot;) or a microSD card can be found here: [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone is not booting from eMMC and/or microSD card anymore it can have two causes:&lt;br /&gt;
&lt;br /&gt;
==== The battery is drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is fully drained, most operating systems and distributions won't boot anymore. One of the exceptions which still boots is the utility ''Jumpdrive'', which can usually be used to expose the eMMC and microSD card as drives to a USB-connected computer. Mind that JumpDrive won't expose the eMMC and microSD card with a drained battery but it still can be flashed and booted from microSD card to confirm that the phone still functions and boots up fine. &lt;br /&gt;
&lt;br /&gt;
JumpDrive can be downloaded from [https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.8/pine64-pinephone.img.xz here] (not compatible with the PinePhone Pro!). &lt;br /&gt;
&lt;br /&gt;
{{Info|If JumpDrive boots and other releases do not boot, the battery is likely drained. In that case let it charge while running JumpDrive with a compatible charger for multiple hours and make sure to not fully drain the battery in the future anymore, as that significantly reduces the battery lifetime.}}&lt;br /&gt;
&lt;br /&gt;
Alternatively to testing JumpDrive, the issue can also be diagnosed by checking the battery charge. Simply remove the battery from the device and measure the voltage on the (+) and (-) contacts on the battery. Make sure to not shorten the contacts as shorting battery pins is a severe life and safety danger.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted or incorrect ====&lt;br /&gt;
&lt;br /&gt;
If the installation of the prioritized boot medium is corrupted or incorrect, the PinePhone will not boot anymore. The following problems are common:&lt;br /&gt;
&lt;br /&gt;
* The microSD card is in the wrong slot (see [[#First time installation|first time installation]])&lt;br /&gt;
* The image file was flashed to partition 1 (example: ''sdx1'', ''nvme0x1p1'') instead of the whole device (example: ''sdx'', ''nvme0x1'')&lt;br /&gt;
* An image without bootloader was flashed (mind the ''Tow-Boot'' bootloader requirements of ''Mobian'' and ''postmarketOS'')&lt;br /&gt;
* The operating systems got corrupted, for example after running updates (reflash the device, see [[PinePhone Installation Instructions]])&lt;br /&gt;
* An incompatible image was flashed (make sure that the images are compatible. Images for the PinePhone Pro won't boot on the PinePhone and vice versa. Check your invoice to see if you ordered a PinePhone or a PinePhone Pro).&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.5 x 76.6 x 9.2mm&lt;br /&gt;
* '''Weight:''' Between 180 ~ 200 grams&lt;br /&gt;
* '''SIM Card:''' Micro-SIM&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 5.95 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' [https://linux-sunxi.org/A64 Allwinner A64]&lt;br /&gt;
* '''RAM:''' 2GB or 3GB LPDDR3 SDRAM&lt;br /&gt;
* '''Internal Storage:''' 16GB or 32GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''Back Camera:''' Single 5MP, 1/4&amp;quot;, LED Flash&lt;br /&gt;
* '''Front Camera:''' Single 2MP, f/2.8, 1/5&amp;quot;&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN:''' Wi-Fi 802.11 b/g/n, single-band, hotspot&lt;br /&gt;
** '''Bluetooth:''' 4.0, A2DP&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| OmniVision OV5640&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| SGMICRO SGM3140&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| GalaxyCore GC2145&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Xingbangda XBD599&lt;br /&gt;
|-&lt;br /&gt;
| WiFi&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| Magnetometer&lt;br /&gt;
| ST LIS3MDL&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| SensorTek STK3335&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| InvenSense MPU-6050&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| Unknown model&lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See the [[PinePhone_component_list|PinePhone Component List]].&lt;br /&gt;
&lt;br /&gt;
== Hardware revisions ==&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone_revisions.png|400px|thumb|right|The history of the PinePhone CEs]]&lt;br /&gt;
&lt;br /&gt;
The following are all hardware revisions of the PinePhone that have existed, ordered by the time of their releases:&lt;br /&gt;
&lt;br /&gt;
* [[Project Anakin]] - Development kit&lt;br /&gt;
* [[Project Don't be evil]] - Development kit&lt;br /&gt;
* [[PinePhone v1.0 - Dev|PinePhone v1.0]] - Developer Edition&lt;br /&gt;
* [[PinePhone v1.1 - Braveheart|PinePhone v1.1]] - Braveheart Edition&lt;br /&gt;
* [[PinePhone v1.2]] - Ubports Community Edition&lt;br /&gt;
* [[PinePhone v1.2a]] - postmarketOS Community Edition&lt;br /&gt;
* [[PinePhone v1.2b]] - Manjaro Community Edition, KDE Community Edition, Mobian Community Edition and Beta Edition&lt;br /&gt;
&lt;br /&gt;
== Hardware accessory ==&lt;br /&gt;
&lt;br /&gt;
=== Add-ons ===&lt;br /&gt;
The PinePhone (and PinePhone Pro) is compatible with the official add-on cases, such as the keyboard, the LoRa add-on, the Qi wireless charging add-on and the fingerprint reader add-on. Details can be found under:&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone (Pro) Add-ons]]&lt;br /&gt;
* [[PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
=== PinePhone Accessories ===&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]] for a list of devices working with the PinePhone (depending on their OS support).&lt;br /&gt;
&lt;br /&gt;
The USB-C can be used to power the device, and offers USB2 host and OTG capabilities, and also can make use of the USB-C capability to integrate HDMI signals. Some USB-C hubs are available that offer power throughput, USB connection, an HDMI port and Ethernet connection.&lt;br /&gt;
&lt;br /&gt;
=== Pogo pins ===&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone pogo.png|400px|thumb|right|The pogo pins, as visible under the back cover.]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone has six pogo pins on the back allowing for custom hardware extensions such as wireless charging, an IR blaster, a keyboard extension or extended battery case. The pogo pins provide access to an interrupt line, power inputs/outputs and an I2C interface.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Interrupt&lt;br /&gt;
| SDA&lt;br /&gt;
| SCL&lt;br /&gt;
|-&lt;br /&gt;
| DCIN&lt;br /&gt;
| USB-5V&lt;br /&gt;
| GND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PINE64 store currently sells the [https://pine64.com/product/pinephone-flex-break-out-board/?v=0446c16e2e66 PinePhone Flex Breakout Board]. With the pitch being 2.54 mm, this Flex Breakout Board may have leads soldered directly to the contacts for use in a solderless board. A non-soldered solution would be to use a [https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/5-520315-6/2258879 TE AMP Connector] that will accept a Flat Flexible Cable 2.54 mm pitch.&lt;br /&gt;
&lt;br /&gt;
{{Warning|The following information in this subsection is only partially correct.  A rewrite is currently pending.}}&lt;br /&gt;
&lt;br /&gt;
DCIN and USB-5V are the names used in the schematics. The actual behavior of these pogo pins is not obvious based on their names. DCIN is connected both to the VBUS line of the USB Type-C connector and to the ACIN/VBUS inputs on the PMIC. This means that, depending on a number of factors, DCIN may be at 0&amp;amp;nbsp;V or 5&amp;amp;nbsp;V. USB-5V is connected at the output of an LP6226 DC/DC boost converter (5&amp;amp;nbsp;V), which in turn is fed by the PS output of the PMIC. The boost converter is enabled or disabled by a GPIO output from the A64 SoC, controlled by software (e.g. the Linux kernel). Depending on inputs and decision made by the PMIC, PS may be at the battery voltage (fed &amp;quot;directly&amp;quot; by the battery through a [https://www.zxcompo.com/ transistor] controlled by the PMIC), or at the &amp;quot;USB&amp;quot; voltage (fed by the PMIC's ACIN/VBUS inputs). This means that depending on a number of factors, USB-5V may be at battery voltage (between 3.0&amp;amp;nbsp;V and 4.3&amp;amp;nbsp;V), or at 5&amp;amp;nbsp;V.&lt;br /&gt;
&lt;br /&gt;
Because the PinePhone may act as a USB host (providing 5&amp;amp;nbsp;V at the USB Type-C connector's VBUS to a connected device) or as a USB device (drawing from a 5&amp;amp;nbsp;V source on the USB Type-C connector's VBUS), DCIN is actually not strictly an input nor an output. Some community analysis of the PinePhone schematic (and some testing) indicates that you can connect a 5&amp;amp;nbsp;V power supply to DCIN in order to power the phone at the PMIC's ACIN/VBUS inputs (and, as a side effect, charge the battery). This may not be safe to do in all conditions, e.g., when the phone is acting as a USB host to a connected USB device. It should also be safe to use DCIN as a power output from the PinePhone, e.g., when a USB Type-C charger is connected, you can draw current directly from the USB Type-C port's VBUS, which is provided by the charger. Please note that, when using DCIN as an output from the PinePhone, DCIN isn't &amp;quot;always on&amp;quot;; it may be 0&amp;amp;nbsp;V. It is currently not documented on how much current can be safely drawn.&lt;br /&gt;
&lt;br /&gt;
USB-5V should be safe to use as an &amp;quot;always on&amp;quot; power output from the PinePhone. Depending on a number of factors, voltage may be from 3&amp;amp;nbsp;V to 5&amp;amp;nbsp;V; thus, if you are using USB-5V to power your pogo-pins expansion board, you will probably need to use DC/DC converters/regulators as appropriate. USB-5V is on even while the A64 SoC is powered down.&lt;br /&gt;
&lt;br /&gt;
The I2C and interrupt lines have pull-ups on the phone side. The I2C lines are pulled up to 3v3 by the phone.&lt;br /&gt;
&lt;br /&gt;
For a breakout board see [https://github.com/SMR404/PinephonePogoBreakout here]. For an example project see Martijn's blog post [https://blog.brixit.nl/making-a-backcover-extension-for-the-pinephone/ &amp;lt;i&amp;gt;&amp;quot;Making a backcover extension for the PinePhone&amp;quot;&amp;lt;/i&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Back cover ===&lt;br /&gt;
A step file for the back cover for creating custom cases is freely available [https://files.pine64.org/doc/PinePhone/PinePhone%20Back%20Cover%20ver%200.5.stp here].&lt;br /&gt;
&lt;br /&gt;
=== Serial console ===&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone_Serial_Cable.png|400px|thumb|right|Pinout of the serial adapter. This shows signals from the PinePhone's point of view, so connect the adapter's Rx to Ring 1 and Tx to Tip]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone has a serial port in the headphone connector, it's activated by the 6th contact on the dipswitch. If the switch is set to &amp;quot;on&amp;quot;, the headphone connector is in audio mode, if it is set to &amp;quot;off&amp;quot; it's in UART mode. The UART serial connection can also be used for communication with other devices from the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The UART is 115200n8.&lt;br /&gt;
&lt;br /&gt;
The pinout for the serial connector is:&lt;br /&gt;
&lt;br /&gt;
* Tip: RX&lt;br /&gt;
* Ring: TX&lt;br /&gt;
* Sleeve: GND&lt;br /&gt;
&lt;br /&gt;
You can buy a serial debug cable from the [https://pine64.com/product/pinebook-pinephone-pinetab-serial-console/ PINE64 Store]. The store cable uses a 4 ring plug, as seen in the [https://files.pine64.org/doc/pinebook/guide/Pinebook_Earphone_Serial_Console_Developer_Guide.pdf here], but a 3 ring plug works just as well. The cable uses a CH340 chipset based serial to USB converter, but any 3.3v serial connection can be used. Because it is a &amp;quot;host&amp;quot;/DTE it means that you need a ''cross modem cable'' ([https://en.wikipedia.org/wiki/Null_modem Null Modem]) with TX on Tip to be connected to RX. A cable like e.g. [https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm FTDI TTL-232R-3V3-AJ] which has TX on Tip and RX on Ring fits perfectly.&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Camera ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone has two cameras, OmniVision OV5640 with 5MP (up to 2592 x 1944 pixels) as rear camera and GalaxyCore GC2145 with 2MP (up to 1600 x 1200 pixels) as front camera.&lt;br /&gt;
&lt;br /&gt;
[[File:Rose.jpg|400px|thumb|none|Example picture taken on the PinePhone's rear camera by Martijn Braam using his app ''Megapixels''.]]&lt;br /&gt;
&lt;br /&gt;
Further details regarding the camera and the Megapixels camera app can be found on [https://blog.brixit.nl/tag/phones/ Martijn's blog].&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
The phone ships with a protective plastic sticker between the battery and the phone to protect the device from turning on during shipping. You need to gently open the back cover, then remove the battery and finally remove the sticker and check that the pins aren't bent. Note: If the battery is stuck inside the phone, the mid screw in the lower part of the midframe needs to be slightly loosened, see [[PinePhone_FAQ#The_battery_is_stuck_inside_the_phone|here]].&lt;br /&gt;
&lt;br /&gt;
{{Info|The EG25-G modem and the RTL8723CS WiFi and Bluetooth do not work without a battery and with a drained battery, even when enough power is supplied to the PinePhone via the USB Type-C port. Most operating systems won't boot without a battery or with a drained battery.}}&lt;br /&gt;
&lt;br /&gt;
The [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf supplied battery] is meant to be compatible with Samsung part number EB-BJ700BBC / BBE / CBE from the 2015 J7 phone. The extended life aftermarket BBU does fit, although it is a tight fit.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Using an aftermarket battery with a higher capacity is done at own risk. Batteries with a higher capacity especially in combination with an external charger can lead to overvoltage, which fries the modem and/or the Bluetooth and WiFi chip.}}&lt;br /&gt;
&lt;br /&gt;
The battery terminals, from the nearest to the battery edge to the nearest to the middle of battery, are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | +ve&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | thermistor&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | -ve&lt;br /&gt;
| style=&amp;quot;min-width: 90px; text-align: center;&amp;quot; | not connected&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The battery includes a protection circuit that isolates it in a number of fault conditions, including if it is discharged too far. The fully discharged battery can be recharged by connecting the phone to a charger with a sufficient output. Once it has charged sufficiently you will be able to boot the phone.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;atinout&amp;lt;/i&amp;gt; example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;minicom&amp;lt;/i&amp;gt; example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;minicom -D /dev/ttyUSB2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone's modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CFUN=1,1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to poweroff the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the [[PinePhone#Datasheets for components and peripherals|documentation section]] below.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Safety ==&lt;br /&gt;
&lt;br /&gt;
=== General recommendations ===&lt;br /&gt;
&lt;br /&gt;
Due to the greater control the user is having over the device and its software comes also greater responsibility. It is necessary to verify the configuration of the device to make sure that responsible settings are used. The different operating systems may come with non-sane default settings, including SSH with weak password authentication being enabled by default and exposed to the public Internet, the absence of a firewall, default passwords, unencrypted files, too high temperature zones and emergency shutoff values or an enabled root account. The usage of public resources to verify such settings (such as the in case of GNU/Linux, the Arch Linux [https://wiki.archlinux.org/title/security security] wiki page, or the [https://wiki.archlinux.org/title/general_recommendations general recommendations]) as well as the corresponding operating system's or distribution's resources are strongly recommended.&lt;br /&gt;
&lt;br /&gt;
=== Charging safety ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone supports up to 5V 3A (15W) Quick Charge, it follows the USB Power Delivery specification. Only compatible phone chargers may be used, charging the phone with incompatible chargers (for example laptop chargers with a higher voltage) is prohibited. Charging the phone releases heat, general safety recommendations must be followed, see the section ''Thermal safety''.&lt;br /&gt;
&lt;br /&gt;
=== Thermal safety ===&lt;br /&gt;
&lt;br /&gt;
With the Allwinner A64 being an older generation SoC with a large 40nm chip, the phone produces quite some heat with medium or higher use and especially also during charging or when using USB accessories, like a docking station. Measurements to prevent damage to the phone and to its surroundings need to be taken by the user. This includes especially a proper handling of the phone: do not charge the phone in a way where heat builds up around the phone without being able to escape. Especially don't charge your phone under a pillow, blankets, in pockets or bags. Charging the phone produces heat and charging the phone in a way, where the excessive heat can't dispose around the phone poses an immediate fire risk.&lt;br /&gt;
&lt;br /&gt;
The user might notice that the phone gets warm under usage, compared to phones with more up-to-date hardware. Under normal circumstances these temperatures don't pose a risk while being in the levels within the safe operating temperatures (which lay far beyond the point where components can be too hot to touch). Higher temperatures might especially be experienced on the top side of the screen and on the inside of the phone at the RF shield of the modem. The higher temperature of the RF shield of the modem is commonly caused by the SoC on the opposite side of the mainboard, the RF shield of the modem is used to disperse heat of the SoC. In newer mainboard revisions starting from 1.2a there are also thermal pads on the back cover and between the SoC's RF shield and the screen, dispersing heat on the screen and on the back cover. In the past there has been safety issues regarding thermal safety functions, causing temperature reads to not properly work over an extended period of time, which was causing heat damage in some cases (see the documentation of that issue by the developer Megous [http://xnux.eu/log/#018 here] and [http://xnux.eu/log/#017 here]). While the developers are working hard to prevent such issues, they can't be excluded under all circumstances (see [[PinePhone#State_of_the_software|state of the software]]). The users are expected to monitor their phones' thermal safety at every point at this state of the software.&lt;br /&gt;
&lt;br /&gt;
It is highly recommend to update the phone on a regular basis to always get the latest improvements. The default settings to throttle the performance and to shut down the phone when reaching critical temperatures might be set to a too high point depending on the specific usage and usage length. Under GNU/Linux the phone's thermal management behavior can be modified via the Thermal Sysfs driver to achieve lower temperatures and preventing the screen and other components to potentially take damage, see [[PinePhone Thermal Tweaks]] for the details.&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
For a list of frequently asked questions (including information regarding the shipping) see [[PinePhone FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
=== Swapping in a new mainboard revision ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced, for example for upgrading to a newer hardware revision or if it is faulty. The replacement board does not have an OS preinstalled, to test if everything is working after swapping the mainboard a flashed SD card is required. The mainboard also comes with a non-functional firmware on the ANX chip, a newer firmware version has to be flashed as explained below to get certain USB functionality to work.&lt;br /&gt;
&lt;br /&gt;
==== Replacing the mainboard ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an OS from SD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the PinePhone’s mainboard.&lt;br /&gt;
# Remove the PinePhone’s back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio/ UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Check that the rubber proximity sensor housing is in the chassis, not stuck to the removed mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; can be found here (or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here]):&lt;br /&gt;
[[File:Pinephone_martijn_pcb_replacement.png|thumb|none|600px|link=https://www.youtube.com/watch?v=5GbMoZ_zuZs|Watch Martijn Braam's video tutorial here: https://www.youtube.com/watch?v=5GbMoZ_zuZs.]]&lt;br /&gt;
&lt;br /&gt;
==== Flashing the ANX firmware ====&lt;br /&gt;
&lt;br /&gt;
===== Method 1 =====&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the ANX7688 chip has to be flashed for full USB functionality.&lt;br /&gt;
&lt;br /&gt;
Under GNU/Linux this can be done by downloading the latest ANX7688 firmware image on the phone:&lt;br /&gt;
&lt;br /&gt;
 wget https://xff.cz/git/linux-firmware/plain/anx7688-fw.bin&lt;br /&gt;
&lt;br /&gt;
and executing as root (&amp;quot;sudo su&amp;quot;) on the phone:&lt;br /&gt;
&lt;br /&gt;
 cp anx7688-fw.bin /lib/firmware/&lt;br /&gt;
 echo 1 &amp;gt; /sys/class/typec/port0/device/flash_eeprom&lt;br /&gt;
&lt;br /&gt;
===== Method 2 =====&lt;br /&gt;
&lt;br /&gt;
Booting a factory test image will automatically flash the ANX7688 chip. See [[PinePhone Software Releases#Factory Test OS|Factory Test OS]] for such an image.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Swapping in a new mainboard revision|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a gold-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the PINE64 store ===&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
=== Other hardware issues ===&lt;br /&gt;
&lt;br /&gt;
See also [[PinePhone Hardware Issues]] for more issues and how-to's.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== PinePhone board information, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2b%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2b]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2a%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2a]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2]&lt;br /&gt;
* [[PinePhone_v1.2|PinePhone schematic ver 1.2 change list]]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20Schematic%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard Schematic ver 1.1]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20top%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component top placement drawing ver 1.1]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20bottom%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component bottom placement drawing ver 1.1]&lt;br /&gt;
* [[PinePhone component list]]&lt;br /&gt;
&lt;br /&gt;
PinePhone USB-C small board schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20schematic%20v1.0%2020190730.pdf PinePhone USB-C small board Schematic ver 1.0]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20top%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component top placement drawing ver 1.0]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20bottom%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component bottom placement drawing ver 1.0]&lt;br /&gt;
&lt;br /&gt;
PinePhone certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20FCC%20SDOC%20Certificate-S19112602605001.pdf PinePhone FCC Certificate]&lt;br /&gt;
* [https://fcc.report/FCC-ID/2AWAG-PINEPHONE RF Exposure SAR Information from FCC ID site]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20CE%20RED%20Certificate-S19112602602.pdf PinePhone CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20ROHS%20Report.pdf PinePhone ROHS Report]&lt;br /&gt;
* Note: PinePhone's Type Allocation Code (TAC) is &amp;lt;i&amp;gt;86769804&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
&lt;br /&gt;
Allwinner A64 SoC information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
X-Powers AXP803 PMIC (Power Management IC) information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
eMMC information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/Kimtigo_fbga153_16_32_64_eMMC_datasheet_v1.3.pdf Kimtigo eMMC datasheet]&lt;br /&gt;
&lt;br /&gt;
CMOS camera module information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/QZ01-rear-2019-0717(HW)%20Model.pdf PinePhone 5M Pixel Real CMOS Image Sensor Module]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
* [https://usermanual.wiki/Document/OV5640FirmwareUserGuideV10.952852672.pdf OV5640 Embedded Firmware User Guide&amp;amp;nbsp;&amp;amp;ndash; VCM AF Module]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/QZ01-front-2019-0717(HW)%20Model.pdf PinePhone 2M Pixel Front CMOS Image Sensor Module]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
LCD touch screen panel information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20LCD-QZ01.pdf 5.99&amp;quot; 1440x720 LCD IPS Panel specification]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/ST7703_DS_v01_20160128.pdf ST7703 LCD Controller datasheet]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/GT917S-Datasheet.pdf GOODiX GT917S Capacitive Touch Controller datasheet]&lt;br /&gt;
&lt;br /&gt;
Lithium battery information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf PinePhone Lithium Battery specification]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20ZCV%20Curve%20Chart.xlsx PinePhone Lithium Battery ZCV curve chart]&lt;br /&gt;
* [https://cad.onshape.com/documents/5194d6303f021e6f300b70a0/w/7b63ac4c32ed63dfd78c7840/e/5d43c0ce5b665bae10082a08 PinePhone Lithium Battery 3D onshape drawing]&lt;br /&gt;
&lt;br /&gt;
WiFi/BT module information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
LTE module information:&lt;br /&gt;
* [[File:Quectel_EG25-G_LTE_Standard_Specification_V1.3.pdf]]&lt;br /&gt;
* [[File:Quectel_EG25-G_Hardware_Design_V1.4.pdf]]&lt;br /&gt;
* [[File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf]]&lt;br /&gt;
* [[File:Quectel_EC2xEG25-GEG9xEM05_FILE_AT_Commands_Manual_V1.0.pdf]]&lt;br /&gt;
* [[File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_GNSS_Application_Note_V1.3.pdf]]&lt;br /&gt;
&lt;br /&gt;
Sensors:&lt;br /&gt;
* [https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL 3-axis Magnetometer Datasheet]&lt;br /&gt;
* [https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/ InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS datasheet]&lt;br /&gt;
* [https://www.sensortek.com.tw/en/product/Proximity_Sensor_with_ALS.html SensorTek STK3335 Ambient Light Sensor and Proximity Sensor]&lt;br /&gt;
&lt;br /&gt;
Digital video to USB-C bridge:&lt;br /&gt;
* [https://www.analogix.com/en/system/files/AA-002281-PB-6-ANX7688_Product_Brief.pdf ANX7688 product brief]&lt;br /&gt;
&lt;br /&gt;
Case information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Exploded%20Diagram%20ver%201.0.pdf PinePhone case exploded diagram]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Back%20Cover.stp PinePhone back cover 3D file]&lt;br /&gt;
&lt;br /&gt;
Other components:&lt;br /&gt;
* See the [[PinePhone_component_list|Component List]]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
The following articles contain more specific information:&lt;br /&gt;
* [[PinePhone Accessibility]]&lt;br /&gt;
* [[PinePhone Power Management]]&lt;br /&gt;
* [[PinePhone Security]]&lt;br /&gt;
* [[PinePhone UBports OS Design Discussion]]&lt;br /&gt;
&lt;br /&gt;
The following resources have been made available by Ondřej Jirman, a developer for the Pinephone:&lt;br /&gt;
* [https://xnux.eu/howtos/pine64-pinephone-getting-started.html Getting started with PinePhone Hardware]&lt;br /&gt;
* [https://xnux.eu/devices/pine64-pinephone.html State of development progress]&lt;br /&gt;
* [https://xnux.eu/log/ Development log]&lt;br /&gt;
* [https://xnux.eu/news.html PinePhone Technical News and Update, also applies to other Allwinner devices including PINE A64 SBC]&lt;br /&gt;
* [https://xnux.eu/contribute.html Contributions to the kernel development]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://pine64.com/product-category/pinephone/ The PinePhone on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product-category/smartphone-spare-parts/ PinePhone spare parts on the official Pine store]&lt;br /&gt;
* [https://pine64.com/product-category/smartphone-accessories/ PinePhone accessories on the official Pine store]&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=20977</id>
		<title>PinePhone (Pro) Keyboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=20977"/>
		<updated>2023-10-21T11:01:04Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Reverted edits by Zo (talk) to last revision by Fxc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PP_KB_Front-1024x576.jpg|400px|thumb|right|Picture of the PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone (Pro) Keyboard Case''' is a case compatible with the [[PinePhone]] and [[PinePhone Pro]], adding a keyboard functionality to the phone. It features a clam-shell design and uses the pogo pins located on the smartphone’s midsection and attaches by replacing the default back cover. This add-on effectively turns the PinePhone (Pro) into a PDA with an in-built LTE modem.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
[[File:Ppkb_description.png|thumb|upright=1.2|&lt;br /&gt;
① Contact pads&amp;lt;br&amp;gt;&lt;br /&gt;
② Battery switch&amp;lt;br&amp;gt;&lt;br /&gt;
③ USB-C connector]]&lt;br /&gt;
&lt;br /&gt;
The keyboard case works with both the PinePhone and PinePhone Pro and features a clam-shell design. It uses pogo pins located on the phone’s midsection and attaches by replacing the default back cover. When folded, the phone’s screen and the keyboard rest securely against each other. The hinge features a 180° design, which not only allows for two-hand typing on a surface but also for comfortable thumb-typing when fully extended. The etched keycaps can be easily relocated for alternate layouts such as AZERTY or QWERTZ. The keyboard case runs an [https://xff.cz/git/pinephone-keyboard/ open firmware], which means that anyone with the know-how can alter existing functions or add new ones. The bottom (keyboard) and top (phone) sections of the assembly are well-balanced thanks to the large, 6000mAh, internal battery capable of charging the PinePhone (Pro) during operation. The internal battery effectively triples the phone’s battery life. The internal keyboard battery can be manually toggled on/off and the keyboard’s battery charge level can be read in the supported operating systems; the keyboard remains functional with the battery fully depleted.&lt;br /&gt;
&lt;br /&gt;
You do not lose access to the PinePhone (Pro)’s USB-C port, speaker, microphone, or any external features, such as volume and lock buttons, with the keyboard attached. There is also a cut-out for the camera, torch, and headphone jack. The USB-C port on the keyboard is capable of powering both the keyboard and PinePhone (Pro) simultaneously. This means that you can plug in a USB-C charger into the keyboard to charge the keyboard's internal battery, while the PinePhone (Pro) is charging via the internal connection between phone and keyboard.&lt;br /&gt;
&lt;br /&gt;
{{warning|Do not plug in a charger into the keyboard and the phone at the same time. Using the USB-C port of the PinePhone (Pro) while a charger to is connected to the USB-C port of the keyboard is also discouraged for the same reason. Technical details regarding the issue can be found in the blog post of the developer ''megi'' [http://xnux.eu/log/072.html here], in [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post and the [[PinePhone (Pro) Keyboard#Safety|safety]] section.}}&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that the keyboard case transforms the PinePhone (Pro) into a PDA, which means that taking calls will likely prove awkward without a wired or wireless headset connected (try speakerphone button if available).&lt;br /&gt;
&lt;br /&gt;
=== Mounting the keyboard ===&lt;br /&gt;
Power off your PinePhone and remove the back case. To remove the back case of the PinePhone use your fingernail or another soft object to pry up the back case. A notch to easily remove the cover is located at the bottom left of the PinePhone with the backcover facing the user. &lt;br /&gt;
&lt;br /&gt;
Open and place the keyboard flat on a hard surface with the hinge fully extended. Proceed to insert the PinePhone into the keyboard at an angle of approx. 15 degrees. Make sure that the PinePhone’s pogo pins and the corresponding pads ① on the keyboard are aligned. The leading edge with volume and power buttons should make contact first. Firmly press the PinePhone into place. Multiple clicks should be heard as the two snap into place. Pay special attention to the plastic pin below the camera hole. Firmly push from the rear, below the camera hole, to click it into position. Failing to do so may cause an insufficient pin contact and prevent the case from charging the phone.&lt;br /&gt;
&lt;br /&gt;
The PinePhone can be removed from the keyboard easily using a notch similar to the one found on the back case. The notch is located at the bottom of the leading edge with the power and volume buttons.&lt;br /&gt;
&lt;br /&gt;
=== Operation ===&lt;br /&gt;
The keyboard will function automatically once a PinePhone running a compatible operating system is mounted. For alterations to physical layout and firmware see the relevant sections respectively.&lt;br /&gt;
&lt;br /&gt;
The keyboard features an in-built 6000mAh battery. The battery can be turned ON/OFF using the button on the right leading edge of the keyboard ②. A short button press activates the internal battery while a long (15 seconds) press or double press deactivates it. Compatible operating systems display both the PinePhone’s and keyboard’s battery status together.&lt;br /&gt;
&lt;br /&gt;
You should charge the PinePhone and the keyboard &amp;lt;u&amp;gt;only&amp;lt;/u&amp;gt; using the USB-C ③ port on the keyboard. The keyboard’s USB-C port cannot be used for peripherals. The PinePhone’s USB-C port remains operational when mounted in the keyboard and can be used for data and peripherals.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
There are multiple possible hardware issues users could face. It is recommend to check the following most common hardware issues and their solutions and workarounds.&lt;br /&gt;
&lt;br /&gt;
==== Pogo pins not making proper contact ====&lt;br /&gt;
Under certain scenarios the keyboard's contacts are not making proper contact with the pogo pins of the phone. To address the issue:&lt;br /&gt;
&lt;br /&gt;
* Power down the phone!&lt;br /&gt;
* Apply '''slight''' pressure in the upper mid of the PinePhone's backside until the plastic holder pin towards the upper middle of the keyboard cover, until an audible click can be heard.&lt;br /&gt;
* Make sure the contacts and pogo pins are clean and the pogo pins can be slightly pressed individually.&lt;br /&gt;
* If the above does not work, a shim under the keyboard's contacts might be required, as explained [https://xnux.eu/pinephone-keyboard/faq.html#ts FAQ troubleshooting section]. See also this [https://freiburg.social/system/media_attachments/files/107/684/243/421/870/279/original/a5e9c68ff3510ec8.jpeg photo of where to place the shim], or [https://www.youtube.com/watch?v=4ixPjz6SPIA this video].&lt;br /&gt;
&lt;br /&gt;
==== Top row is less responsive ====&lt;br /&gt;
The keys of the top row may be less responsive. The issue can be worked around by adding inserts to the underside of the top row key caps to decrease the travel distance. More details regarding the workaround can be found in the corresponding section of the FAQ page of the developer megi: https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
==== Software issues ====&lt;br /&gt;
For any software issue please see the [[PinePhone (Pro) Keyboard#Software support|Software support section]] and the [[PinePhone (Pro) Keyboard#Frequently asked questions|FAQ section]].&lt;br /&gt;
&lt;br /&gt;
== Safety ==&lt;br /&gt;
&lt;br /&gt;
Do not plug in a charger into the keyboard and the phone at the same time. Doing so may result in damage or loss of the keyboard charging functionality. Using the USB-C port of the PinePhone (Pro) while a charger to is connected to the USB-C port of the keyboard is also discouraged for the same reason. Technical details regarding the issue can be found in the blog post of the developer ''megi'' [http://xnux.eu/log/072.html here] and [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post.&lt;br /&gt;
&lt;br /&gt;
Please note: Only use mild isopropyl alcohol when wiping down the clamshell of the device. Stronger solutions may partially strip the coatings. Do not lube the keyboard with GPL 205G0 switch grease, it can cause problems with the key responsiveness and tactility.&lt;br /&gt;
&lt;br /&gt;
== Software support ==&lt;br /&gt;
&lt;br /&gt;
=== Kernel-space driver ===&lt;br /&gt;
&lt;br /&gt;
Kernel driver implementation from Samuel Holland: CONFIG_IP5XXX_POWER (module ip5xxx_power) and CONFIG_KEYBOARD_PINEPHONE (module pinephone_keyboard) https://github.com/smaeul/linux/commits/wip/pp-keyboard&lt;br /&gt;
&lt;br /&gt;
Note: If you've upgraded to &amp;gt;=5.18, don't forget to upgrade the dtb as kb151 now appears to be a stub.&lt;br /&gt;
&lt;br /&gt;
=== User-space driver ===&lt;br /&gt;
The user-space driver is available [https://xff.cz/git/pinephone-keyboard/ here]. Use git to clone the repository. You're going to need sdcc 4.1+ installed to build it, so use your package manager to install that first. Next you'll cd into the directory you cloned pinephone-keyboard and use the command &amp;quot;make&amp;quot; to build. After the build is completed, cd into the build directory and you'll notice several new files starting with ppkb-. To use your keyboard case, you'll want to run the following command: &amp;lt;code&amp;gt;sudo ./ppkb-i2c-inputd&amp;lt;/code&amp;gt; &amp;lt;!-- this isn't running as a daemon, if anyone knows how to make it do so please edit that info in! --&amp;gt; Open something you can type into like a new terminal window or text editor and you should now be able to use the keyboard case! &lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Virtual keyboards such as &amp;lt;i&amp;gt;squeekboard&amp;lt;/i&amp;gt; are opening whenever a text field is selected.&lt;br /&gt;
&lt;br /&gt;
To disable this behavior under Linux running '''Phosh''' you can change the corresponding settings under ''Settings'' &amp;gt; ''Accessibility'' &amp;gt; ''Screen Keyboard'' (see [https://forum.pine64.org/showthread.php?tid=15789&amp;amp;pid=105152 here]). The virtual keyboard can also be disabled temporarily for one session using: &lt;br /&gt;
&lt;br /&gt;
* To temporarily disable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To temporarily enable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The virtual keyboard needs to be activated before removing the keyboard case again.&lt;br /&gt;
&lt;br /&gt;
Under '''Plasma Mobile''' the keyboard can be disabled via a widget, see [https://forum.pine64.org/showthread.php?tid=14789&amp;amp;pid=105077#pid105077 here].&lt;br /&gt;
&lt;br /&gt;
In '''Sxmo''' disabling the keyboard is not required, as the keyboard will only shown when the corresponding hotkey button is pressed.&lt;br /&gt;
&lt;br /&gt;
== Keyboard layout ==&lt;br /&gt;
The keyboard features a default layout (pictured below) created and agreed upon by the community. The keyboard layout can be altered using software as well as by physically repositioning keycaps. All keycaps, with the &amp;lt;u&amp;gt;exception&amp;lt;/u&amp;gt; of space and return keys, can be easily and safely relocated for alternative layouts corresponding to software settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;nolines&amp;quot; widths=&amp;quot;500px&amp;quot; heights=&amp;quot;400px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Ppkb_layout2.png|The keyboard layout how the keys were originally intended&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Keyboard firmware ==&lt;br /&gt;
PinePhone’s keyboard firmware was developed independently by Ondřej Jirman as a free-of-charge contribution to PINE64. The firmware source code is freely and publicly available and you can modify it, and the supporting utilities, using common FOSS tools.  &lt;br /&gt;
&lt;br /&gt;
=== Firmware and supporting utilities ===&lt;br /&gt;
The design of the firmware allows the keys, modifier keys, and their combinations to be handled in virtually unlimited ways, without a need to flash a customized version of the firmware. Mapping of keys is defined at runtime, using the supporting utilities, and is not hardcoded in the firmware. Different keyboard layouts can be loaded dynamically to support various use cases.&lt;br /&gt;
&lt;br /&gt;
The repository that contains the source code of the firmware, supporting utilities and associated documentation is located at https://xnux.eu/pinephone-keyboard/.&lt;br /&gt;
&lt;br /&gt;
You are welcome to contribute patches and improvements to the firmware and the supporting utilities. A summary of firmware development history is available at https://xnux.eu/log/ alongside other development updates from the firmware author.&lt;br /&gt;
&lt;br /&gt;
Much time and effort went into the development of this firmware. If you wish to send a token of appreciation or support the development efforts in any way, please consider making a donation to the author via one of the methods listed at the bottom of this web page: https://xnux.eu/contribute.html.&lt;br /&gt;
&lt;br /&gt;
=== Firmware License ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Copyright (C) 2021 Ondřej Jirman &amp;lt;megi@xff.cz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, with either version 3 of the License or&lt;br /&gt;
(at your discretion) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &lt;br /&gt;
See GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
GNU General Public License http://www.gnu.org/licenses/&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Key hardware specifications:&lt;br /&gt;
* Dimensions (closed): 161 x 95 x 25mm&lt;br /&gt;
* Weights (without / with PinePhone mounted): ~ 191 / ~391 grams&lt;br /&gt;
* Number of keys: 54&lt;br /&gt;
* Number of rows: 5&lt;br /&gt;
** Keyboard IC: Keyboard IC: EM85F684A 8-bit microcontroller with 256 bytes RAM, 2048/ bytes XRAM; 16kB for user’s own firmware&lt;br /&gt;
* Battery capacity: 6000mAh (22.2Wh 3.7V)&lt;br /&gt;
* Charger input: 5V, 3A (15W)&lt;br /&gt;
** Charging and battery IC chip: IP5209 power management IC with charge indicate controller and boost converter&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
''' What is the keyboard driver situation? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#drivers&lt;br /&gt;
&lt;br /&gt;
''' Are keyboard drivers included in my distribution? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#distros&lt;br /&gt;
&lt;br /&gt;
''' What's the status of the existing software for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#sw-status&lt;br /&gt;
&lt;br /&gt;
''' My keyboard doesn't work (well)! '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#faq-ts&lt;br /&gt;
&lt;br /&gt;
''' How does charging work? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#charging&lt;br /&gt;
&lt;br /&gt;
''' What charger is best for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#chargers&lt;br /&gt;
&lt;br /&gt;
''' How safe is the charger circuit in the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#safety&lt;br /&gt;
&lt;br /&gt;
''' Keyboard doesn't react to any key presses '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Keyboard works but top row of keys is less responsive '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is not charging from the keyboard '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is charging slowly from the keyboard battery '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
and https://forum.pine64.org/showthread.php?tid=16979&amp;amp;pid=111414#pid111414#ts&lt;br /&gt;
&lt;br /&gt;
''' Can you open the keyboard and add extra functionality? '''&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to do so, however the production units can be extremely difficult to open. Do not attempt to open the keyboard if you do not want to risk cosmetic damage (scaring and scratching of the plastic).&lt;br /&gt;
&lt;br /&gt;
''' How can I rotate the screen display in tty ? '''&amp;lt;br&amp;gt;&lt;br /&gt;
Under Linux this can be done using the command &amp;lt;code&amp;gt;echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Top row stopped displaying symbols! (kernel &amp;gt; 5.17) ''' &amp;lt;br&amp;gt;&lt;br /&gt;
* For Phosh (at the example of Mobian) see: https://wiki.mobian-project.org/doku.php?id=ppaccessories&lt;br /&gt;
* For TTY and SWMO see: https://codeberg.org/HazardChem/PinePhone_Keyboard&lt;br /&gt;
* For Plasma Mobile, one of either ''/etc/xdg/kxkbrc'' or ''~/.config/kxkbrc'' is necessary, with contents as described in https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3438&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.pdf PinePhone Keyboard 4 language user manual ver 2.0 in PDF format]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.odt PinePhone Keyboard 4 language user manual ver 2.0 in ODT format]&lt;br /&gt;
&lt;br /&gt;
== Schematics, Datasheet and certifications ==&lt;br /&gt;
&lt;br /&gt;
* Schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PinePhone/PinePhone%20Keyboard%20Schematic%20V1.0-20211009.pdf PinePhone Keyboard Schematic ver 1.0 20211009]&lt;br /&gt;
&lt;br /&gt;
* Datasheet:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/EM85F684A.pdf PEM85F684A USB Microcontroller Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/IP5209.pdf IP5209 Power Bank SOC Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/txs0104e.pdf TXS0104E 4-Bit Bidirectional Voltage-Level Translator Datasheet]&lt;br /&gt;
&lt;br /&gt;
* Certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20FCC%20Certificate-S21111804102001.pdf PinePhone Keyboard FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20CE%20Certificate-S21111804101001.pdf PinePhone Keyboard CE RED Certificate]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/2022/01/11/pinephone-pro-explorer-edition-pre-orders-open-january-11/ Pre-order announcement]&lt;br /&gt;
* FAQ of the developer megous: https://xnux.eu/pinephone-keyboard/faq.html&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;br /&gt;
[[Category:PinePhone (Pro) Add-Ons]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=20825</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=20825"/>
		<updated>2023-10-09T07:48:25Z</updated>

		<summary type="html">&lt;p&gt;Fxc: clarified&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;Bootloader&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;. '''Note:''' Tow-Boot is now pre-installed on the SPI from the factory - issues need verification to be issues with Tow-Boot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Implemented&lt;br /&gt;
| Devices bought after end of July 2022 come with Tow-Boot flashed to the SPI memory, making it considerably easier to flash the device and boot from microSD card.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| Audio is often higher pitched after waking up from suspend due to a bug, make sure to update your system&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro/-/issues/3 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| [https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem connection crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34#note_984212350 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro/-/issues/3 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightyellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| '''Hardware issue'''&amp;lt;sup&amp;gt;[https://xnux.eu/log/#055 Details]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Camera work-in-progress with DTS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; userspace still needs to do some catching up&amp;lt;sup&amp;gt;[[PinePhone Pro/IMX258 Camera Debugging|debugging article]]&amp;lt;/sup&amp;gt;; Green image tint&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Camera work-in-progress with DTS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; userspace still needs to do some catching up&amp;lt;sup&amp;gt;[[PinePhone Pro/IMX258 Camera Debugging|debugging article]]&amp;lt;/sup&amp;gt;; Green image tint&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical issues&lt;br /&gt;
| '''Hardware issue'''&amp;lt;sup&amp;gt;[https://xnux.eu/log/#069 Details]&amp;lt;/sup&amp;gt;; Note: &amp;lt;code&amp;gt;/sys/class/leds/white:flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. The firmware does not support monitor mode and package injection. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[[PinePhone#GPS_/_GNSS|See original PinePhone article]]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Status unknown (at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Working after updating&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Partial&lt;br /&gt;
| Some spare parts now available in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/pinephonepro-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Waydroid is an Android container used to run Android applications.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=20824</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=20824"/>
		<updated>2023-10-09T07:25:37Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Clarified&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;Bootloader&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;. '''Note:''' Tow-Boot is now pre-installed on the SPI from the factory - issues need verification to be issues with Tow-Boot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Implemented&lt;br /&gt;
| Devices bought after end of July 2022 come with Tow-Boot flashed to the SPI memory, making it considerably easier to flash the device and boot from microSD card.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| Audio is often higher pitched after waking up from suspend due to a bug, make sure to update your system&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro/-/issues/3 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| [https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem connection crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34#note_984212350 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro/-/issues/3 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightyellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| '''Hardware issue'''&amp;lt;sup&amp;gt;[https://xnux.eu/log/#055 Details]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Camera work-in-progress with DTS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; userspace still needs to do some catching up&amp;lt;sup&amp;gt;[[PinePhone Pro/IMX258 Camera Debugging|debugging article]]&amp;lt;/sup&amp;gt;; Green image tint&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Camera work-in-progress with DTS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; userspace still needs to do some catching up&amp;lt;sup&amp;gt;[[PinePhone Pro/IMX258 Camera Debugging|debugging article]]&amp;lt;/sup&amp;gt;; Green image tint&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical issues&lt;br /&gt;
| '''Hardware issue'''&amp;lt;sup&amp;gt;[https://xnux.eu/log/#069 Details]&amp;lt;/sup&amp;gt;; Note: &amp;lt;code&amp;gt;/sys/class/leds/white:flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Driver does not support monitor mode and package injection. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[[PinePhone#GPS_/_GNSS|See original PinePhone article]]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Status unknown (at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Working after updating&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Partial&lt;br /&gt;
| Some spare parts now available in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/pinephonepro-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Waydroid is an Android container used to run Android applications.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:Fxc&amp;diff=20763</id>
		<title>User:Fxc</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:Fxc&amp;diff=20763"/>
		<updated>2023-09-22T22:41:03Z</updated>

		<summary type="html">&lt;p&gt;Fxc: +1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Export ==&lt;br /&gt;
&lt;br /&gt;
https://wiki.pine64.org/wiki/Special:AllPages?from=&amp;amp;to=&amp;amp;namespace=0&amp;amp;hideredirects=1&lt;br /&gt;
&lt;br /&gt;
https://wiki.pine64.org/wiki/Special:Export&lt;br /&gt;
&lt;br /&gt;
[[User:Fxc/export]]&lt;br /&gt;
&lt;br /&gt;
Cutoff: 16 April 2023&lt;br /&gt;
&lt;br /&gt;
22 September 2023: PineTab-V, PineTab2&lt;br /&gt;
&lt;br /&gt;
== Wiki keep ==&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone APN Settings]]&lt;br /&gt;
* [[PinePhone Carrier Support]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
The Ox64 can be flashed using an UART connection or by connecting the device to the computer using USB-C.&lt;br /&gt;
&lt;br /&gt;
=== Using UART ===&lt;br /&gt;
&lt;br /&gt;
To flash the Ox64 using an UART connection, first connect your UART device as pictured below:&lt;br /&gt;
&lt;br /&gt;
[[File:|360px]]&lt;br /&gt;
&lt;br /&gt;
Then do the following steps:&lt;br /&gt;
&lt;br /&gt;
* Do not connect the micro-USB cable or ''VBUS'' yet&lt;br /&gt;
* Press and hold the ''BOOT'' button&lt;br /&gt;
* Connect the micro-USB cable or connect ''VBUS''&lt;br /&gt;
* Wait for a few seconds&lt;br /&gt;
* Release the ''BOOT'' button&lt;br /&gt;
&lt;br /&gt;
=== Using USB ===&lt;br /&gt;
&lt;br /&gt;
To flash the Ox64 using a USB-C connection to a computer:&lt;br /&gt;
&lt;br /&gt;
{{Info|This won't be possible on the first batch of Ox64 devices from October 2022, see [https://gist.github.com/lupyuen/7a0c697b89abccda8e38b33dfe5ebaff here].}}&lt;br /&gt;
&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
== Chaos ==&lt;br /&gt;
* [[ROCKPro64 Software Releases#Android]]&lt;br /&gt;
* [[Special:ListFiles]]&lt;br /&gt;
* [[Pinebook Pro]]&lt;br /&gt;
* [[Getting started]]&lt;br /&gt;
* [[SOEDGE Software Releases]]&lt;br /&gt;
* [[PineBuds Pro]] -&amp;gt; stub sections, lacks user manual steps&lt;br /&gt;
* [[Special:UncategorizedPages]]&lt;br /&gt;
* [[Accessories_Step_by_Step_Guides]] -&amp;gt; Explanation for which devices this applies&lt;br /&gt;
* Rename Accessories_Step_by_Step_Guides section to Accessories everywhere&lt;br /&gt;
* [[PineTime#Community]] redundant information. Might be solved with a template per article&lt;br /&gt;
* [[SOQuartz Software Releases]]&lt;br /&gt;
&lt;br /&gt;
== ChatGPT: Flashing with dd ==&lt;br /&gt;
Flashing a disk image to a microSD card using the dd command involves writing the disk image file to the microSD card. This process is performed through the terminal on Linux or macOS. Here are the steps to flash a disk image to a microSD card using &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
1. Determine the device name of the microSD card: On Linux or macOS, you can use the &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;diskutil list&amp;lt;/code&amp;gt; command to find the name of the microSD card (e.g., ''/dev/sdb''). Make sure to properly identify the microSD card, as using the wrong device name can result in data loss.&lt;br /&gt;
&lt;br /&gt;
2. Unmount the microSD card: If the microSD card is already mounted, you need to unmount it before flashing the disk image. On Linux, you can use the &amp;lt;code&amp;gt;umount&amp;lt;/code&amp;gt; command. On macOS, you can use the &amp;lt;code&amp;gt;diskutil unmount&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
3. On Linux or macOS, open a terminal window.&lt;br /&gt;
&lt;br /&gt;
4. Flash the disk image to the microSD card: Use the following command to flash the disk image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if='''path_to_disk_image.img''' of='''/dev/sdX''' bs=4M conv=fsync&lt;br /&gt;
&lt;br /&gt;
* Replace '''path_to_disk_image.img''' with the path to the disk image file.&lt;br /&gt;
* Replace '''/dev/sdX''' with the device name of the microSD card you determined in step 1.&lt;br /&gt;
&lt;br /&gt;
5. Wait for the process to complete: The ''dd'' command will not provide any output until it has completed the process. This may take several minutes, depending on the size of the disk image and the speed of your computer and microSD card.&lt;br /&gt;
&lt;br /&gt;
6. Eject the microSD card: Once the ''dd'' command has completed, eject the microSD card. On Linux, you can use the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command. On macOS, you can use the &amp;lt;code&amp;gt;diskutil eject&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Note: Before flashing the disk image, make sure to backup any important data on the microSD card, as this process will erase all existing data on the card.&lt;br /&gt;
&lt;br /&gt;
== ChatGPT: Flashing with Etcher ==&lt;br /&gt;
Here are the steps to flash a disk image to a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download and install a disk image writing tool: A commonly used tool for this purpose is Etcher, which is available for Windows, Mac, and Linux.&lt;br /&gt;
# Insert the microSD card into your computer: Make sure that you have an SD card reader, or an adapter to connect the microSD card to your computer.&lt;br /&gt;
# Open the disk image writing tool: Launch Etcher and select the disk image file you want to flash to the microSD card.&lt;br /&gt;
# Select the target device: In Etcher, select the microSD card from the list of available drives.&lt;br /&gt;
# Start the flashing process: Click the &amp;quot;Flash&amp;quot; button to start the process of writing the disk image to the microSD card. This process may take a few minutes, depending on the size of the disk image and the speed of your computer.&lt;br /&gt;
# Verify the flash: After the flash is complete, Etcher will verify the integrity of the image to make sure it was written correctly.&lt;br /&gt;
# Eject the microSD card: Once the flash is complete and verified, safely eject the microSD card from your computer. You can now use the microSD card with the device it was intended for.&lt;br /&gt;
&lt;br /&gt;
Note: Before flashing the disk image, make sure to backup any important data on the microSD card, as this process will erase all existing data on the card.&lt;br /&gt;
&lt;br /&gt;
== Main example ==&lt;br /&gt;
&lt;br /&gt;
=== Devices ===&lt;br /&gt;
&lt;br /&gt;
You can learn more about the following ARM and RISC-V devices manufactured by PINE64:&lt;br /&gt;
&lt;br /&gt;
Phones:&lt;br /&gt;
* [[PinePhone]]&lt;br /&gt;
* [[PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
Phone accessories:&lt;br /&gt;
* [[PinePhone (Pro) Add-ons]]&lt;br /&gt;
* [[PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
Tablets: &lt;br /&gt;
* [[PineNote]]&lt;br /&gt;
* [[PineTab]]&lt;br /&gt;
&lt;br /&gt;
Wearable:&lt;br /&gt;
* [[PineBuds Pro]]&lt;br /&gt;
* [[PineTime]]&lt;br /&gt;
&lt;br /&gt;
Laptops: &lt;br /&gt;
* [[Pinebook]], [[1080P Pinebook]], [[Pinebook Pro]] and [[Pinebook Pro Dock|Pinebook Pro Docking station]]&lt;br /&gt;
&lt;br /&gt;
Single-board computers: &lt;br /&gt;
* [[Ox64]], [[STAR64]], [[Quartz64]], [[QuartzPro64_Development|QuartzPro64]], [[ROCKPro64]], [[ROCK64]], [[PINE A64]], [[PINE A64-LTS/SOPine|PINE A64-LTS]] and [[PINE H64]]&lt;br /&gt;
&lt;br /&gt;
Set-top box: &lt;br /&gt;
* [[RockBox]]&lt;br /&gt;
&lt;br /&gt;
Clusters and modules: &lt;br /&gt;
* [[Clusterboard]]&lt;br /&gt;
* [[SOPINE]] and [[SOPINE Baseboard]]&lt;br /&gt;
* [[SOEDGE]] and [[SOEDGE Baseboard]]&lt;br /&gt;
* [[SOQuartz]]&lt;br /&gt;
&lt;br /&gt;
IP camera: &lt;br /&gt;
* [[PineCube]]&lt;br /&gt;
&lt;br /&gt;
Makerspace: &lt;br /&gt;
* [[Pinecil]], [[PinePower]], [[PineCone]] and [[Pinedio]]&lt;br /&gt;
&lt;br /&gt;
== Pinebook notes ==&lt;br /&gt;
Merge https://wiki.pine64.org/wiki/1080P_Pinebook_Software_Releases into https://wiki.pine64.org/wiki/Pinebook_Software_Releases&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
|+ Compatibility&lt;br /&gt;
|-&lt;br /&gt;
! Pinebook 11.6″ !! Pinebook 11.6&amp;quot; 1080p !! Pinebook 14″&lt;br /&gt;
|-&lt;br /&gt;
| ✅ || ❓ || ❌&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Collapsible test ==&lt;br /&gt;
&lt;br /&gt;
{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; style=&amp;quot;max-width: 60%&amp;quot;&lt;br /&gt;
| &amp;lt;strong&amp;gt;Notes&amp;lt;/strong&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Carrier_Support&amp;diff=20762</id>
		<title>PinePhone Carrier Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Carrier_Support&amp;diff=20762"/>
		<updated>2023-09-22T22:39:26Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains hints on setting up cellular network connectivity for specific carriers. For more general information, see the carrier support section of [[PinePhone#Modem]]. For the APN settings see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
== Check compatibility ==&lt;br /&gt;
&lt;br /&gt;
To check if the PinePhone is supported on your carrier:&lt;br /&gt;
&lt;br /&gt;
Search for your carrier on [https://www.frequencycheck.com/ frequencycheck.com] and compare the carrier's LTE/GSM/WCDMA frequencies to the PinePhone's supported frequencies (listed in the [[File:Quectel_EG25-G_LTE_Standard_Specification_V1.3.pdf]] modem specification sheet).&lt;br /&gt;
&lt;br /&gt;
It is likely that there will be a few frequencies that your carrier uses which are not supported by the PinePhone. Not all of the carrier's frequencies need to be supported by the PinePhone for it to work - as long as ''most'' of them are supported, you will still get good coverage.&lt;br /&gt;
&lt;br /&gt;
== Tested and working carriers ==&lt;br /&gt;
&lt;br /&gt;
The following is a list of carriers which has been tested by users and confirmed to be working (excerpt):&lt;br /&gt;
&lt;br /&gt;
=== Asia ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
!Country || Carrier name || SMS working || MMS working || Calls working || Data working || Tested OS (with version) and UI&lt;br /&gt;
|-&lt;br /&gt;
| Japan || SoftBank Mobile || Not tested || Unsupported by carrier || No || No || Mobian Phosh, December 2020&lt;br /&gt;
|-&lt;br /&gt;
| Japan || 楽天モバイル / Rakuten Mobile || Unsupported by carrier || Unsupported by carrier || Yes || Yes || Mobian Phosh, January 2021&lt;br /&gt;
|-&lt;br /&gt;
| Japan || 楽天モバイル / Rakuten Mobile || Unsupported by carrier || Unsupported by carrier || Yes || No || Manjaro Plasma Mobile February 2021&lt;br /&gt;
|-&lt;br /&gt;
| Japan || NTT Docomo || Yes || Not tested || Yes || Yes || Mobian Phosh, February 2021&lt;br /&gt;
|-&lt;br /&gt;
| India || Vodafone / Vi India || Yes || Not tested || Yes || Yes || DanctNIX (Arch Linux ARM) with Phosh, March 2021&lt;br /&gt;
|-&lt;br /&gt;
| Malaysia || Celcom || Yes || Not tested || Yes || Yes || Gentoo, SXMO&lt;br /&gt;
|-&lt;br /&gt;
| Malaysia || Maxis || Yes || Not tested || Yes || Yes || Gentoo, SXMO&lt;br /&gt;
|-&lt;br /&gt;
| Malaysia || U-Mobile || Yes || Not tested || Yes || Yes || Gentoo, SXMO&lt;br /&gt;
|-&lt;br /&gt;
| Malaysia || Yes || Yes || Not tested || Yes || Yes || Gentoo, SXMO&lt;br /&gt;
|-&lt;br /&gt;
| South Korea || KT || Yes || Not tested || Yes || Yes || Manjaro Phosh, June 2021&lt;br /&gt;
|-&lt;br /&gt;
| China || China Mobile || Yes || Not tested || Yes || No || Mobile NixOS, December 2021&lt;br /&gt;
|-&lt;br /&gt;
| China || China Telecom || Yes (hack needed) || Not tested || Yes (hack needed) || No || AOSC OS Phosh, January 2022&lt;br /&gt;
|-&lt;br /&gt;
| Japan || 楽天モバイル / Rakuten Mobile || Yes || Not tested || Yes || Yes || Mobian Phosh, January 2022 (revised from January 2021)&lt;br /&gt;
|-&lt;br /&gt;
| China || China Unicom || Yes || Not tested || Yes || Yes || [https://postmarketos.org/ pmOS] 22.06.3 Phosh, [[PineModems#Bootloader_unlocking | BLunlck'd]], [[PinePhone#Firmware_update|upd'd]] to [https://github.com/Biktorgj/quectel_eg25_recovery/tree/EG25GGBR07A08M2G_30.006.30.006 *8M2G_30.006*], November 2022&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Africa ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
!Country || Carrier name || SMS working || MMS working || Calls working || Data working || Tested OS (with version) and UI&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Test || Test || Yes || Yes || Yes || Yes || TestOS with Phosh, 20201129&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Europe ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
!Country || Carrier name || SMS working || MMS working || Calls working || Data working || Tested OS (with version) and UI&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Ukraine || KyivStar || Yes || Not tested || Yes || Yes || Mobian Phosh(11Nov21)&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Ukraine || Vodafone || Yes || Not tested || Yes || Yes || Manjaro ARM Phosh(29Jun22)&lt;br /&gt;
|-&lt;br /&gt;
| Sweden || Fello (uses Telia network) || Yes || No (data and MMS APN are different) || Yes || Yes || Mobian Phosh, October 2022&lt;br /&gt;
|-&lt;br /&gt;
| Sweden || Hallon (uses Tre network) || Yes || Yes (when manually selecting the MMS APN) || Yes || Yes || Mobian Phosh, October 2022&lt;br /&gt;
|-&lt;br /&gt;
| Sweden || Comviq (uses Tele2 network) || Yes || Yes (when manually selecting the MMS APN) || Yes || Yes || Mobian Phosh, October 2022&lt;br /&gt;
|-&lt;br /&gt;
| Sweden || Tele2 || Yes || Not tested || Yes || Not tested || Manjaro ARM Posh&lt;br /&gt;
|-&lt;br /&gt;
| Sweden || Telenor SE || Not tested || Not tested (should NOT work, data and MMS APN are different) || Yes || Not tested || Manjaro Plasma Mobile beta2&lt;br /&gt;
|-&lt;br /&gt;
| UK     || RWG || Yes || Not tested || Yes || Yes  [https://neilzone.co.uk/2022/06/rwg-mobile-apn-for-non-data-sims (special APN)] || postmarketOS Phosh (Edge) - 11 March 2023&lt;br /&gt;
|-&lt;br /&gt;
| UK     || Three || Yes || Not tested || Yes || Yes || Manjaro Plasma Mobile beta2&lt;br /&gt;
|-&lt;br /&gt;
| UK     || Vodafone || Yes || Not tested || Yes || Yes || ALARM &amp;amp; pmOS (Phosh?), modem FW latest - 26 Feb 21&lt;br /&gt;
|-&lt;br /&gt;
| UK     || Sky Mobile (O2) || Yes || Not tested || Yes || Yes || ArchLinux Phosh (20210908 image, fully updated) - 3 October 2021&lt;br /&gt;
|-&lt;br /&gt;
| UK     || Smarty Mobile (Three) || Yes || Yes || Yes || Yes || Arch Linux SXMO (Wayland) - 23 March 2022&lt;br /&gt;
|-&lt;br /&gt;
| UK     || Honest Mobile (Three) || Yes || No || Yes || Yes || postmarketOS 23.06 (Phosh) - 9 July 2023&lt;br /&gt;
|-&lt;br /&gt;
| France     || Orange || Yes || Not tested || Yes || Yes || Manjaro Phosh Beta6 and later - 9 march 2021&lt;br /&gt;
|-&lt;br /&gt;
| France     || SFR || Yes || Not tested || Yes || Yes || Manjaro Phosh Beta6 and later - 9 march 2021&lt;br /&gt;
|-&lt;br /&gt;
| France     || Free || Yes || Not tested || Yes || Yes || pmOS SXMO (Wayland) - 27 March 2022&lt;br /&gt;
|-&lt;br /&gt;
| Czech Republic     || O2 || Yes (only on 2G) || Not tested || Yes || Yes || Mobian Phosh (20210517 image up to date) - 2 June 2021&lt;br /&gt;
|-&lt;br /&gt;
| Germany     || Congstar || Yes || Not tested || Yes || Yes (IPv4 &amp;amp; IPv6) || Mobian (Megi's kernel 5.13.0-rc4, apt up-to-date) with Phosh, 2021-06-07&lt;br /&gt;
|-&lt;br /&gt;
| Germany     || E-Plus  || Yes (sending only 2G) || Not tested || Yes || Yes        || Manjaro Phosh and postmarketOS, 2021-10-15&lt;br /&gt;
|-&lt;br /&gt;
| Germany     || Telekom  || Yes || Not tested || Yes || Not tested        || Mobian Phosh (5.10-sunxi64), 2021-07-28&lt;br /&gt;
|-&lt;br /&gt;
| Germany     || O2 / Telefonica  || Yes || Not tested || Yes || Not tested        || Plasma Mobile&lt;br /&gt;
|-&lt;br /&gt;
| Hungary     || Telekom  || Yes || Not tested || Yes || Yes (IPv4)        || Manjaro Phosh Beta 12, 2021-07-30&lt;br /&gt;
|-&lt;br /&gt;
| Hungary     || Telenor/Yettel  || Yes || Not tested || Yes || Yes ||  Mobian-Phosh-20210517, 2021-09-24&lt;br /&gt;
|-&lt;br /&gt;
| Denmark     || CBB  || Yes || Not tested || Yes || Yes       || Manjaro Plasma Mobile Beta 5, 2021-06-30&lt;br /&gt;
|-&lt;br /&gt;
| Belgium     || Telenet  || Yes || Not tested || Yes || Yes       || postmarketOS v20.05, v21.03, v21.06 and edge, 2021-08-15&lt;br /&gt;
|-&lt;br /&gt;
| Belgium     || CARREFOUR  || Yes || Not tested || Yes || Yes       || postmarketOS v20.05, v21.03, v21.06 and edge, 2021-08-15&lt;br /&gt;
|-&lt;br /&gt;
| Poland      || Play || Yes || Not tested || Yes || Yes || Manjaro Phosh Beta 18, 2021-11-14&lt;br /&gt;
|-&lt;br /&gt;
| Poland      || Orange || Yes || No || Yes || Yes (IPv4 &amp;amp; IPv6) || Manjaro Phosh v21.10, 2021-12-23&lt;br /&gt;
|-&lt;br /&gt;
| Poland      || Premium Mobile || Yes || No || Yes || Yes || Manjaro Phosh v22.01, 2022-01-13&lt;br /&gt;
|-&lt;br /&gt;
| Italy       || WindTre Italy || Yes || Not tested || Yes || Yes || Archlinux ARM Plasma Mobile&lt;br /&gt;
|-&lt;br /&gt;
| Switzerland || Salt || Yes || Not tested || Yes || Yes || Phosh on Mobian + Arch&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== North America ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
!Country || Carrier name || SMS working || MMS working || Calls working || Data working || Tested OS (with version) and UI&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| USA || AT&amp;amp;T || Yes || Yes || Yes || Yes ||   &lt;br /&gt;
* Mobian - Phosh &lt;br /&gt;
|-&lt;br /&gt;
| USA || T-Mobile || Yes || No || Yes || Yes || &lt;br /&gt;
* Arch Linux Arm 2020/11/29  &lt;br /&gt;
* Mobian - Phosh &lt;br /&gt;
* Manjaro - KDE Plasma Mobile&lt;br /&gt;
|-&lt;br /&gt;
| USA || T-Mobile || Yes || Yes || Yes || Yes || &lt;br /&gt;
* Mobian Bookworm (Phosh) (2022-03-08) &lt;br /&gt;
|-&lt;br /&gt;
| USA || MetroPCS (T-Mobile) || Yes || No || Yes || Yes || &lt;br /&gt;
* Arch Linux Arm (Phosh,SXMO) 2021/04/29 &lt;br /&gt;
* Manjaro - Phosh 2021/04/29 &lt;br /&gt;
* Mobian - Phosh 2021/3/20&lt;br /&gt;
|-&lt;br /&gt;
| USA || T-Mobile || Yes - buggy || No || Yes - buggy || Yes - buggy || &lt;br /&gt;
* Manjaro - Plasma Dev 2020/11/21  &lt;br /&gt;
* Ubuntu Touch - 2020/11/26 &lt;br /&gt;
* KDE Neon 2020/11/02&lt;br /&gt;
|-&lt;br /&gt;
| USA || Mint Mobile (T-Mobile) || Yes || Yes || Yes || Yes || &lt;br /&gt;
* Mobian - Phosh 2021/3/14&lt;br /&gt;
* postMarketOS - Phosh, Sxmo, Plasma Mobile 2021/5/26&lt;br /&gt;
* Ubuntu Touch 2021/5/24&lt;br /&gt;
* Manjaro - Phosh 2022/3/25&lt;br /&gt;
|-&lt;br /&gt;
| USA || Patriot Mobile (T-Mobile) || Yes || Yes || Yes || Yes || &lt;br /&gt;
* DanctNIX (Arch Linux ARM) - Phosh 2023/03/29&lt;br /&gt;
|-&lt;br /&gt;
| USA || Tello (T-Mobile) || Yes || Yes || Yes || Yes || &lt;br /&gt;
* DanctNIX (Arch Linux ARM) - Phosh 2022-07-09&lt;br /&gt;
|-&lt;br /&gt;
| USA || TracFone || No || No || No || No || &lt;br /&gt;
* postMarketOS - Phosh 2022/06/28&lt;br /&gt;
|-&lt;br /&gt;
| USA || Verizon || Yes || Not tested || Yes || Yes || &lt;br /&gt;
* Mobian - Phosh 2021/3/1&lt;br /&gt;
|-&lt;br /&gt;
| USA || US Mobile || Yes || Not tested || Yes || Not Tested || &lt;br /&gt;
* Mobian - Phosh 2022/01/09&lt;br /&gt;
|-&lt;br /&gt;
| USA || Verizon || No || No || No || No ||&lt;br /&gt;
* Ubuntu Touch 2021/5/24 (You can occasionally get the settings to work with Verizon, but it seems like the settings automatically changes the carrier to the wrong one after a few minutes) &lt;br /&gt;
|-&lt;br /&gt;
| USA || Verizon || Not tested || Not tested || Yes || Not via gui || &lt;br /&gt;
* Manjaro - KDE Plasma Mobile 2021/5/10 &lt;br /&gt;
|-&lt;br /&gt;
| USA || Verizon || Yes || Not tested || Yes || Not via gui || &lt;br /&gt;
* Manjaro - Phosh 2021/5/31 &lt;br /&gt;
|-&lt;br /&gt;
| USA || Verizon || Yes || Not tested || Yes || Yes || &lt;br /&gt;
* postmarketOS - Phosh 2021/5/31 &lt;br /&gt;
|-&lt;br /&gt;
| USA || Verizon || Yes || Not tested || Yes || Yes || &lt;br /&gt;
* Arch - Phosh 2021/5/31 &lt;br /&gt;
|-&lt;br /&gt;
| Canada || Freedom || Yes || Not tested || Yes || Yes || &lt;br /&gt;
*Arch Pinephone - Phosh (APN: internet.windmobile.ca), 2021/4/25 &lt;br /&gt;
|-&lt;br /&gt;
| Canada || SpeakOut || Yes || Not tested || Yes || Not tested || &lt;br /&gt;
* Mobian - Phosh 2021/11/18&lt;br /&gt;
|-&lt;br /&gt;
| USA || Consumer Cellular (AT&amp;amp;T) || Yes || No || Yes || Yes || &lt;br /&gt;
* Manjaro - Phosh 2021/06/26&lt;br /&gt;
|-&lt;br /&gt;
| USA || Google Fi (T-Mobile) || Yes || No || Yes || Yes || &lt;br /&gt;
* Arch Linux Arm - Phosh 0.10.2 2021/05/29&lt;br /&gt;
|-&lt;br /&gt;
| Mexico || Telcel || Yes || Not tested || Yes || Yes ||&lt;br /&gt;
* Mobian - Phosh Weekly 2022/04/13&lt;br /&gt;
* PostmarketOS - SXMO De Sway v21.12 (stable) 2022/04/13&lt;br /&gt;
* PostmarketOS - Phosh v21.12 (stable) 2022/04/13&lt;br /&gt;
* PostmarketOS - Plasma Mobile v21.12 (stable) 2022/04/13&lt;br /&gt;
* PostmarketOS - sxmo edge 2021/09/09&lt;br /&gt;
|-&lt;br /&gt;
| USA || Ting || Yes || Yes - buggy || Yes || Yes || &lt;br /&gt;
* Manjaro - Phosh 2021/12/10 &lt;br /&gt;
|-&lt;br /&gt;
| USA || Simple Mobile || Yes || Yes || Yes || Yes || &lt;br /&gt;
* Mobian - Phosh - Make sure APN is &amp;quot;Simple&amp;quot; in settings (note uppercase S)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== South America ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
!Country || Carrier name || SMS working || MMS working || Calls working || Data working || Tested OS (with version) and UI&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Test || Test || Yes || Yes || Yes || Yes || TestOS with Phosh, 20201129&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Australia / Oceania ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
!Country || Carrier name || SMS working || MMS working || Calls working || Data working || Tested OS (with version) and UI&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Test || Test || Yes || Yes || Yes || Yes || TestOS with Phosh, 20201129&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Aldi Mobile（Telstra） || Yes || Untested || Yes || Untested || Mobian, mobian 6.1-rockchip kernel, 2023-06-08 with Phosh and Plasma (modem needs to be enabled from Phosh)&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Beyond (Telstra) || Yes || Yes || Yes || Yes || Manjaro Phosh Beta 20.&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Belong (Telstra) || Yes || Yes || Yes || Yes || Arch (Danctnix), Feb 2022.&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Optus || Yes || No. Ticket lodged with Chatty and mmsd re multiple APN issue || Yes || Yes || Manjaro Phosh Beta 20. Manjaro Plasma Mobile Beta 9 (Data working with this release). SXMO (Danctnix and PMOS edge December 2021).&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Amaysim (Optus) || Yes || No. Ticket lodged with Chatty and mmsd re multiple APN issue || Yes || Yes || Manjaro Phosh&lt;br /&gt;
|-&lt;br /&gt;
| Australia || OPTUS (Dodo) || || ||Yes|| || Manjaro Plasma Mobile 5.23.4, 2021-12.27 (deepsleep disrupts settings)&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Kogan Mobile（Vodafone） || Yes || Yes after manually configure MMS APN in Phosh Chat || Yes || Yes || Mobian, mobian 6.1-rockchip kernel, 2023-06-08 with Phosh and Plasma (modem needs to be enabled from Phosh)&lt;br /&gt;
|-&lt;br /&gt;
| Australia || Vodafone || Yes || Yes || Yes (No VoLTE) || Yes || pmOS Edge 5.15.3 kernel, 2022-02-10 with Phosh&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Middle East  ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
!Country || Carrier name || SMS working || USSD working || MMS working || Calls working || Data working || Tested OS (with version) and UI&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| Cellcom prepay|| receive+notify|| NA || NA || ring+ notify || NA || on PmOS Sxmo May 14 2021.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| Cellcom Talkman|| receive+notify|| YES || YES (when manually selecting the MMS APN) || ring(VoLTE not working)  || YES || on mobian Feb 04, 2022, Earthquake early warning system did not show a notification on Feb 07, 2022&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| Cellcom Talkman|| NO || NO || NO || ring+ notify (VoLTE not working)|| YES || on Plasma Mobile Feb 04, 2022&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| Golan TC || receive+notify|| YES || NA ||  ring+ notify (VoLTE not working) || Yes || on mobian/phosh March 13 2022 &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| Partner prepay || receive+notify|| NA ||  NA || ring+ notify || NA || on PmOS Sxmo May 14 2021.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| Pelephone prepay|| receive+notify|| NA ||  NA || ring+ notify || NA || on PmOS Sxmo May 14 2021.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| Hot prepay|| receive+notify|| NA || NA ||  ring+ notify || NA || on PmOS Sxmo May 14 2021.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Israel|| 019 prepay|| No || NA || NA ||Bars only || NA || on PmOS Sxmo May 14 2021.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Special carrier notes ==&lt;br /&gt;
&lt;br /&gt;
{{Warning|This section contains providers which do not work or require special settings or actions to work.}}&lt;br /&gt;
&lt;br /&gt;
Some carriers might support only certain frequencies or might require certain settings in Ofono or ModemManager. The following is a list of collected notes for carriers regarding special settings, hints or information:&lt;br /&gt;
&lt;br /&gt;
=== USA ===&lt;br /&gt;
&lt;br /&gt;
==== AT&amp;amp;T ====&lt;br /&gt;
&lt;br /&gt;
According to [https://ltefix.com/wp-content/uploads/USA-Major-Carriers-Bands-Frequencies-CA.pdf this page], AT&amp;amp;T's primary bands are 12 and 17 - 700ac and 700 MHz respectively. Phone and SMS with PinePhone work out-of-the-box with AT&amp;amp;T. If you transfer a SIM card from another phone you were using with AT&amp;amp;T, you may need to activate the PinePhone through [https://www.att.com/buy/wireless/byod/byod AT&amp;amp;T's website]. Calls and SMS messages work. 4G and MMS work if [https://www.att.com/support/article/wireless/KM1062162/ these settings] are used for APN, MMSC, and Proxy.&lt;br /&gt;
&lt;br /&gt;
AT&amp;amp;T may drop support with their network upgrade in the near future like their child company Cricket Wireless already has. [https://www.att.com/ecms/dam/att/consumer/help/pdf/Devices-Working-on-ATT-Network.pdf This page] lists their supported devices for their new network.&lt;br /&gt;
&lt;br /&gt;
==== Consumer Cellular ====&lt;br /&gt;
&lt;br /&gt;
Consumer Cellular is a MVNO that uses both AT&amp;amp;T and T-Mobile networks. On the AT&amp;amp;T network LTE data works without special configuration. If you transfer a SIM card from another phone to the PinePhone, you may need to contact customer support in order for them to register the IMEI association to the correct hardware; in one case it was first incorrectly identified as a Samsung Google Nexus Prime before later being correctly identified by the modem model Quectel EG25-G. Customer support also explicitly enabled VoLTE on the device. After VoLTE instructions on this site were followed and APN instructions on the Consumer Cellular site were followed, VoLTE was confirmed working.&lt;br /&gt;
&lt;br /&gt;
==== Cricket Wireless ====&lt;br /&gt;
&lt;br /&gt;
Cricket wireless is a MVNO that uses AT&amp;amp;T's network. VoLTE was fully supported, but the PinePhone is no longer considered a compatible device in the US by the carrier (as of March 2021).&lt;br /&gt;
&lt;br /&gt;
==== Faith Wireless ====&lt;br /&gt;
&lt;br /&gt;
Faith Wireless is a MVNO that uses AT&amp;amp;T's network. VoLTE was fully supported, but the PinePhone comes up as a Mobile Broadband Device. Faith Wireless does not service Mobile Broadband Devices. (As of February 2022)&lt;br /&gt;
&lt;br /&gt;
==== SimpleMobile ====&lt;br /&gt;
&lt;br /&gt;
SimpleMobile is a T-Mobile prepaid MVNO operating in the United States. 4G LTE, VoLTE, data, and SMS all work on the PinePhone after activation. Activation can be done online without extra software or assistance, go to https://www.simplemobile.com/activation/byopcollectsim and make sure you have your SIM card and IMEI ready.&lt;br /&gt;
&lt;br /&gt;
==== Sprint ====&lt;br /&gt;
&lt;br /&gt;
Sprint is currently not supported due to unknown reasons. Any input regarding this issue is highly appreciated.&lt;br /&gt;
&lt;br /&gt;
==== T-Mobile ====&lt;br /&gt;
&lt;br /&gt;
According to [https://ltefix.com/wp-content/uploads/USA-Major-Carriers-Bands-Frequencies-CA.pdf this page], T-Mobile's primary frequency band for the United States is 12 (700ac MHz).&lt;br /&gt;
&lt;br /&gt;
T-Mobile's bands and protocols are summarized on [https://www.frequencycheck.com/carriers/t-mobile-united-states this page].&lt;br /&gt;
&lt;br /&gt;
While the PinePhone's modem does support all LTE bands that T-Mobile uses in the US (And is one of the best choices for band support with the PinePhone's modem in the US), VoLTE is still listed as &amp;quot;Under development&amp;quot; by the modem manufacturer. T-Mobile's system also does not list the PinePhone as a compatible device due to this lack of official VoLTE support. The modem is capable of working on T-Mobile with VoLTE support enabled.&lt;br /&gt;
&lt;br /&gt;
==== Verizon ====&lt;br /&gt;
&lt;br /&gt;
According to [https://ltefix.com/wp-content/uploads/USA-Major-Carriers-Bands-Frequencies-CA.pdf this page], Verizon's primary frequency band for the United States is 13 (700 MHz). Verizon's bands and protocols are summarized on [https://www.frequencycheck.com/carriers/verizon-wireless-united-states this page]. According to the same page, Verizon might restrict their network to only approved devices.&lt;br /&gt;
&lt;br /&gt;
Some users reported that they were able to activate their Verizon SIM by using an Verizon-approved burner phone and then inserting the SIM into the PinePhone.&lt;br /&gt;
&lt;br /&gt;
==== TracFone ====&lt;br /&gt;
&lt;br /&gt;
Following TracFone's [https://www.verizon.com/about/news/verizon-completes-tracfone-wireless-inc-acquisition acquisition by Verizon], support for the AT&amp;amp;T and T-Mobile bands has been deprecated as of early June 2022. TracFone has the same issues with connecting as Verizon, as they now exclusively use Verizon's frequency band.&lt;br /&gt;
&lt;br /&gt;
==== Google Fi ====&lt;br /&gt;
&lt;br /&gt;
Only T-Mobile service works currently, not US Cellular or Sprint. The APN is &amp;lt;code&amp;gt;h2g2&amp;lt;/code&amp;gt;. Information from [https://forum.pine64.org/showthread.php?tid=11675&amp;amp;page=7 the forum].&lt;br /&gt;
&lt;br /&gt;
Bear in mind that initial activation of the SIM card is not possible without an Android phone running Google Apps. &lt;br /&gt;
&lt;br /&gt;
It should also be noted that Google uses a non-standard MMS implementation that is unlikely to be supported on the PinePhone at any point.&lt;br /&gt;
&lt;br /&gt;
=== Europe ===&lt;br /&gt;
&lt;br /&gt;
==== Telekom Germany ====&lt;br /&gt;
&lt;br /&gt;
With low signal, there may be loud interference noise audible in calls on the receiving end. It has not yet been tested whether or not this problem is carrier specific. An easy fix is extending the modem antenna with aluminum foil (or similar) inside the back cover of the phone.&lt;br /&gt;
&lt;br /&gt;
==== Orange Poland ====&lt;br /&gt;
&lt;br /&gt;
Setting up dual stack IPv4 and IPv6 may require [https://etherpad.gnome.org/p/dx7pbkPMCytMLMRl1eyo extra work], because the carrier provides IPv4 connectivity on internetipv6 APN via a protocol called CLAT/NAT64.&lt;br /&gt;
&lt;br /&gt;
==== Sweden ====&lt;br /&gt;
&lt;br /&gt;
Calls, SMS, and data (2G, 3G, and 4G) should work out of the box (tested three carriers on Mobian Phosh). On about half of Swedish carriers, MMS works when set manually, the rest have different data APN and MMS APN. VoLTE (i.e. 4G calls) did not work out of the box ([https://github.com/Eliot-Roxbergh/notes_pinephone for me]) but worked well after [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md#adsp-versions updating firmware] to ADSP Version 01.003.01.003 and installing [https://github.com/the-modem-distro/pinephone_modem_sdk Pinephone Modem SDK]. Regarding call quality, from my experience; 3G has the best quality, then 4G also works well although you often hear electrical white noise sound (on your side), 2G works well but there is a risk of strong noise when on bad coverage (this can affect both sides of the call). Voicemail should work, you should get a SMS when you have a missed call etc. Only issue I had was that when getting sent to voicemail in a call, for some target carriers (?) it was completely silent.&lt;br /&gt;
&lt;br /&gt;
=== Asia ===&lt;br /&gt;
&lt;br /&gt;
==== China Telecom ====&lt;br /&gt;
&lt;br /&gt;
The baseband itself ships with bad (for CDMA, which isn't supported by EG25-G) MBN file for CT, so a force change of MBN file to the generic one is needed to get VoLTE (thus SMS+Call) work.&lt;br /&gt;
&lt;br /&gt;
Run the following AT commands to force ROW_Generic_3GPP which can support VoLTE on CT:&lt;br /&gt;
&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;autosel&amp;quot;,0&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
 AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&lt;br /&gt;
==== SoftBank ====&lt;br /&gt;
&lt;br /&gt;
SoftBank USIM cards are IMEI-locked, and on top of that will only work on either Android or iOS. A free SIM is available, but that one is data only. The same problem might exist with MVNO's who make use of the SoftBank network, and therefore it's advised to pick either NTT docomo or au as the MNO.&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
&lt;br /&gt;
Known issues:&lt;br /&gt;
&lt;br /&gt;
* The [https://www.frequencycheck.com/models FrequencyCheck model page] does not list either Pine64 or the PinePhone.&lt;br /&gt;
* T-Mobile's system does not list the PinePhone as a compatible device due to the lack of official VoLTE support from the manufacturer, despite the fact that it does work.&lt;br /&gt;
* MMS doesn't currently work in any distribution on the PinePhone by default. This means images and group chats will not work in text messages.&lt;br /&gt;
* Some providers may allow only certain known devices identified by their [https://en.wikipedia.org/wiki/Type_Allocation_Code Type Allocation Code].&lt;br /&gt;
&lt;br /&gt;
== MMS workarounds ==&lt;br /&gt;
&lt;br /&gt;
These scripts allow partial MMS support on a [[PinePhone]] in distributions without working MMS support:&lt;br /&gt;
&lt;br /&gt;
* JMMS: [https://git.sr.ht/~amindfv/jmms]&lt;br /&gt;
* silvermms: [https://gitlab.com/5ilver/silvermms]&lt;br /&gt;
* MMS via Matrix with mmmpuppet: [[PinePhone MMS with Matrix]]&lt;br /&gt;
&lt;br /&gt;
There is a Haskel MMS client. MMS can also be manually composed with mmsd on the command line.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* IMEI - [https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity International Mobile Equipment Identity]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:Fxc&amp;diff=20761</id>
		<title>User:Fxc</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:Fxc&amp;diff=20761"/>
		<updated>2023-09-22T21:20:53Z</updated>

		<summary type="html">&lt;p&gt;Fxc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Export ==&lt;br /&gt;
&lt;br /&gt;
https://wiki.pine64.org/wiki/Special:AllPages?from=&amp;amp;to=&amp;amp;namespace=0&amp;amp;hideredirects=1&lt;br /&gt;
&lt;br /&gt;
https://wiki.pine64.org/wiki/Special:Export&lt;br /&gt;
&lt;br /&gt;
[[User:Fxc/export]]&lt;br /&gt;
&lt;br /&gt;
Cutoff: 16 April 2023&lt;br /&gt;
&lt;br /&gt;
22 September 2023: PineTab-V, PineTab2&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
The Ox64 can be flashed using an UART connection or by connecting the device to the computer using USB-C.&lt;br /&gt;
&lt;br /&gt;
=== Using UART ===&lt;br /&gt;
&lt;br /&gt;
To flash the Ox64 using an UART connection, first connect your UART device as pictured below:&lt;br /&gt;
&lt;br /&gt;
[[File:|360px]]&lt;br /&gt;
&lt;br /&gt;
Then do the following steps:&lt;br /&gt;
&lt;br /&gt;
* Do not connect the micro-USB cable or ''VBUS'' yet&lt;br /&gt;
* Press and hold the ''BOOT'' button&lt;br /&gt;
* Connect the micro-USB cable or connect ''VBUS''&lt;br /&gt;
* Wait for a few seconds&lt;br /&gt;
* Release the ''BOOT'' button&lt;br /&gt;
&lt;br /&gt;
=== Using USB ===&lt;br /&gt;
&lt;br /&gt;
To flash the Ox64 using a USB-C connection to a computer:&lt;br /&gt;
&lt;br /&gt;
{{Info|This won't be possible on the first batch of Ox64 devices from October 2022, see [https://gist.github.com/lupyuen/7a0c697b89abccda8e38b33dfe5ebaff here].}}&lt;br /&gt;
&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
== Chaos ==&lt;br /&gt;
* [[ROCKPro64 Software Releases#Android]]&lt;br /&gt;
* [[Special:ListFiles]]&lt;br /&gt;
* [[Pinebook Pro]]&lt;br /&gt;
* [[Getting started]]&lt;br /&gt;
* [[SOEDGE Software Releases]]&lt;br /&gt;
* [[PineBuds Pro]] -&amp;gt; stub sections, lacks user manual steps&lt;br /&gt;
* [[Special:UncategorizedPages]]&lt;br /&gt;
* [[Accessories_Step_by_Step_Guides]] -&amp;gt; Explanation for which devices this applies&lt;br /&gt;
* Rename Accessories_Step_by_Step_Guides section to Accessories everywhere&lt;br /&gt;
* [[PineTime#Community]] redundant information. Might be solved with a template per article&lt;br /&gt;
* [[SOQuartz Software Releases]]&lt;br /&gt;
&lt;br /&gt;
== ChatGPT: Flashing with dd ==&lt;br /&gt;
Flashing a disk image to a microSD card using the dd command involves writing the disk image file to the microSD card. This process is performed through the terminal on Linux or macOS. Here are the steps to flash a disk image to a microSD card using &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
1. Determine the device name of the microSD card: On Linux or macOS, you can use the &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;diskutil list&amp;lt;/code&amp;gt; command to find the name of the microSD card (e.g., ''/dev/sdb''). Make sure to properly identify the microSD card, as using the wrong device name can result in data loss.&lt;br /&gt;
&lt;br /&gt;
2. Unmount the microSD card: If the microSD card is already mounted, you need to unmount it before flashing the disk image. On Linux, you can use the &amp;lt;code&amp;gt;umount&amp;lt;/code&amp;gt; command. On macOS, you can use the &amp;lt;code&amp;gt;diskutil unmount&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
3. On Linux or macOS, open a terminal window.&lt;br /&gt;
&lt;br /&gt;
4. Flash the disk image to the microSD card: Use the following command to flash the disk image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if='''path_to_disk_image.img''' of='''/dev/sdX''' bs=4M conv=fsync&lt;br /&gt;
&lt;br /&gt;
* Replace '''path_to_disk_image.img''' with the path to the disk image file.&lt;br /&gt;
* Replace '''/dev/sdX''' with the device name of the microSD card you determined in step 1.&lt;br /&gt;
&lt;br /&gt;
5. Wait for the process to complete: The ''dd'' command will not provide any output until it has completed the process. This may take several minutes, depending on the size of the disk image and the speed of your computer and microSD card.&lt;br /&gt;
&lt;br /&gt;
6. Eject the microSD card: Once the ''dd'' command has completed, eject the microSD card. On Linux, you can use the &amp;lt;code&amp;gt;eject&amp;lt;/code&amp;gt; command. On macOS, you can use the &amp;lt;code&amp;gt;diskutil eject&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Note: Before flashing the disk image, make sure to backup any important data on the microSD card, as this process will erase all existing data on the card.&lt;br /&gt;
&lt;br /&gt;
== ChatGPT: Flashing with Etcher ==&lt;br /&gt;
Here are the steps to flash a disk image to a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download and install a disk image writing tool: A commonly used tool for this purpose is Etcher, which is available for Windows, Mac, and Linux.&lt;br /&gt;
# Insert the microSD card into your computer: Make sure that you have an SD card reader, or an adapter to connect the microSD card to your computer.&lt;br /&gt;
# Open the disk image writing tool: Launch Etcher and select the disk image file you want to flash to the microSD card.&lt;br /&gt;
# Select the target device: In Etcher, select the microSD card from the list of available drives.&lt;br /&gt;
# Start the flashing process: Click the &amp;quot;Flash&amp;quot; button to start the process of writing the disk image to the microSD card. This process may take a few minutes, depending on the size of the disk image and the speed of your computer.&lt;br /&gt;
# Verify the flash: After the flash is complete, Etcher will verify the integrity of the image to make sure it was written correctly.&lt;br /&gt;
# Eject the microSD card: Once the flash is complete and verified, safely eject the microSD card from your computer. You can now use the microSD card with the device it was intended for.&lt;br /&gt;
&lt;br /&gt;
Note: Before flashing the disk image, make sure to backup any important data on the microSD card, as this process will erase all existing data on the card.&lt;br /&gt;
&lt;br /&gt;
== Main example ==&lt;br /&gt;
&lt;br /&gt;
=== Devices ===&lt;br /&gt;
&lt;br /&gt;
You can learn more about the following ARM and RISC-V devices manufactured by PINE64:&lt;br /&gt;
&lt;br /&gt;
Phones:&lt;br /&gt;
* [[PinePhone]]&lt;br /&gt;
* [[PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
Phone accessories:&lt;br /&gt;
* [[PinePhone (Pro) Add-ons]]&lt;br /&gt;
* [[PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
Tablets: &lt;br /&gt;
* [[PineNote]]&lt;br /&gt;
* [[PineTab]]&lt;br /&gt;
&lt;br /&gt;
Wearable:&lt;br /&gt;
* [[PineBuds Pro]]&lt;br /&gt;
* [[PineTime]]&lt;br /&gt;
&lt;br /&gt;
Laptops: &lt;br /&gt;
* [[Pinebook]], [[1080P Pinebook]], [[Pinebook Pro]] and [[Pinebook Pro Dock|Pinebook Pro Docking station]]&lt;br /&gt;
&lt;br /&gt;
Single-board computers: &lt;br /&gt;
* [[Ox64]], [[STAR64]], [[Quartz64]], [[QuartzPro64_Development|QuartzPro64]], [[ROCKPro64]], [[ROCK64]], [[PINE A64]], [[PINE A64-LTS/SOPine|PINE A64-LTS]] and [[PINE H64]]&lt;br /&gt;
&lt;br /&gt;
Set-top box: &lt;br /&gt;
* [[RockBox]]&lt;br /&gt;
&lt;br /&gt;
Clusters and modules: &lt;br /&gt;
* [[Clusterboard]]&lt;br /&gt;
* [[SOPINE]] and [[SOPINE Baseboard]]&lt;br /&gt;
* [[SOEDGE]] and [[SOEDGE Baseboard]]&lt;br /&gt;
* [[SOQuartz]]&lt;br /&gt;
&lt;br /&gt;
IP camera: &lt;br /&gt;
* [[PineCube]]&lt;br /&gt;
&lt;br /&gt;
Makerspace: &lt;br /&gt;
* [[Pinecil]], [[PinePower]], [[PineCone]] and [[Pinedio]]&lt;br /&gt;
&lt;br /&gt;
== Pinebook notes ==&lt;br /&gt;
Merge https://wiki.pine64.org/wiki/1080P_Pinebook_Software_Releases into https://wiki.pine64.org/wiki/Pinebook_Software_Releases&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
|+ Compatibility&lt;br /&gt;
|-&lt;br /&gt;
! Pinebook 11.6″ !! Pinebook 11.6&amp;quot; 1080p !! Pinebook 14″&lt;br /&gt;
|-&lt;br /&gt;
| ✅ || ❓ || ❌&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Collapsible test ==&lt;br /&gt;
&lt;br /&gt;
{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; style=&amp;quot;max-width: 60%&amp;quot;&lt;br /&gt;
| &amp;lt;strong&amp;gt;Notes&amp;lt;/strong&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:Thomzane/Woodpecker&amp;diff=20759</id>
		<title>User:Thomzane/Woodpecker</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:Thomzane/Woodpecker&amp;diff=20759"/>
		<updated>2023-09-22T21:03:17Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Fxc moved page Woodpecker to User:Thomzane/Woodpecker: Draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Woodpecker''' Edition Serial Console is powered by the CH340G chipset enabled simple USB to Serial communication for PINE64 related project development.&lt;br /&gt;
&lt;br /&gt;
The S1 jumper can be set to 5V or 3.3V.&lt;br /&gt;
&lt;br /&gt;
[https://pine64.com/product/serial-console-woodpecker-edition/ PINE64 store page]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab2&amp;diff=20756</id>
		<title>PineTab2</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab2&amp;diff=20756"/>
		<updated>2023-09-18T20:36:35Z</updated>

		<summary type="html">&lt;p&gt;Fxc: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PineTab2 Front.jpg|250px|thumb|right|The PineTab2 with the detachable keyboard attached]]&lt;br /&gt;
&lt;br /&gt;
The '''PineTab2''' is PINE64's successor to the original [[PineTab]] Linux tablet computer, featuring a faster processor and better availability. The tablet is available in two configurations, 4GB of RAM and 64GB of internal storage or 8GB of RAM and 128GB of internal storage. The tablet ships with a detachable keyboard that doubles as a protective cover.&lt;br /&gt;
&lt;br /&gt;
The tablet is designed around the Rockchip RK3566 processor, which features 4 energy-efficient Cortex-A55 64-bit ARM cores and enjoys good mainline Linux support. A similarly packaged RISC-V tablet is the [[PineTab-V]].&lt;br /&gt;
&lt;br /&gt;
Pre-orders started on the 13th of April 2023, with pricing starting at USD 159 for the 4GB/64GB version and USD 209 for the 8GB/128GB version. The PineTab2 began shipping on June 2, 2023.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
The PineTab2 box contains two smaller boxes.&lt;br /&gt;
&lt;br /&gt;
The first box includes:&lt;br /&gt;
&lt;br /&gt;
* the PineTab2, &lt;br /&gt;
* a short user guide, &lt;br /&gt;
* a power cable and &lt;br /&gt;
* the UART adapter. Note that the UART adapter is in the same package as the power cable in a second compartment and can be a bit hidden. &lt;br /&gt;
&lt;br /&gt;
The second box has the keyboard in it.&lt;br /&gt;
&lt;br /&gt;
=== First start ===&lt;br /&gt;
&lt;br /&gt;
The PineTab2 can be started by pressing and holding the power button for two seconds. The device is initialized at the first boot and will power-cycle while the partition table is populated.&lt;br /&gt;
&lt;br /&gt;
{{Info|If the initialization process is interrupted it might lead to a corrupted operating system installation. In that case reinstall the operating system as explained below.}}&lt;br /&gt;
&lt;br /&gt;
The PineTab2 ships with ''DanctNix Arch Linux'' and comes with a pre-set user and the default password &amp;lt;code&amp;gt;123456&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;alarm / 123456&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can create a new user and set your own password after the initial boot. To do so, go to ''system settings'' -&amp;gt; ''users'' and create a new profile using your preferred name and password.&lt;br /&gt;
&lt;br /&gt;
=== Keyboard cover ===&lt;br /&gt;
&lt;br /&gt;
When connecting the keyboard to the Pinetab2 ensure that the camera and the golden pogo pin connectors are correctly aligned. &lt;br /&gt;
The external keyboard has 5 connection pins (the golden pins). four are standard USB connectors and one is used to detect that the keyboard is connected.&lt;br /&gt;
&lt;br /&gt;
The backlight can be changed with the key combination ''Pinekey + Ctrl (right)''.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
All operating systems for the PineTab2 are delivered by community developers and partner projects. Aside from the operating system that comes pre-installed on your device, you can install and run any other operating system available for the PineTab2. Most, if not all operating systems for the PineTab2 are open and free, such as Linux and BSD.&lt;br /&gt;
&lt;br /&gt;
Since most software issues will be release-specific, please see the [[PineTab2 Releases]] page for additional software related instructions, tips, and tricks.&lt;br /&gt;
&lt;br /&gt;
=== Releases ===&lt;br /&gt;
&lt;br /&gt;
The releases for the PineTab2 can be found under [[PineTab2 Releases]].&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The PineTab2 is capable of running different operating systems from the internal flash memory (eMMC) and from microSD card.&lt;br /&gt;
&lt;br /&gt;
'''Preparing the microSD card'''&lt;br /&gt;
&lt;br /&gt;
To write an operating system to the microSD card (typically called &amp;quot;flashing&amp;quot; in the community), you need to first download a compatible image from the [[#Releases|releases]] section.&lt;br /&gt;
&lt;br /&gt;
Next you need to decompress the downloaded image. The images are typically compressed in an archive format such as ''xz'' to reduce the download size. If you are using a graphical tool such as ''balenaEtcher'' or ''Gnome Disks'' it will handle the decompression of the image in the flashing step automatically.&lt;br /&gt;
&lt;br /&gt;
Further you need to flash the image to the microSD card. This can be done using various tools, for example ''balenaEtcher'' (recommended for new users), ''Gnome Disks'' or command-line tools such as ''cp'' and ''dd''. Insert the microSD card in a microSD card reader connected to your computer and then choose a tool of your liking.&lt;br /&gt;
&lt;br /&gt;
Graphical applications:&lt;br /&gt;
&lt;br /&gt;
* '''balenaEtcher''' (Microsoft Windows, macOS, Linux): Click on ''Flash from file'' and select the image. Then select the microSD card target device and click on ''Flash!''.&lt;br /&gt;
&lt;br /&gt;
* '''Gnome Disks''' (Linux): Select the microSD card target device on the left side in the ''Disks'' list. Then select the three dot menu on the top right and click on ''Restore Disk Image...''. Select the image, verify the correct device is selected and then click on ''Start Restoring...''.&lt;br /&gt;
&lt;br /&gt;
Command-line tools:&lt;br /&gt;
&lt;br /&gt;
* '''cp''': &amp;lt;code&amp;gt;sudo cp '''IMAGE.img''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dd''': &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Info|Make sure to replace '''IMAGE.img''' and '''[DEVICE]''' with the filename of the image (double check if it is decompressed and has the file extension ''.img'') and the device name. You can use the command &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; to find the device name. Make sure to flash to the whole device instead of partition 1 and that you're NOT selecting ''/dev/sda1'' or ''/dev/mmcblk0p1'' as target. Be very careful to select the correct device, as the tools can overwrite your data when the wrong device is selected.}}&lt;br /&gt;
&lt;br /&gt;
Then insert the microSD card into the PineTab2. &lt;br /&gt;
&lt;br /&gt;
[[File:PineTab2 USB UARTv2.jpg|thumb|right|400px|Using the USB UART adapter can be required in some cases as explained in the info box about the boot order. The adapter is shipped with the PineTab2 in the box which is also containing the charging cable. The switch to disable the eMMC and SPI is located on the top right of the image.]]&lt;br /&gt;
&lt;br /&gt;
{{Hint|'''Note regarding the boot order:''' The SPI and the internal memory (eMMC) have a higher boot priority than the microSD card. The pre-installed bootloader on the internal memory (eMMC) tries to boot from the microSD card first. '''In some cases''' it can be required to bypass the bootloader, for example if the bootloader is corrupted or was overwritten by a bootloader with varying settings.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To force the device to boot from the microSD card, the eMMC and the SPI can be disabled by using the debug UART adapter shipped with the device in the box also containing the charging cable. Set the ''SD BOOT MASKROM'' switch on the adapter to the position ''ON'' and plug it into the USB/PD charging port. Then power on the tablet and '''unplug the debug board or set the switch to the position ''OFF'' again''' when the factory image is started, otherwise the factory image won't find the eMMC.}}&lt;br /&gt;
&lt;br /&gt;
Power on the device with the microSD card inserted (and optionally with the USB UART adapter inserted and the bypass switch set to ''ON'' depending on the software situation, see the info box above). It should now boot the new operating system from the microSD card.&lt;br /&gt;
&lt;br /&gt;
'''Something is not working?''' Please join the [[Main_Page#Chat_Platforms|PineTab channel in the community chat]], the community is always happy to help. In the section [[#Connecting the UART adapter]] you can find information about how to connect the USB UART adapter and how to retrieve the boot logs if the device is not booting properly even after the above procudere.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
[[File:RK3566_icon.png|right]]&lt;br /&gt;
[[File:Pinetab2-side.jpeg|thumb|400px|right|Tablet's side ports: USB-C (with PD), MicroSD, USB-C 3.0, volume rocker, power button]]&lt;br /&gt;
* '''SoC:''' Rockchip RK3566&lt;br /&gt;
* '''CPU:''' 4x ARM Cortex-A55 @ 1.8 GHz&lt;br /&gt;
** 32KB L1 Instruction Cache and 32KB L1 Data Cache per core&lt;br /&gt;
** 512KB unified system L3 cache&lt;br /&gt;
** ARMv8 Cryptography Extensions&lt;br /&gt;
* '''GPU:''' Mali-G52 MP2 @ 800 MHz&lt;br /&gt;
** Supported by the open source 'Panfrost' driver in Linux and Mesa&lt;br /&gt;
** Supports OpenGL 3.1 and OpenGL ES 3.1 with many newer extensions&lt;br /&gt;
* '''NPU:''' 0.8 TOPS Neural Processing Unit&lt;br /&gt;
* '''RAM:''' 4GB or 8GB LPDDR4&lt;br /&gt;
* '''Storage:'''&lt;br /&gt;
** 64GB or 128GB internal eMMC ([https://www.szyuda88.com/product-77313-276594.html SiliconGo SGM8 100C-S36BCG]; eMMC 5.1, up o 400MB/s)&lt;br /&gt;
** 1x MicroSD slot&lt;br /&gt;
* '''Display:''' 10.1&amp;quot; IPS LCD Resolution 1280x800&lt;br /&gt;
* '''Cameras:'''&lt;br /&gt;
** Front: 2Mpx, chipset: Galaxycore GC02M2&lt;br /&gt;
** Rear: 5Mpx, chipset: Omnivision OV5648&lt;br /&gt;
* '''Battery:''' 6000 mAh (22.2Wh)&lt;br /&gt;
* '''Buttons:''' Power, volume up, volume down&lt;br /&gt;
* '''Network:'''&lt;br /&gt;
** Wi-Fi: BES2600&lt;br /&gt;
*** Driver under development, use a USB wifi dongle for now&lt;br /&gt;
** Bluetooth: BES2600&lt;br /&gt;
* '''I/O:'''&lt;br /&gt;
** 1x USB-C 3.0 (top, host mode only; power output up to 680mA)&lt;br /&gt;
** 1x USB-C 2.0 + PD (bottom, device mode by default; power input)&lt;br /&gt;
** 1x MicroHDMI&lt;br /&gt;
** 1x 4 pole 3.5mm audio jack (microphone right) and headphone detection&lt;br /&gt;
** 2x speakers + microphone (microphone left)&lt;br /&gt;
** 1x 5 pin (USB 2.0; &amp;lt;=680mA) Pogo connector for keyboard&lt;br /&gt;
** (PCIe on PCB as a flat flex ribbon connector, no room for M.2 NVMe drives in case)&lt;br /&gt;
* '''Sensors:'''&lt;br /&gt;
** Accelerometer: Silan SC7A20&lt;br /&gt;
** Ambient Light &amp;amp; Proximity Sensor&lt;br /&gt;
* '''Multimedia:'''&lt;br /&gt;
** rkdjpeg: 1080p120 JPEG decode&lt;br /&gt;
*** no driver in mainline yet&lt;br /&gt;
** hantro: JPEG/VP8/H.264 encode, 1080p MPEG-2/H.263/VP8/H.264 AVC decode&lt;br /&gt;
*** mainline driver does not yet support all codecs/functions&lt;br /&gt;
*** see [[Mainline Hardware Decoding]] and [[Mainline Hardware Encoding]]&lt;br /&gt;
** rkvdec2: 4K H.264 AVC Main10 L5.1/H.265 HEVC Main10 L5.1/VP9 Profile 0 and 2 L5.1 decode&lt;br /&gt;
*** no driver in mainline yet&lt;br /&gt;
** rkvenc2: 4K H.264 AVC/H.265 HEVC encode&lt;br /&gt;
*** no driver in mainline yet&lt;br /&gt;
* '''Build:''' Metal and Plastic&lt;br /&gt;
* '''Dimensions:''' 242x161x9mm&lt;br /&gt;
* '''Weight:''' 538g&lt;br /&gt;
* '''Misc:'''&lt;br /&gt;
** Protective cover with keyboard&lt;br /&gt;
&lt;br /&gt;
== Development efforts ==&lt;br /&gt;
&lt;br /&gt;
{{SeeMainArticle|Quartz64 Development}}&lt;br /&gt;
&lt;br /&gt;
Linux mainline is already quite far along for the device, as the SoC is the same as is used in the Quartz64 line of devices. Some minor pinetab2-specific adjustments can be found [https://github.com/TuxThePenguin0/linux/tree/device/pine64-pinetab2_stable here] Check the main article for the big picture; PineTab2 specific issues are listed here.&lt;br /&gt;
&lt;br /&gt;
=== Known Issues ===&lt;br /&gt;
&lt;br /&gt;
* The display panel driver is in PineTab2's kernel fork, and needs to be submitted to upstream.&lt;br /&gt;
* The [https://gitlab.com/TuxThePenguin0/bes2600 BES2600 Wi-Fi driver] needs major cleanup and bugfixing (at the moment it often causes system crashes). This is a priority, but for now, you can [[PineTab2_FAQ#Performing_USB_Tethering_with_an_Android_Phone|USB tether a phone]] or [[PineTab2_FAQ#Selecting_a_USB_WIFI_Adapter|use a supported WI-FI dongle]].&lt;br /&gt;
* The BES2600 Bluetooth driver needs to be implemented.&lt;br /&gt;
* The Camera drivers needs to be ported ([https://github.com/rockchip-linux/kernel/blob/develop-4.19/drivers/media/i2c/gc02m2.c gc02m2], [https://elixir.bootlin.com/linux/latest/source/drivers/media/i2c/ov5648.c ov5648]), Rockchip CSI/ISP driver needs to be extended to handle 2 lanes.&lt;br /&gt;
* Suspend does not currently work reliably due to a driver issue. It is therefore disabled in the factory image. Caveat Emptor if you chose to unmask the feature prior to it being fixed.&lt;br /&gt;
&lt;br /&gt;
=== Connecting the UART adapter ===&lt;br /&gt;
&lt;br /&gt;
The USB-C UART adapter can be connected to the PineTab2 to debug boot issues at the early boot:&lt;br /&gt;
&lt;br /&gt;
* Plug the adapter face-up in the USB-C port furthest away from the power button. If all the lights are lit, you have the wrong port: only the green light should be lit when you first plug it in.&lt;br /&gt;
* Plug USB-C cable into the port on the adapter marked &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
* Open a terminal window&lt;br /&gt;
* Install ''minicom'' or ''screen'' via your distribution's package manager, if you don't have it installed already&lt;br /&gt;
* Connect via minicom using &amp;lt;code&amp;gt;sudo minicom -D /dev/ttyUSB0 -b 1500000&amp;lt;/code&amp;gt; or via screen using &amp;lt;code&amp;gt;sudo screen /dev/ttyUSB0 1500000&amp;lt;/code&amp;gt;&lt;br /&gt;
** Ubuntu-based distro users may encounter the error, &amp;quot;cannot open /dev/ttyUSB0: No such file or directory&amp;quot;.  If this occurs, check the output of &amp;lt;code&amp;gt;sudo dmesg --follow&amp;lt;/code&amp;gt; and unplug/replug the USB to look for any errors.  If you see an error like, &amp;quot;usb 1-1: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1&amp;quot;, then the brltty service is likely conflicting with this device.  Brltty provides access to blind users who use a braille display: if you do not need this service, try disabling it using these commands:&lt;br /&gt;
*** &amp;lt;code&amp;gt; sudo systemctl stop brltty-udev.service&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt; sudo systemctl mask brltty-udev.service&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt; sudo systemctl stop brltty.service&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt; sudo systemctl mask brltty.service&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Board information, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
[[File:PPineTab2-pcb.jpg|thumb|right|PineTab2 Board]]&lt;br /&gt;
&lt;br /&gt;
PineTab2 mainboard schematic:&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PineTab/PineTab2_V2_schematic-20230417.pdf PineTab2 mainboard Released Schematic-20230417 ver 2.0]&lt;br /&gt;
* [https://files.pine64.org/doc/PineTab/PineTab2_V2_comp_ref_top-20230417.pdf PineTab2 PCB Component Reference location v2.0 (top layer)]&lt;br /&gt;
* [https://files.pine64.org/doc/PineTab/PineTab2_V2_comp_ref_bottom-20230417.pdf PineTab2 PCB Component Reference location v2.0 (bottom layer)]&lt;br /&gt;
* [https://files.pine64.org/doc/PineTab/pinetab2-V_uart_console_schematic-20221107.pdf PineTab2/PineTab-V UART Dongle Schematic-20221107]&lt;br /&gt;
&lt;br /&gt;
PineTab2 certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/Pinetab2%20FCC-SDOC%20Certificate-LCSA040323223E.pdf PineTab2 FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/Pinetab2%20CE%20RED%20Certificate-LCSA040323224E.pdf PineTab2 CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PineTab2%20CE%20EMC%20Certificate-LCSA040323225E.pdf PineTab2 CE EMC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PineTab2%20ROHS%20Report-LCSA040323221R.pdf PineTab2 ROHS Test Report]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PineTab2%20Keyboard%20CE%20EMC%20Certificate-LCSA062623001E.pdf PineTab2/PineTab-V Detached Keyboard CE EMMC Certificate]&lt;br /&gt;
&lt;br /&gt;
PineTab2 disassembly guide:&lt;br /&gt;
* [[file:PineTab2_display_panel_disassembly_guide.pdf]]&lt;br /&gt;
* Note: this is a very delicate operation esp. around the corners of the screen. Several (even experienced) users ended up damaging the screen.&lt;br /&gt;
&lt;br /&gt;
== Datasheets for Components and Peripherals ==&lt;br /&gt;
&lt;br /&gt;
Rockchip RK3566 SoC information:&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/quartz64/Rockchip%20RK3566%20Datasheet%20V1.0-20201210.pdf Rockchip RK3566 ver 1.0 datasheet]&lt;br /&gt;
* [https://opensource.rock-chips.com/images/2/26/Rockchip_RK3568_TRM_Part1_V1.3-20220930P.PDF Rockchip RK3566 and RK3568 TRM (Technical Reference Manual)]&lt;br /&gt;
&lt;br /&gt;
== Tutorials and Frequently Asked Questions ==&lt;br /&gt;
Please see the [[PineTab2 FAQ]] page for tutorials and frequently asked questions.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.pine64.org/2022/12/15/december-update-merry-christmas-and-happy-new-pinetab/ December 2022 Community Update]&lt;br /&gt;
* [https://www.pine64.org/2023/03/01/february-update-things-are-taking-shape/ February 2023 Community Update]&lt;br /&gt;
&lt;br /&gt;
[[Category:Rockchip RK3566]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20667</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20667"/>
		<updated>2023-09-09T20:40:16Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Follow-Up Comments */ fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on microSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro on the microSD card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary wipe the microSD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get image files of the distributions ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images:&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part&lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follow:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-up cmments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20666</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20666"/>
		<updated>2023-09-09T20:39:50Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Partition the microSD Card */ fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on microSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro on the microSD card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary wipe the microSD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get image files of the distributions ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images:&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part&lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follow:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-Up Comments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20665</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20665"/>
		<updated>2023-09-09T20:39:31Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Build Mobian Partition */ fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on microSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro on the microSD card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary wipe the microSD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD Card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get image files of the distributions ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images:&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part&lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follow:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-Up Comments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20664</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20664"/>
		<updated>2023-09-09T20:39:15Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Build PostmarketOS Partition */ fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on microSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro on the microSD card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary wipe the microSD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD Card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get image files of the distributions ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images:&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part&lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian Partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follow:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-Up Comments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20663</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20663"/>
		<updated>2023-09-09T20:39:08Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Flash rk2Aw Loader to SPI */ fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on microSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro on the microSD card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary wipe the microSD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD Card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get image files of the distributions ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images:&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part&lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian Partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS Partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follow:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-Up Comments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20662</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20662"/>
		<updated>2023-09-09T20:38:26Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Multi-Distro on MicroSD Card */ Fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on microSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro on the microSD card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary wipe the microSD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD Card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get image files of the distributions ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images:&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part&lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian Partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS Partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw Loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-Up Comments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20661</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20661"/>
		<updated>2023-09-09T20:36:42Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Get Image Files for the Distros */ Fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-Distro on MicroSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw Loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro on SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary erase SD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the MicroSD Card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distros.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get image files of the distributions ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images:&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part&lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian Partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS Partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw Loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-Up Comments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20660</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20660"/>
		<updated>2023-09-09T20:36:03Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Multi-Distro on eMMC */ Fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-Distro on MicroSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw Loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro on SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary erase SD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the MicroSD Card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distros.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get Image Files for the Distros ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part &lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian Partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS Partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
== Multi-distro on eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2Aw Loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build multi-distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
== Follow-Up Comments ==&lt;br /&gt;
&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20659</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20659"/>
		<updated>2023-09-09T20:34:47Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Multi-Distro on MicroSD Card */ Fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
== Multi-Distro on MicroSD Card ==&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw Loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro on SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary erase SD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the MicroSD Card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distros.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
==== Get Image Files for the Distros ====&lt;br /&gt;
&lt;br /&gt;
Change the directory to the ''Downloads'' folder:&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from [[PinePhone Pro Software Releases]]. Example releases (update the syntax to newer releases):&lt;br /&gt;
&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the compressed files:&lt;br /&gt;
&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the images&lt;br /&gt;
&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check mounted images:&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part &lt;br /&gt;
&lt;br /&gt;
==== Build Arch Linux partition ====&lt;br /&gt;
&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Manjaro partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition:&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Build Mobian Partition ====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
==== Build PostmarketOS Partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Build Ubuntu Touch partition ====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
=== Multi-Distro on eMMC ===&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
==== Flash Rk2Aw Loader to SPI ====&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
==== Build Multi-Distro eMMC ====&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
===== Mount the Images =====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Prepare eMMC =====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Build Phosh Partition =====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
===== Build SXMO Partition =====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Follow-Up Comments ====&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20658</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20658"/>
		<updated>2023-09-09T20:30:44Z</updated>

		<summary type="html">&lt;p&gt;Fxc: fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using ''rk2aw''.&lt;br /&gt;
&lt;br /&gt;
=== Multi-Distro on MicroSD Card ===&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
==== Flash Rk2Aw Loader to SPI ====&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
==== Build Multi-Distro on SD Card ====&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary erase SD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
===== Partition the MicroSD Card =====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distros.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
===== Get Image Files for the Distros =====&lt;br /&gt;
Enter to Directory&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from wiki.pine64.org/wiki/PinePhone_Pro_Software_Releases&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the Compressed Files&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the Images&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check Mounted Images&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part &lt;br /&gt;
&lt;br /&gt;
===== Build Archlinux Partition =====&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
===== Build Manjaro Partition =====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
===== Build Mobian Partition =====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
===== Build PostmarketOS Partition =====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Build UbuntuTouch Partition =====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Multi-Distro on eMMC ===&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
==== Flash Rk2Aw Loader to SPI ====&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
==== Build Multi-Distro eMMC ====&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
===== Mount the Images =====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Prepare eMMC =====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Build Phosh Partition =====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
===== Build SXMO Partition =====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Follow-Up Comments ====&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20657</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20657"/>
		<updated>2023-09-09T20:30:12Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Added wiki-specifics&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to create a multi-distribution image on the [[PinePhone Pro]] using '''rk2aw'''.&lt;br /&gt;
&lt;br /&gt;
=== Multi-Distro on MicroSD Card ===&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
==== Flash Rk2Aw Loader to SPI ====&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
==== Build Multi-Distro on SD Card ====&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary erase SD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
===== Partition the MicroSD Card =====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distros.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
===== Get Image Files for the Distros =====&lt;br /&gt;
Enter to Directory&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from wiki.pine64.org/wiki/PinePhone_Pro_Software_Releases&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the Compressed Files&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the Images&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check Mounted Images&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part &lt;br /&gt;
&lt;br /&gt;
===== Build Archlinux Partition =====&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
===== Build Manjaro Partition =====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
===== Build Mobian Partition =====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
===== Build PostmarketOS Partition =====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Build UbuntuTouch Partition =====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Multi-Distro on eMMC ===&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
==== Flash Rk2Aw Loader to SPI ====&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
==== Build Multi-Distro eMMC ====&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
===== Mount the Images =====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Prepare eMMC =====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Build Phosh Partition =====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
===== Build SXMO Partition =====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Follow-Up Comments ====&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:Giorez/Rk2Aw_draft&amp;diff=20656</id>
		<title>User:Giorez/Rk2Aw draft</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:Giorez/Rk2Aw_draft&amp;diff=20656"/>
		<updated>2023-09-09T20:28:46Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Fxc moved page User:Giorez/Rk2Aw draft to PinePhone Pro/Create a multi-distribution image using rk2aw: As discussed in the chat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[PinePhone Pro/Create a multi-distribution image using rk2aw]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20655</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20655"/>
		<updated>2023-09-09T20:28:46Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Fxc moved page User:Giorez/Rk2Aw draft to PinePhone Pro/Create a multi-distribution image using rk2aw: As discussed in the chat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Multi-Distro on MicroSD Card ===&lt;br /&gt;
&lt;br /&gt;
This section explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot to SPI and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]]. Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL. Please note that loader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Flash Rk2Aw Loader to SPI ====&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine, start a ssh connection and download installer to flash pre-loader to the phone's SPI.&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh&lt;br /&gt;
&lt;br /&gt;
==== Build Multi-Distro on SD Card ====&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images from [[PinePhone Pro Software Releases]], decompress them and mount both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; from each distro.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
&lt;br /&gt;
If necessary erase SD card &lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick way i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow way i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
===== Partition the MicroSD Card =====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 64 GB for the microSD card is recommended for 5 distros.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb --wipe always &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=11G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;PMOS&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=11G, name=&amp;quot;UT&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;extra&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/sdb: 58.25 GiB, 62550179840 bytes, 122168320 sectors&lt;br /&gt;
 Disk model: SD Card Reader  &lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: C44BE2FC-34D6-4DD8-99FC-7FFB75602A79&lt;br /&gt;
 Old situation:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: F71BFBA6-D2C3-4C20-8079-1401B10C724C).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
  /dev/sdb1: Created a new partition 1 of type 'unknown' and of size 16 MiB.&lt;br /&gt;
  /dev/sdb2: Created a new partition 2 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb3: Created a new partition 3 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb4: Created a new partition 4 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb5: Created a new partition 5 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb6: Created a new partition 6 of type 'Linux filesystem' and of size 11 GiB.&lt;br /&gt;
  /dev/sdb7: Created a new partition 7 of type 'Linux filesystem' and of size 3.2 GiB.&lt;br /&gt;
  /dev/sdb8: Done.&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: F71BFBA6-D2C3-4C20-8079-1401B10C724C&lt;br /&gt;
 Device         Start       End  Sectors  Size Type&lt;br /&gt;
  /dev/sdb1         64     32767    32704   16M unknown&lt;br /&gt;
  /dev/sdb2      32768  23101439 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb3   23101440  46170111 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb4   46170112  69238783 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb5   69238784  92307455 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb6   92307456 115376127 23068672   11G Linux filesystem&lt;br /&gt;
  /dev/sdb7  115376128 122167295  6791168  3.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
===== Get Image Files for the Distros =====&lt;br /&gt;
Enter to Directory&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
&lt;br /&gt;
Download your chosen image from wiki.pine64.org/wiki/PinePhone_Pro_Software_Releases&lt;br /&gt;
 wget https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230203/archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 wget https://github.com/manjaro-pinephone/plasma-mobile/releases/download/beta15-rc4/Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 wget https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 wget https://images.postmarketos.org/bpo/v23.06/pine64-pinephonepro/phosh/20230904-0846/20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 # to do (postmarketOS-edge-phosh via BootStrap)&lt;br /&gt;
 wget https://gitlab.com/ook37/pinephone-pro-debos/-/jobs/4961858606/artifacts/file/ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Extract the Compressed Files&lt;br /&gt;
 xz -v -d -k archlinux-pinephone-pro-sxmo-20230203.img.xz&lt;br /&gt;
 xz -v -d -k Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img.xz&lt;br /&gt;
 xz -v -d -k mobian-pinephonepro-phosh-20230903.img.xz&lt;br /&gt;
 xz -v -d -k 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img.xz&lt;br /&gt;
 xz -v -d -k ubuntu-touch-pinephone-unified.img.xz&lt;br /&gt;
&lt;br /&gt;
Mount the Images&lt;br /&gt;
 sudo su # login with your psw&lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &amp;amp;&amp;amp; losetup -P /dev/loop2 Manjaro-ARM-plasma-mobile-pinephonepro-beta15-rc4.img &amp;amp;&amp;amp; losetup -P /dev/loop3 mobian-pinephonepro-phosh-20230903.img &amp;amp;&amp;amp; losetup -P /dev/loop4 20230904-0846-postmarketOS-v23.06-phosh-22.2-pine64-pinephonepro.img &amp;amp;&amp;amp; losetup -P /dev/loop5 ubuntu-touch-pinephone-unified.img&lt;br /&gt;
&lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinux /mnt/archlinux/boot /mnt/archlinux/root &amp;amp;&amp;amp; mkdir /mnt/manjaro /mnt/manjaro/boot /mnt/manjaro/root &amp;amp;&amp;amp; mkdir /mnt/mobian /mnt/mobian/boot /mnt/mobian/root &amp;amp;&amp;amp; mkdir /mnt/postmarketos /mnt/postmarketos/boot /mnt/postmarketos/root &amp;amp;&amp;amp; mkdir /mnt/ubuntutouch /mnt/ubuntutouch/boot /mnt/ubuntutouch/root&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd &amp;amp;&amp;amp; mkdir /mnt/manjarosd &amp;amp;&amp;amp; mkdir /mnt/mobiansd &amp;amp;&amp;amp; mkdir /mnt/postmarketossd &amp;amp;&amp;amp; mkdir /mnt/ubuntutouchsd&lt;br /&gt;
&lt;br /&gt;
 mount /dev/loop1p1 /mnt/archlinux/boot/ &amp;amp;&amp;amp; mount /dev/loop1p2 /mnt/archlinux/root/ &amp;amp;&amp;amp; mount /dev/loop2p1 /mnt/manjaro/boot/ &amp;amp;&amp;amp; mount /dev/loop2p2 /mnt/manjaro/root/ &amp;amp;&amp;amp; mount /dev/loop3p1 /mnt/mobian/boot/ &amp;amp;&amp;amp; mount /dev/loop3p2 /mnt/mobian/root/ &amp;amp;&amp;amp; mount /dev/loop4p1 /mnt/postmarketos/boot/ &amp;amp;&amp;amp; mount /dev/loop4p2 /mnt/postmarketos/root/ &amp;amp;&amp;amp; mount /dev/loop5p1 /mnt/ubuntutouch/boot/ &amp;amp;&amp;amp; mount /dev/loop5p2 /mnt/ubuntutouch/root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check Mounted Images&lt;br /&gt;
 lsblk&lt;br /&gt;
&lt;br /&gt;
 NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop1       7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1 259:0    0   122M  0 part /mnt/archlinux/boot&lt;br /&gt;
  └─loop1p2 259:1    0   3.4G  0 part /mnt/archlinux/root&lt;br /&gt;
  loop2       7:2    0   6.3G  0 loop &lt;br /&gt;
  ├─loop2p1 259:2    0 457.8M  0 part /mnt/manjaro/boot&lt;br /&gt;
  └─loop2p2 259:3    0   5.8G  0 part /mnt/manjaro/root&lt;br /&gt;
  loop3       7:3    0   5.6G  0 loop &lt;br /&gt;
 ├─loop3p1 259:4    0   511M  0 part /mnt/mobian/boot&lt;br /&gt;
 └─loop3p2 259:5    0   5.1G  0 part /mnt/mobian/root&lt;br /&gt;
 loop4       7:4    0   2.3G  0 loop &lt;br /&gt;
 ├─loop4p1 259:6    0   243M  0 part /mnt/postmarketos/boot&lt;br /&gt;
 └─loop4p2 259:7    0   2.1G  0 part /mnt/postmarketos/root&lt;br /&gt;
 loop5       7:5    0   3.7G  0 loop &lt;br /&gt;
 ├─loop5p1 259:10   0 380.5M  0 part /mnt/ubuntutouch/boot&lt;br /&gt;
 └─loop5p2 259:11   0   3.4G  0 part /mnt/ubuntutouch/root&lt;br /&gt;
 sdb         8:16   1  58.3G  0 disk &lt;br /&gt;
 ├─sdb1      8:17   1    16M  0 part &lt;br /&gt;
 ├─sdb2      8:18   1    11G  0 part &lt;br /&gt;
 ├─sdb3      8:19   1    11G  0 part &lt;br /&gt;
 ├─sdb4      8:20   1    11G  0 part &lt;br /&gt;
 ├─sdb5      8:21   1    11G  0 part &lt;br /&gt;
 ├─sdb6      8:22   1    11G  0 part &lt;br /&gt;
 └─sdb7      8:23   1   3.2G  0 part &lt;br /&gt;
&lt;br /&gt;
===== Build Archlinux Partition =====&lt;br /&gt;
Login as root, copy rootfs and bootfs to the partition. You need also to make some changes on some files.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop1p2 of=/dev/sdb2 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb2 /mnt/archlinuxsd/&lt;br /&gt;
 sudo scp -r /mnt/archlinux/boot/* /mnt/archlinuxsd/boot&lt;br /&gt;
 sudo mv /mnt/archlinuxsd/boot/boot.scr /mnt/archlinuxsd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=fd049b8e-615f-4efd-bc96-622c4d40e6cb	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 PARTLABEL=ALARM	/         	ext4      	rw,relatime	0 1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/archlinuxsd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/archlinuxsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL ALARM&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
===== Build Manjaro Partition =====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop2p2 of=/dev/sdb3 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb3 /mnt/manjarosd/&lt;br /&gt;
 sudo scp -r /mnt/manjaro/boot/* /mnt/manjarosd/boot&lt;br /&gt;
 sudo mv /mnt/manjarosd/boot/boot.scr /mnt/manjarosd/boot/boot.scrORIG&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # PARTUUID=362866dc-95cf-4069-9bb8-623aa3cdcb5d   /   ext4     defaults    0   1&lt;br /&gt;
 PARTLABEL=MANJARO   /   ext4     defaults    0   1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/manjarosd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/manjarosd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
 LABEL l0&lt;br /&gt;
 MENU LABEL MANJARO&lt;br /&gt;
 FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
 KERNEL /boot/Image&lt;br /&gt;
 INITRD /boot/initramfs-linux.img&lt;br /&gt;
 APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
===== Build Mobian Partition =====&lt;br /&gt;
&lt;br /&gt;
As for previous step proceed for next partition.&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop3p2 of=/dev/sdb4 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb4 /mnt/mobiansd/&lt;br /&gt;
 sudo scp -r /mnt/mobian/boot/* /mnt/mobiansd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/mobiansd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # UUID=31e45541-2b52-413a-9217-060082ce2ce8	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 # UUID=05106761-0b87-4729-a7f5-5a5a055c5e69	/boot	ext4	defaults,x-systemd.growfs	0	2&lt;br /&gt;
 PARTLABEL=MOBIAN	/	ext4	defaults,x-systemd.growfs	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 adjust ## /boot/extlinux/extlinux.conf file&lt;br /&gt;
  &amp;gt;MENU LABEL MOBIAN&lt;br /&gt;
  &amp;gt;linux /boot/vmlinuz-6.1-rockchip&lt;br /&gt;
  &amp;gt;initrd /boot/initrd.img-6.1-rockchip&lt;br /&gt;
  &amp;gt;fdtdir /boot/dtb-6.1-rockchip/&lt;br /&gt;
  &amp;gt;APPEND root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
===== Build PostmarketOS Partition =====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop4p2 of=/dev/sdb5 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb5 /mnt/postmarketossd/&lt;br /&gt;
 sudo scp -r /mnt/postmarketos/boot/* /mnt/postmarketossd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=11f02090-b971-4739-a68d-c6e633b371f9 / ext4 defaults 0 0&lt;br /&gt;
 #UUID=A84E-596C /boot fat32 defaults 0 0&lt;br /&gt;
 PARTLABEL=PMOS / ext4 defaults 0 0&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/postmarketossd/boot/extlinux&lt;br /&gt;
&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/postmarketossd/boot/extlinux/extlinux.conf&lt;br /&gt;
 ## /boot/extlinux/extlinux.conf&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 10&lt;br /&gt;
 label l0&lt;br /&gt;
	menu label PMOS&lt;br /&gt;
	linux /boot/vmlinuz&lt;br /&gt;
	initrd /boot/initrdfs&lt;br /&gt;
	fdtdir /boot/dtbs-pine64-pinephonepro/&lt;br /&gt;
 APPEND root=PARTLABEL=PMOS console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Build UbuntuTouch Partition =====&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/loop5p2 of=/dev/sdb6 bs=1M status=progress conv=fsync&lt;br /&gt;
 sudo mount /dev/sdb6 /mnt/ubuntutouchsd/&lt;br /&gt;
 sudo scp -r /mnt/ubuntutouch/boot/* /mnt/ubuntutouchsd/boot&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 #UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3	/	ext4	defaults	0	1&lt;br /&gt;
 #UUID=657dc3ea-dcfa-498b-a231-dbc29f6e1bfb	/boot	ext4	defaults	0	2&lt;br /&gt;
 PARTLABEL=UT	/	ext4	defaults	0	1&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ubuntutouchsd/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
 ##&lt;br /&gt;
 ## IMPORTANT WARNING&lt;br /&gt;
 ##&lt;br /&gt;
 ## The configuration of this file is generated automatically.&lt;br /&gt;
 ## Do not edit this file manually, use: u-boot-update&lt;br /&gt;
 default l0&lt;br /&gt;
 menu title U-Boot menu&lt;br /&gt;
 prompt 0&lt;br /&gt;
 timeout 50&lt;br /&gt;
 label l0&lt;br /&gt;
        menu label UT&lt;br /&gt;
        linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
        initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
        fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 APPEND root=PARTLABEL=UT console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
&lt;br /&gt;
 #label l0r&lt;br /&gt;
 #       menu label UT rescue&lt;br /&gt;
 #       linux /boot/vmlinuz-6.5.0-okpine&lt;br /&gt;
 #       initrd /boot/initrd.img-6.5.0-okpine&lt;br /&gt;
 #       fdtdir /boot/dtb-6.5.0-okpine/&lt;br /&gt;
 #       append root=UUID=dec2be75-3594-4078-b8c9-f3b215e6eac3 console=ttyS2,115200n8 consoleblank=0 loglevel=7 rw spl&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Unmount all /dev&lt;br /&gt;
 sudo umount /mnt/archlinuxsd /mnt/manjarosd /mnt/mobiansd /mnt/postmarketossd /mnt/ubuntutouchsd /mnt/*/boot /mnt/*/root&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Multi-Distro on eMMC ===&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
==== Flash Rk2Aw Loader to SPI ====&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
==== Build Multi-Distro eMMC ====&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
===== Mount the Images =====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Prepare eMMC =====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
===== Build Phosh Partition =====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
===== Build SXMO Partition =====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Follow-Up Comments ====&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=20654</id>
		<title>PinePhone Pro</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=20654"/>
		<updated>2023-09-09T20:23:23Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Reverted edits by Giorez (talk) to last revision by Fxc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinephone_double.png|400px|thumb|right|Rendering of the PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone Pro''' is PINE64's flagship smartphone announced on October 15, 2021. It features 4GB of RAM, an 128GB eMMC and is using an Rockchip RK3399S SoC, which is a specialized version of the RK3399 made specifically for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone Pro is PINE64’s second smartphone and a successor to the original PinePhone. It does not, however, replace the original PinePhone. It should also not be considered a second generation PinePhone; it is a higher-end device, with much better specs, aimed at those who wish to daily-drive a open system stack. Achieving this goal will, however, take time as the software and overall smartphone software ecosystem needs to mature.&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&amp;lt;sup&amp;gt;([[PinePhone Pro Software State|view separately]])&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:PinePhone Pro Software State}}&lt;br /&gt;
&lt;br /&gt;
=== Editions and revisions ===&lt;br /&gt;
Similarly to the original PinePhone, various PinePhone Pro editions are planned, the first of which is the Developer Edition (aimed at developers, as the name entails) followed by the Explorer Edition, which is aimed at early adopters.&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone Pro Developer Edition]]&lt;br /&gt;
* PinePhone Pro Explorer Edition&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this Wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time setup ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again. &lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot. Devices shipped after the end of July 2022 do only accept a nano-SIM, the SIM is inserted into a carriage released by slightly pulling on the handle in the lower slot (for information regarding devices shipped prior to end of July 2022 see below).&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the SIM card in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
{{Info|Information regarding devices shipped prior to end of July 2022: The PinePhone Pros shipped prior to the end of July 2022 come with a micro-SIM slot instead of a nano-SIM slot. Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. &amp;lt;br&amp;gt; If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The software section explains how to install the available software releases for the PinePhone Pro to the internal eMMC or a microSD card, how to boot them and how to solve common booting issues.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Pro Software Releases]] page has a complete list of currently supported phone-optimized operating system images that work with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
{{Info|Images of the regular PinePhone are not compatible with the PinePhone Pro.}}&lt;br /&gt;
&lt;br /&gt;
=== Boot order ===&lt;br /&gt;
&lt;br /&gt;
The RK3399S processor in the PinePhone Pro searches for the bootloader (such as ''U-Boot'' or ''Tow-Boot'') in the following order:&lt;br /&gt;
&lt;br /&gt;
# SPI flash&lt;br /&gt;
# eMMC (the internal memory)&lt;br /&gt;
# MicroSD card&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card temporarily ====&lt;br /&gt;
&lt;br /&gt;
To temporarily boot from an inserted '''microSD card''' do the following:&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while powering on the device. The batches bought after July 2022 come with ''Tow-Boot'' flashed to the SPI, which offers additional functionality over ''U-Boot'' as bootloader.&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the cover for a few seconds, while powering on the device. If the button is labeled ''RESET'' instead of ''RE'' please verify if the device is a regular [[PinePhone]] (or the Developer Edition). This is required because older batches don't ship with ''Tow-Boot'' on the SPI. Flashing ''Tow-Boot'' can be caught up by following [https://tow-boot.org/devices/pine64-pinephonePro.html this] instruction. Note: If ''Tow-Boot'' is flashed later, the microSD card can be selected at boot with the volume down key as well.&lt;br /&gt;
&lt;br /&gt;
* On the '''Developer Edition (sold to selected developers only)''' the SPI and the eMMC can be bypassed by shorting the bypass test points while booting. The process is explained in the article [[PinePhone Pro Developer Edition#Nuking the factory AOSP installation|PinePhone Pro Developer Edition]]. Please join the community chat for any questions regarding the process.&lt;br /&gt;
&lt;br /&gt;
The RE button disables the SPI and the eMMC at the hardware level while the button is held and the PinePhone Pro will try to boot from the next available boot medium, which is the microSD card. Note: When holding the ''RE'' button (or when shorting the contact points in case of the ''Developer Edition'') for a longer time at boot the operating system will not initialize the SPI and eMMC and it will not be possible to write to these storage mediums until the next reboot.&lt;br /&gt;
&lt;br /&gt;
{{Template:Info|The bootloader uses its own boot order for loading the kernel and other core operating system components at boot, which for example may result in the boot loader residing on the eMMC loading and booting the kernel from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
==== Boot from microSD card permanently ====&lt;br /&gt;
&lt;br /&gt;
The bootloader (such as ''U-Boot'') resides in the free space in front of the first partition. Wiping the bootloader from the eMMC to make the PinePhone Pro boot from microSD card can be done using &amp;lt;code&amp;gt;sudo dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/dev/mmcblk2 seek&amp;amp;#61;64 count&amp;amp;#61;400 conv&amp;amp;#61;fsync&amp;lt;/code&amp;gt;. Formatting the drive or deleting the partition table is not sufficient to wipe the bootloader.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
If you received your device after July of 2022, the bootloader (''Tow-Boot'') resides on the SPI. To boot to an SD card, place the SD card in your PinePhone Pro and turn it on. The phone will vibrate once. At this point, hold down the volume down button until you feel the device vibrate again then release the button. The LED color should change to blue and your display should remain black for a few seconds. In a few seconds you should see the SD card booting, the indications of which are dependent on what image you chose. If the LED is flashing instead, the boot from SD failed. Erasing the SPI can be achieved via the Tow-Boot installer image. Instructions are available here [https://tow-boot.org/devices/pine64-pinephonePro.html Tow-Boot PinePhone Pro Instructions].&lt;br /&gt;
&lt;br /&gt;
See [[RK3399 boot sequence]] for further details regarding the boot sequence.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The software releases can be installed (the process is being referred to as ''flashing'') to the eMMC or to an microSD card.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to microSD card ====&lt;br /&gt;
To install an image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download a compatible image from [[PinePhone Pro Software Releases]].&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Write the image to your microSD card using your favorite method, examples:&lt;br /&gt;
#* Using ''dd'': On the device you're flashing the microSD card from, find the correct device under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; and then flash the image to the microSD card using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;. Make sure the target is the whole microSD card and not its first partition (''sdc1'' or ''mmcblk0p1'' are wrong!).&lt;br /&gt;
#* Using ''bmaptool'': Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run bmaptool with the correct device: Download the ''IMAGE.xz'' and the ''IMAGE.bmap'' files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap '''IMAGE.bmap''' '''IMAGE.xz''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;. This takes around 2.5 minutes to flash a 4 GB file.&lt;br /&gt;
#* Using ''a graphical tool'': A graphical tool such as Gnome Disks under Linux or Etcher under Windows may also be used.&lt;br /&gt;
# Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore, see [[:File:Pinephone_slots.png|here]].&lt;br /&gt;
# Boot the device using the following method:&lt;br /&gt;
#* On the '''Explorer Edition ordered after July 2022''' hold the ''volume down key'' while booting.&lt;br /&gt;
#* On the '''Explorer Edition ordered between January and July 2022''' hold the ''RE'' button underneath the back cover while booting (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
#* On the '''Developer Edition (sold to selected developers only)''' apply the bypass by shorting the testing pads while booting according to the datasheet (or use the ''volume down key'' if you flashed ''Tow-Boot'').&lt;br /&gt;
&lt;br /&gt;
Details regarding the boot order can be found in the [[PinePhone Pro#Boot order|Boot order]] section.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to the eMMC ====&lt;br /&gt;
Flashing to the eMMC (the internal memory of the PinePhone Pro) can either be done using ''Tow-Boot'''s USB Mass Storage mode (see [[#Boot order]] if you are unsure if the device comes with Tow-Bot pre-installed) or by booting an operating system from the microSD card (see the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]) and by writing to the eMMC directly from there:&lt;br /&gt;
&lt;br /&gt;
By using Tow-Boot:&lt;br /&gt;
&lt;br /&gt;
# Power off the device&lt;br /&gt;
# Power on the device and hold the ''volume up'' key before and during the second vibration&lt;br /&gt;
# The LED will turn blue if done successfully. This will only work if Tow-Boot is installed&lt;br /&gt;
# When connecting the device to a computer via USB it will behave like an USB drive now&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;, the output might look like the following:&lt;br /&gt;
#: '''''mmcblk2'''      179:0    0 115.2G  0 disk''&lt;br /&gt;
#: ''├─mmcblk2p1  179:1    0   122M  0 part /boot''&lt;br /&gt;
#: ''└─mmcblk2p2  179:2    0 115.1G  0 part /''&lt;br /&gt;
#: {{Info|In this example, '''/dev/mmcblk2''' is the device, while ''mmcblk2p1'' and ''mmcblk2p2'' are partitions of the device. The downloaded images are images from full devices, which means that the full device (''mmcblk2'' in this example) needs to be flashed. Ignore the partitions!}}&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''DEVICE''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'' and replace ''DEVICE'' with the correct device from the ''lsblk'' command)&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
By booting a microSD card:&lt;br /&gt;
&lt;br /&gt;
# Boot an operating system [[PinePhone Pro#Flashing to microSD card|from the microSD card]]. If there is already a bootloader on the eMMC installed see the section [[PinePhone Pro#Boot order|Boot order]] to bypass it.&lt;br /&gt;
# Download or copy the desired image to the microSD card as file&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. If it doesn't appear in the output of the command, the eMMC wasn't initialized due to applying the above explained bypass method for a too long time during the boot&lt;br /&gt;
# '''Important:''' Typically the image will be compressed in an archive file to reduce the download size (such as ''.gz'' or ''.xz''). Extract the image from its archive file to get the file with the file extension ''.img''.&lt;br /&gt;
# Flash the image file using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/mmcblk2 bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt; (replace ''IMAGE.img'' with the filename of the image you want to flash and make sure it has the file extension ''.img'').&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone Pro is not booting (either booting incompletely into a boot splash or tty or if the PinePhone Pro is showing no signs of life) this will typically have the following two reasons:&lt;br /&gt;
&lt;br /&gt;
==== The battery is fully drained ====&lt;br /&gt;
&lt;br /&gt;
If the battery is drained then the board can reset during boot causing a boot loop because of undervoltage condition. It can happen on all stages of the boot including ''U-Boot'' bootloader, display initialization and USB (re-)configuration. In that case it is not possible to charge the phone. The battery can be charged by interrupting the boot loop by booting the PinePhone Pro into ''Maskrom mode'' or by charging the battery externally. It is possible to follow these instructions without a computer by using a wall charger, however it would not be possible to determine if Maskrom mode was started successfully. To boot the PinePhone Pro into ''Maskrom mode'':&lt;br /&gt;
&lt;br /&gt;
* Remove any microSD card from the phone and keep it removed for the below procedure&lt;br /&gt;
* Remove the battery, any USB cable and any serial cable&lt;br /&gt;
* Reinsert the battery&lt;br /&gt;
* Hold the ''RE'' button underneath the back cover of your ''Explorer Edition'' (or short the bypass contact points on the ''Developer Edition'') &lt;br /&gt;
{{Info|Confirm that the label of the button says ''RE'' and not ''RESET''! If the button label says ''RESET'' instead you probably have a regular PinePhone and you're reading the wrong page.}}&lt;br /&gt;
* Connect the phone to an USB port of a computer, while still holding the button for some time&lt;br /&gt;
* Confirm if the phone was booted in Maskrom mode:&lt;br /&gt;
** On ''Linux'' check if the Maskrom mode appears as device in the output of the terminal command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; on the computer, the expected ''VID:PID'' of the device is ''2207:330c''.&lt;br /&gt;
** On ''Windows'' this can be checked using the ''Device Manager'' and checking the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; of an ''Unknown device'' appears.&lt;br /&gt;
** On ''macOS'' this can be checked in ''/Applications/Utilities/System Information.app'' under ''USB'' and by checking if the VID &amp;quot;2207&amp;quot; and PID &amp;quot;330c&amp;quot; is appearing for a ''Composite Device''.&lt;br /&gt;
* Let the phone charge for multiple hours&lt;br /&gt;
&lt;br /&gt;
{{Info|If the device doesn't appear under ''lsusb'' please try again with a different known good USB-C cable and make sure that there is no microSD card in the phone inserted.}}&lt;br /&gt;
&lt;br /&gt;
The device should now be able to boot from the boot medium again. If that is not the case the installation got corrupted, as explained below.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted ====&lt;br /&gt;
The PinePhone Pro won't be able to boot if the installation on the SPI flash, the eMMC or the microSD card got corrupted. To boot a working operating system:&lt;br /&gt;
&lt;br /&gt;
* Prepare a microSD card as explained in the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]&lt;br /&gt;
* Remove any USB-C cable or device or add-on case from the PinePhone Pro&lt;br /&gt;
* Make sure the device is powered off by shortly removing the battery for a second&lt;br /&gt;
* Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore.&lt;br /&gt;
* Power on the device while bypassing the SPI and eMMC as explained under [[PinePhone Pro#Boot order|Boot order]]&lt;br /&gt;
&lt;br /&gt;
The device should now boot from the microSD card. If the phone does not boot from the microSD card the microSD card was flashed with an incompatible image or the battery got drained as explained above.&lt;br /&gt;
&lt;br /&gt;
=== Bootloaders ===&lt;br /&gt;
The following section contains notes regarding compatible bootloaders with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
==== U-Boot ====&lt;br /&gt;
The pre-installed operating system on the PinePhone Pro Explorer Edition, if sold prior to the end of July of 2022, is using [[U-Boot]] as default bootloader. Batches sold after July of 2022 are using ''Tow-Boot''&lt;br /&gt;
&lt;br /&gt;
==== Tow-Boot ====&lt;br /&gt;
Current batches of the PinePhone Pro ship with ''Tow-Boot'' pre-installed to the SPI flash, which is an opinionated distribution of ''U-Boot'' and brings numerous advantages over stock ''U-Boot'', such as the possibility to choose from booting the eMMC or microSD card using the volume buttons during boot, as well as a ''USB Mass Storage mode'', where the device can be written to by connecting the device to a computer via USB.&lt;br /&gt;
&lt;br /&gt;
The user can flash Tow-Boot to the PinePhone Pro using the [https://tow-boot.org/devices/pine64-pinephonePro.html instructions on the Tow-Boot website].&lt;br /&gt;
&lt;br /&gt;
==== levinboot ====&lt;br /&gt;
The levinboot bootloader is another option for the PinePhone Pro. The project repository can be found [https://gitlab.com/DeltaGem/levinboot/-/tree/master/ here]. (Pinephone Pro supporting fork is [https://xff.cz/git/levinboot/ here].)&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART¹ mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Note: The baud rate may be 1500000 instead of 115200.&lt;br /&gt;
&lt;br /&gt;
== Modem ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone uses Quectel EG25-G as modem. AT commands are used to communicate with the modem.&lt;br /&gt;
&lt;br /&gt;
=== AT commands ===&lt;br /&gt;
&lt;br /&gt;
A list of documented AT commands can be found for example in this [[:File:Quectel_EC2x&amp;amp;EG9x&amp;amp;EG2x-G&amp;amp;EM05_Series_AT_Commands_Manual_V2.0.pdf|AT commands documentation]] from Quectel. Further undocumented AT commands found by the developer megi, who reverse-engineered parts of the modem and its firmware, can be found on megi's website [http://xnux.eu/devices/feature/modem-pp-reveng.html#toc-un-der-documented-at-commands here].&lt;br /&gt;
&lt;br /&gt;
To send AT commands to the modem under Linux, &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; or the often-preinstalled &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt; utility can be used. &lt;br /&gt;
&lt;br /&gt;
''atinout'' example:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;AT+&amp;lt;command here&amp;gt;&amp;quot; | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
''minicom'' example:&lt;br /&gt;
&lt;br /&gt;
 minicom -D /dev/ttyUSB2&lt;br /&gt;
&lt;br /&gt;
=== VoLTE ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone and PinePhone Pro modem supports VoLTE and comes with a few VoLTE profiles preloaded. Most operating systems try to set the correct profile automatically.&lt;br /&gt;
&lt;br /&gt;
To list the available VoLTE profiles:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+QMBNCFG=&amp;quot;list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,0,1,1,&amp;quot;ROW_Generic_3GPP&amp;quot;,0x0501081F,201901141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,1,0,0,&amp;quot;VoLTE-ATT&amp;quot;,0x0501033C,201909271&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,2,0,0,&amp;quot;hVoLTE-Verizon&amp;quot;,0x05010141,201911251&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,3,0,0,&amp;quot;Sprint-VoLTE&amp;quot;,0x05010205,201908141&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,4,0,0,&amp;quot;Commercial-TMO_VoLTE&amp;quot;,0x05010505,201811231&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,5,0,0,&amp;quot;Telus-Commercial_VoLTE&amp;quot;,0x05800C43,201912031&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,6,0,0,&amp;quot;Commercial-SBM&amp;quot;,0x05011C18,201904021&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,7,0,0,&amp;quot;Commercial-DT&amp;quot;,0x05011F1C,201905311&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,8,0,0,&amp;quot;Reliance_OpnMkt&amp;quot;,0x05011B38,201910161&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,9,0,0,&amp;quot;TF_Germany_VoLTE&amp;quot;,0x05010C1B,201909201&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,10,0,0,&amp;quot;TF_Spain_VoLTE&amp;quot;,0x05010CFA,201909261&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,11,0,0,&amp;quot;Volte_OpenMkt-Commercial-CMCC&amp;quot;,0x05012071,201904281&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,12,0,0,&amp;quot;OpenMkt-Commercial-CT&amp;quot;,0x05011322,201911081&lt;br /&gt;
+QMBNCFG: &amp;quot;List&amp;quot;,13,0,0,&amp;quot;OpenMkt-Commercial-CU&amp;quot;,0x05011505,201807052&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To select a profile manually, select the best fitting one or a generic one if none fits:&lt;br /&gt;
&lt;br /&gt;
 AT+QMBNCFG=&amp;quot;select&amp;quot;,&amp;quot;ROW_Generic_3GPP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then enable Voice over LTE using:&lt;br /&gt;
&lt;br /&gt;
 AT+QCFG=&amp;quot;ims&amp;quot;,1&lt;br /&gt;
&lt;br /&gt;
And reboot the modem to apply the settings:&lt;br /&gt;
&lt;br /&gt;
 AT+CFUN=1,1&lt;br /&gt;
&lt;br /&gt;
To check the status of VoLTE during a call, the AT command &amp;lt;code&amp;gt;CLCC&amp;lt;/code&amp;gt; can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AT+CLCC&lt;br /&gt;
&lt;br /&gt;
+CLCC: 1,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
+CLCC: 2,1,0,1,0,&amp;quot;&amp;quot;,128&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the fourth item of the list, &amp;quot;0&amp;quot; means voice and and &amp;quot;1&amp;quot; means data. If both rows have &amp;quot;1&amp;quot; then the voice call is being carried over VoLTE.&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
The APN setting is only required for a public Internet connection (&amp;quot;data&amp;quot;) on the phone. For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
Detailed information about the modem can be found on the [https://xnux.eu/devices/feature/modem-pp.html#toc-modem-on-pinephone page of the developer megi], including reverse-engineered parts of the firmware and its functions. There is also a document about using the modem from January 18th 2020 by megi [https://megous.com/dl/tmp/modem.txt here]. A script at the end of the document showcases a way to power off the modem before powering off the phone, which is integrated into most of the available operating systems.&lt;br /&gt;
&lt;br /&gt;
=== Firmware update ===&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware and the stock firmware available for the PinePhone Pro. Both can be updated to a newer version with new features and bug fixes.&lt;br /&gt;
&lt;br /&gt;
==== Custom firmware ====&lt;br /&gt;
&lt;br /&gt;
There is a (nearly) free custom firmware for the PinePhone and PinePhone Pro modem by the developer ''biktorgj'', which can be found [https://github.com/the-modem-distro/pinephone_modem_sdk here].&lt;br /&gt;
&lt;br /&gt;
The custom firmware has various advantages (and zero disadvantages) over the stock firmware, including:&lt;br /&gt;
&lt;br /&gt;
* Signal tracking support with checks against the OpenCelliD database&lt;br /&gt;
* Persistent storage is optional and unexpected shutdowns don't mess up the modem&lt;br /&gt;
* A lower energy consumption due to the lower minimum clock frequency&lt;br /&gt;
* And many more, see [https://github.com/the-modem-distro/pinephone_modem_sdk#features-not-available-on-stock-firmware Features not available on stock firmware]&lt;br /&gt;
&lt;br /&gt;
The custom firmware can be flashed using [https://wiki.postmarketos.org/wiki/Fwupd#Upgrading_Modem_Firmware_on_the_PinePhone_.28Pro.29 fwupd] or a [https://github.com/the-modem-distro/pinephone_modem_sdk/blob/kirkstone/docs/FLASHING.md flashing script].&lt;br /&gt;
&lt;br /&gt;
==== Stock firmware ====&lt;br /&gt;
&lt;br /&gt;
{{Hint|The following instructions are directed towards professional users. It is highly recommend to make sure the update process is not interrupted to prevent the modem from bricking.}}&lt;br /&gt;
&lt;br /&gt;
The stock modem firmware can be updated to a newer version if it is outdated. The firmware version can be checked using the following AT command (at the example of &amp;lt;code&amp;gt;atinout&amp;lt;/code&amp;gt;, alternatively &amp;lt;code&amp;gt;minicom&amp;lt;/code&amp;gt; can be used to communicate with the modem too):&lt;br /&gt;
&lt;br /&gt;
 echo 'AT+QGMR' | sudo atinout - /dev/ttyUSB2 -&lt;br /&gt;
&lt;br /&gt;
'''Pre-update checklist:'''&lt;br /&gt;
&lt;br /&gt;
Please make sure all requirements of the checklist are fulfilled. If the update process is interrupted it will lead to a corrupted firmware of the modem, causing it to brick. Recovering a bricked modem is exponentially more complicated and requires the user to boot a special mode by physically bridging test points on the modem.&lt;br /&gt;
&lt;br /&gt;
* The battery needs to be charged sufficiently&lt;br /&gt;
* The phone needs to be plugged into a charger&lt;br /&gt;
* Deep sleep is recommended to be disabled as it can interrupt the update process&lt;br /&gt;
* It is recommended to close all other running applications&lt;br /&gt;
* Use common sense while doing the update, don't do the update while being impaired in any way&lt;br /&gt;
&lt;br /&gt;
To get the latest firmware, clone the repository of user Biktorgj on the phone:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Biktorgj/quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
After cloning the directory, open it with cd:&lt;br /&gt;
&lt;br /&gt;
 cd quectel_eg25_recovery&lt;br /&gt;
&lt;br /&gt;
Then run qfirehose, which starts the flashing process:&lt;br /&gt;
&lt;br /&gt;
 sudo ./qfirehose -f ./&lt;br /&gt;
&lt;br /&gt;
The modem will automatically reboot after the update process is done. The boot process takes around 30 to 60 seconds. After that it is highly recommended to reboot the device.&lt;br /&gt;
&lt;br /&gt;
=== Firmware modifications ===&lt;br /&gt;
&lt;br /&gt;
See [[PineModems]] for more information regarding modem bootloader unlocking, building a custom modem firmware and modem recovery.&lt;br /&gt;
&lt;br /&gt;
=== GPS / GNSS ===&lt;br /&gt;
&lt;br /&gt;
The GPS engine in the modem supports mutli-GNSS reception from GPS, GLONASS, BeiDou, Galileo and QZSS independent of a cellular connection. The operation of the GNSS subsystem can be controlled via a separate set of AT commands, or via qmi. The A-GPS data upload uses the file management AT commands, which also have their own manual. These are linked in the documentation section.&lt;br /&gt;
&lt;br /&gt;
As with most smartphones, the PinePhone Pro has a small antenna and has difficulty getting a first fix without assistance data, a cold start can take 15 minutes under good conditions. The ''eg25-mananger'' is configured to upload A-GPS data by default (see [https://gitlab.com/mobian1/eg25-manager/-/merge_requests/15 here]).&lt;br /&gt;
&lt;br /&gt;
Basic testing of GNSS reception can be done by using the AT command interface (''/dev/ttyUSB2'') from a terminal program like ''minicom'' and the data output interface (''/dev/ttyUSB1'') to feed NMEA data into gpsmon or some other program that can parse standard NMEA sentences.&lt;br /&gt;
&lt;br /&gt;
[[File:Gpsmon eg25g.png|400px|thumb|none|gpsmon decoding GPS data from ''/dev/ttyUSB1'']]&lt;br /&gt;
&lt;br /&gt;
To check if GNSS data output is enabled, you can&lt;br /&gt;
&lt;br /&gt;
 cat /dev/ttyUSB1&lt;br /&gt;
&lt;br /&gt;
this should display a stream of NMEA sentences&lt;br /&gt;
&lt;br /&gt;
 $GPVTG,,T,,M,,N,,K,N*2C&lt;br /&gt;
 $GPGSA,A,1,,,,,,,,,,,,,,,,*32&lt;br /&gt;
 $GPGGA,,,,,,0,,,,,,,,*66&lt;br /&gt;
&lt;br /&gt;
Further details can be found under [[PinePhone Sensors and Navigation]].&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
The operating systems of the PinePhone Pro may not have support for accessing your voicemail by holding down the 1-key. Carriers might support accessing the voice mail via an external number however.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.8 x 76.6 x 11.1mm&lt;br /&gt;
* '''Weight:''' Approx. 220g&lt;br /&gt;
* '''SIM Card:''' Nano-SIM (Micro-SIM before 07/2022)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 6 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' 1440 x 720 in-cell IPS with Gorilla Glass 4™&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' Rockchip RK3399S 64bit SoC – 2x A72 and 4x A53 CPU cores @ 1.5GHz&lt;br /&gt;
* '''RAM:''' 4GB LPDDR4 @ 800MHz&lt;br /&gt;
* '''Internal Storage:''' 128GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''NOR Flash:''' Listed as [GigaDevices] GD25LQ128EWIGR, but physical inspection found a SiliconKaiser SK25LP128.&lt;br /&gt;
* '''Back Camera:''' 13MP Sony IMX258 with Gorilla Glass 4™ protective layer, LED Flash&lt;br /&gt;
* '''Front Camera:''' 8MP, OmniVision OV8858 front-facing camera&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''Modem:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN &amp;amp; Bluetooth:''' Wi-Fi 802.11AC, hotspot capable + Bluetooth V5.0&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery; unglue bottom black plastic with your nail from Samsung battery before installation in order to match the dimensions)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Modifications and repairs ==&lt;br /&gt;
&lt;br /&gt;
Most parts are available from the [https://pine64.com/product-category/pinephonepro-spare-parts/ Pine store]. Take care to use this link to avoid unintentionally ordering parts for the original PinePhone instead.&lt;br /&gt;
&lt;br /&gt;
=== Replacing the mainboard ===&lt;br /&gt;
&lt;br /&gt;
The mainboard can be replaced if it is faulty. The replacement board does not have an operating system pre-installed, to test if everything is working after swapping the mainboard a flashed SD card is required.&lt;br /&gt;
&lt;br /&gt;
{{Hint|Replacement boards come with an empty eMMC, which means that trying to boot from them looks like the board is faulty (no LEDs, no screen, no reaction of the phone). Please boot an operating system from a microSD card.}}&lt;br /&gt;
&lt;br /&gt;
Prior to replacing your PinePhone Pro’s mainboard please read the steps outlined in bullet points below and watch the attached video.&lt;br /&gt;
&lt;br /&gt;
# You’ll need a small Phillips screwdriver and a prying tool to swap out the mainboard.&lt;br /&gt;
# Remove the phone's back cover. See your quick start guide for details.&lt;br /&gt;
# Remove the battery as well as any inserted SD and SIM cards.&lt;br /&gt;
# Unscrew all 15 Phillips head screws around the midframe of the phone, including the screw under the warranty sticker.&lt;br /&gt;
# Gently pry up the midframe using a guitar pick or credit card corner. It is easiest to separate the midframe at one of the bottom edges. Work your way around all the sides of the phone until the midframe separates from the phone’s body.&lt;br /&gt;
# Detach all ribbon cables and “Lego” connectors. List of things to detach: 1) two “Lego” connects at the bottom of the mainboard. 2) u.FL antenna connect and touchscreen digitizer on PCD left side. 3) LCD ribbon cable top of mainboard, next to audio and UART jack.&lt;br /&gt;
# Pry the mainboard up gently from the left-hand side.&lt;br /&gt;
# Remove front and main cameras and reset them into the new mainboard.&lt;br /&gt;
# Place the new mainboard in the chassis, hooking in on the plastic tabs on left side and pressing down firmly on opposite side, and follow the steps (7-2) in reverse. When reattaching the midframe take care that no cables are out of place or trapped, as they may be damaged when tightening screws.&lt;br /&gt;
&lt;br /&gt;
After swapping the mainboard the phone won't boot as there is no OS on the replacement board's eMMC preinstalled. To boot an OS insert a flashed SD card.&lt;br /&gt;
&lt;br /&gt;
A video tutorial by &amp;lt;i&amp;gt;Martijn Braam&amp;lt;/i&amp;gt; for the regular PinePhone can be found [https://www.youtube.com/watch?v=5GbMoZ_zuZs here] or alternatively a video tutorial by user &amp;lt;i&amp;gt;brigadan&amp;lt;/i&amp;gt; with additional notes about the camera swap and proximity sensor isolator [https://www.youtube.com/watch?v=J3AJEF7akkw here].&lt;br /&gt;
&lt;br /&gt;
=== Replacing the screen ===&lt;br /&gt;
&lt;br /&gt;
Before attempting to replace the screen be sure to review the section on [[#Replacing the mainboard|replacing the mainboard]] since that will get you most of the way there. Be aware that the replacement screen is actually the entire front frame of the phone and there are components that will need to be swapped from your old screen.&lt;br /&gt;
&lt;br /&gt;
* Make sure you have a precision screwdriver set that has the correct size Philips tip. The screws are very small and the heads can easily be stripped if the screwdriver is not correct - if you feel your screwdriver slipping, stop what you are doing and try one that is a better fit. A magnetized screwdriver will help in not losing screws, as will a magnetic parts holder to keep them in while working.&lt;br /&gt;
* There are a number of components and cables as well as the insulator sheet under the battery that are glued in place. A hair dryer will loosen the glue and make them much easier to remove. You may want to order extra cables along with the screen just in case.&lt;br /&gt;
* The vibration motor, which is part of the USB-C board assembly and glued into place, will come apart easily and be damaged if you pry it up in the wrong place. Make sure you pry from underneath the complete part, not midway on its housing. The ribbon cable attaching this to the USB-C board is small, thin, and fragile so be careful with that as well.&lt;br /&gt;
* The new screen comes with new side switches and insulator sheet but there are a number of parts that need to be transferred from the old screen, like the thin coax cable running up the side, the phone ear speaker, proximity sensor gasket, and a silver-colored mesh glued in place that needs to be transferred to a flexible circuit included on the new screen. If you don't swap over the proximity sensor rubber gasket the screen will immediately turn off after logging in. Be careful when routing the coax cable that it goes around the screw holes or you may drive a screw right through the cable.&lt;br /&gt;
&lt;br /&gt;
Take your time, use the right tools, be careful and you should be rewarded with success.&lt;br /&gt;
&lt;br /&gt;
=== Spare parts not available in the Pine Store ===&lt;br /&gt;
&lt;br /&gt;
The following parts are not available on the Pine Store for the '''regular PinePhone'''. The replacements are listed below and have not been validated for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
* Earpiece: See [[PinePhone (Pro) replacement earpieces]]&lt;br /&gt;
* Loudspeaker dimensions: 15x11x3 mm. Compatible with Nokia N91, Lenovo A536 (requires soldering) and others, see [https://forum.pine64.org/showthread.php?tid=12046&amp;amp;pid=85698#pid85698 here]&lt;br /&gt;
* Proximity sensor rubber isolator&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Himax HX8394 compatible&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| IMX258&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| OV8858&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| AW3641EDNR&lt;br /&gt;
|-&lt;br /&gt;
| WiFi + Bluetooth&lt;br /&gt;
| [https://www.azurewave.com/img/wireless-modules/AW_CM256SM_DS_Rev15_CYW.pdf AzureWave AW-CM256SM]&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;s&amp;gt;3 Axis Magnetometer&amp;lt;/s&amp;gt;&lt;br /&gt;
| &amp;lt;s&amp;gt;[https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL]&amp;lt;/s&amp;gt; '''''Note:''''' The ''AF8133J'' is used instead.&lt;br /&gt;
|-&lt;br /&gt;
| Geo Magnetic Sensor&lt;br /&gt;
| [http://www.voltafield.com/products01.html Voltafield AF8133J]&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| STK3311-A&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| [https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6500/ TDK MPU-6500]&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec&lt;br /&gt;
| ALC5616 and ALC5640&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| [https://rockchip.fr/RK818%20datasheet%20V1.0.pdf RK818]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro mainboard schematic:&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf PinePhone Pro mainboard Explorer Edition Released Schematic ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-top.pdf PinePhone Pro mainboard Explorer Edition component top placement ver 1.0 20211127]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-bottom.pdf PinePhone Pro mainboard Explorer Edition component bottom placement ver 1.0 20211127]&lt;br /&gt;
&lt;br /&gt;
PinePhone Pro USB-C small board schematic:&lt;br /&gt;
* TBD&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20FCC%20Certificate-S21101902805001.pdf PinePhone Pro FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20SAR%20Evaluation%20Report-S21101902806001.pdf PinePhone Pro SAR Evaluation Report]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhone%20Pro%20CE%20RED%20Certificate-S21101902802-R1.pdf PinePhone Pro CE RED Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/PinePhonePro%20RoHS%20Test%20Report.pdf PinePhone Pro ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Factory Test Build for Hardware Checking ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-5.jpg|400px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by the support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, take out the PinePhone Pro Explorer Edition, then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press the RE button (bypass SPI and eMMC boot) underneath the back cover while plugging in the USB-C power. After 3 seconds release the RE button. &lt;br /&gt;
* When powering up, a battery icon screen will show up blow, press power key for two seconds, then the Rockchip logo screen shows up.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]][[File:PPP_Abdroid_Test_Utility-2.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Wait for the home screen, double tap on the test app icon (mark red circuit) and this will bring up the factory test screen. Please note that the SD test is disabled due in this is SD boot build.&lt;br /&gt;
* After running a particular test function, please snapshot the test result and pass it back to support team&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Please insert a functional SIM card when performing the SIM test&lt;br /&gt;
* When perform GPS test, the first result may fail and please ignore this false message.&lt;br /&gt;
* For light sensing test, please have a light shine to the PinePhone Pro when performing the test.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-4.jpg|300px]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Factory Test Build for Battery charging ==&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px|right]]&lt;br /&gt;
&lt;br /&gt;
Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download] from ''pine64.org'' (722MB, for 8GB microSD cards or bigger, MD5 of the GZip file ''214e063c8205c1a98d44b2015a21bb5d'')&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and battery will start charging. &lt;br /&gt;
* The battery icon display for few seconds and then LCD panel turn off while charging. To check charging status, just quick press power button (about 0.5 second) and battery icon will display progress.&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone Pro you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/pinephonepro/ Product Page]&lt;br /&gt;
* [https://www.youtube.com/watch?v=wP2-6Z74W44 Announcement video]&lt;br /&gt;
* [https://www.pine64.org/2021/10/15/october-update-introducing-the-pinephone-pro/ Blog post] with the announcement&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]][[Category:Rockchip RK3399]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:Thomzane/Woodpecker&amp;diff=20616</id>
		<title>User:Thomzane/Woodpecker</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:Thomzane/Woodpecker&amp;diff=20616"/>
		<updated>2023-09-05T20:35:04Z</updated>

		<summary type="html">&lt;p&gt;Fxc: +templ&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Woodpecker''' Edition Serial Console is powered by the CH340G chipset enabled simple USB to Serial communication for PINE64 related project development.&lt;br /&gt;
&lt;br /&gt;
The S1 jumper can be set to 5V or 3.3V.&lt;br /&gt;
&lt;br /&gt;
[https://pine64.com/product/serial-console-woodpecker-edition/ PINE64 store page]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Main_Page&amp;diff=20615</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Main_Page&amp;diff=20615"/>
		<updated>2023-09-05T20:34:05Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Undo revision 20608 by Thomzane (talk). Draft article. Link once ready. Please let the mods edit the main page instead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PINE64 is a community-driven company focused on creating high-quality, low-cost ARM devices and, more recently, RISC-V devices for individuals and businesses around the globe. PINE64 made its debut with the [[PINE A64|PINE A64]] single-board computer, which successfully launched on Kickstarter in 2015. PINE64 has since released a multitude of other devices, including both development boards and end-user devices.&lt;br /&gt;
&lt;br /&gt;
PINE64 has a large, diverse and active community, and offers a variety of resources for hobbyists and businesses to successfully leverage various PINE64 products. To become connected and involved with the community, please see [[Main Page#Community and Support|Community and Support]] for a list of available channels and chat platforms. To learn more about PINE64, please visit the [https://www.pine64.org/ PINE64 website] and the [https://www.pine64.com/ PINE64 store]'''.&lt;br /&gt;
&lt;br /&gt;
For information about PINE64 branding, including the usage of the PINE64 logo in non-commercial and other applications, please read the [[PINE64 brand and logo|article about our brand and logo]].&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
[[File:Marchupdate-1024x594.jpg|thumb|upright=1.2|[[Pinebook Pro]] (left) and [[PinePhone]] (right)]]&lt;br /&gt;
&lt;br /&gt;
You can learn more about the following devices manufactured by PINE64:&lt;br /&gt;
&lt;br /&gt;
* Phones: '''[[PinePhone]]''' and '''[[PinePhone Pro]]'''&lt;br /&gt;
* Phone accessories: '''[[PinePhone (Pro) Add-ons]]''' and '''[[PinePhone (Pro) Keyboard]]'''&lt;br /&gt;
* Tablets: '''[[PineTab]]''', '''[[PineTab2]]''', '''[[PineTab-V]]''' and '''[[PineNote]]'''&lt;br /&gt;
* Wearable: '''[[PineBuds Pro]]''', '''[[PineTime]]'''&lt;br /&gt;
* Laptops: '''[[Pinebook]]''' and '''[[Pinebook Pro]]'''&lt;br /&gt;
* Laptop accessories: '''[[Pinebook Pro Dock|Pinebook Pro Docking station]]'''&lt;br /&gt;
* Single-board computers: '''[[Ox64]]''', '''[[STAR64]]''', '''[[Quartz64]]''', '''[[QuartzPro64_Development|QuartzPro64]]''', '''[[ROCKPro64]]''', '''[[ROCK64]]''', '''[[PINE A64]]''', '''[[PINE A64-LTS]]''', '''[[PINE H64 Model A]]''' and '''[[PINE H64|PINE H64 Model B]]'''&lt;br /&gt;
* Set-top box: '''[[RockBox]]'''&lt;br /&gt;
* Clusters and modules: '''[[Clusterboard]]''', '''[[SOPINE]]''', '''[[SOPINE Baseboard]]''', '''[[SOEDGE]]''', '''[[SOEDGE Baseboard]]''', and '''[[SOQuartz]]'''&lt;br /&gt;
* IP camera: '''[[PineCube]]'''&lt;br /&gt;
* Power adapter: '''[[PinePower]]'''&lt;br /&gt;
* Soldering iron: '''[[Pinecil]]'''&lt;br /&gt;
* Makerspace: '''[[PineCone]]''' and '''[[Pinedio]]'''&lt;br /&gt;
&lt;br /&gt;
== Community and Support ==&lt;br /&gt;
&lt;br /&gt;
Community collaboration and support is focused around the chat platforms and forums described below. See [https://www.pine64.org/gettings-started/ Getting Started | PINE64] for tips about how to get started with the PINE64 community.&lt;br /&gt;
&lt;br /&gt;
=== Chat Platforms ===&lt;br /&gt;
&lt;br /&gt;
PINE64 has a large and very active community. Community discussion takes place on a variety of chat platforms, which are all bridged together so the messages sent via one platform are sent to all other platforms automatically. The other networks and their users are represented by P64ProtocolBot.&lt;br /&gt;
&lt;br /&gt;
{{hint|PINE64 community is not some always responding, restless commercial customer service, or some sort of almighty existence that can resolve all your problems. When participating in community discussions, please be patient and do not expect questions to be answered immediately, certainly, or currently.&lt;br /&gt;
* The activity of community members varies depending on the time of day and the number of active users.&lt;br /&gt;
* Whether your questions will be answered &amp;amp; whether the answers are right and definitive, depends on the information you provide, and, after all, difficulty of your questions &amp;amp; community members' ability.&lt;br /&gt;
* Read [http://www.catb.org/~esr/faqs/smart-questions.html How To Ask Questions The Smart Way] to learn more.&lt;br /&gt;
* Please read [[PINE64 Community Rules and Code of Conduct]].&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* PINE64 uses a bridge bot (''[https://github.com/42wim/matterbridge matterbridge]'' with some modifications), which allows Discord, IRC, Matrix, and Telegram users to see and participate in the community chat.&lt;br /&gt;
* The bot name is &amp;quot;Pine64 Protocol Droid&amp;quot; and if you see this, look in the message to see the actual author of the message.&lt;br /&gt;
* When the bot relays messages it will show the platform the user is using: ''[D]'' for ''Discord'', ''[I]'' for ''IRC'', ''[M]'' for ''Matrix'' and ''[T]'' for ''Telegram''.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The community chat platforms are the following:&lt;br /&gt;
&lt;br /&gt;
* '''Discord''': use this '''[https://discord.gg/pine64 Invite Link]'''. All PINE64 discord channels are immediately viewable, do not need to join separate channels like the Telegram/Matrix table below.&lt;br /&gt;
* '''IRC''': the server is &amp;lt;i&amp;gt;irc.pine64.org&amp;lt;/i&amp;gt;. Use &amp;lt;code&amp;gt;/list&amp;lt;/code&amp;gt; command or the table below to see the full list of channels.&lt;br /&gt;
* '''Matrix and Telegram''': See the table below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Channel !! Matrix !! Telegram !! IRC&lt;br /&gt;
|-&lt;br /&gt;
| PINE64 News&lt;br /&gt;
| [https://matrix.to/#/#pine64-announcements:matrix.org #pine64-announcements:matrix.org]&lt;br /&gt;
| [https://t.me/PINE64_News @PINE64_News]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| General PINE64 chat&lt;br /&gt;
| [https://matrix.to/#/#pine64:matrix.org #pine64:matrix.org]&lt;br /&gt;
| [https://t.me/mtrx_pine64 @mtrx_pine64]&lt;br /&gt;
| #pine64&lt;br /&gt;
|-&lt;br /&gt;
| PINE A64(+), A64-LTS &amp;amp; SOPine&lt;br /&gt;
| [https://matrix.to/#/#pine64sopine:matrix.org #pine64sopine:matrix.org]&lt;br /&gt;
| [https://t.me/pine64sopine @pine64sopine]&lt;br /&gt;
| #lts-sopine&lt;br /&gt;
|-&lt;br /&gt;
| ROCK64 / ROCKPro64&lt;br /&gt;
| [https://matrix.to/#/#rock64:matrix.org #rock64:matrix.org]&lt;br /&gt;
| [https://t.me/mtrx_rock64 @mtrx_rock64]&lt;br /&gt;
| #rock64&lt;br /&gt;
|-&lt;br /&gt;
| Quartz64&lt;br /&gt;
| [https://matrix.to/#/#quartz64:matrix.org #quartz64:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Vq50DXkH31e0_i-f Quartz64]&lt;br /&gt;
| #quartz64&lt;br /&gt;
|-&lt;br /&gt;
| Quartz64 Development&lt;br /&gt;
| [https://matrix.to/#/#quartz64-dev:matrix.org #quartz64-dev:matrix.org]&lt;br /&gt;
| [https://t.me/q64dev @q64dev]&lt;br /&gt;
| #quartz-dev&lt;br /&gt;
|-&lt;br /&gt;
| Star64&lt;br /&gt;
| [https://matrix.to/#/#star64:matrix.org #star64:matrix.org]&lt;br /&gt;
| [https://t.me/star64_sbc @star64-sbc]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinebook and Pinebook Pro&lt;br /&gt;
| [https://matrix.to/#/#pinebook:matrix.org #pinebook:matrix.org]&lt;br /&gt;
| [https://t.me/mtx_pinebook @mtx_pinebook]&lt;br /&gt;
| #pinebook&lt;br /&gt;
|-&lt;br /&gt;
| PinePhone&lt;br /&gt;
| [https://matrix.to/#/#pinephone:matrix.org #pinephone:matrix.org]&lt;br /&gt;
| [https://t.me/pinephone @pinephone]&lt;br /&gt;
| #pinephone&lt;br /&gt;
|-&lt;br /&gt;
| PineNote&lt;br /&gt;
| [https://matrix.to/#/#pinenote:matrix.org #pinenote:matrix.org]&lt;br /&gt;
| [https://t.me/pinenote @PineNote]&lt;br /&gt;
| #pinenote&lt;br /&gt;
|-&lt;br /&gt;
| PineTab&lt;br /&gt;
| [https://matrix.to/#/#pinetab64:matrix.org #pinetab64:matrix.org]&lt;br /&gt;
| [https://t.me/PineTab @PineTab]&lt;br /&gt;
| #pinetab&lt;br /&gt;
|-&lt;br /&gt;
| PineTime&lt;br /&gt;
| [https://matrix.to/#/#pinetime:matrix.org #pinetime:matrix.org]&lt;br /&gt;
| [https://t.me/pinetime @pinetime]&lt;br /&gt;
| #Pinetime&lt;br /&gt;
|-&lt;br /&gt;
| PineTime Development&lt;br /&gt;
| [https://matrix.to/#/#pinetime-dev:matrix.org #pinetime-dev:matrix.org]&lt;br /&gt;
| [https://t.me/pinetime_dev @pinetime_dev]&lt;br /&gt;
| #pinetime-dev&lt;br /&gt;
|-&lt;br /&gt;
| PineBuds Pro&lt;br /&gt;
| [https://matrix.to/#/#pinebuds:matrix.org #pinebuds:matrix.org]&lt;br /&gt;
| [https://t.me/+nJVhM0mZ9KhlYmZl @pinebuds]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinecil&lt;br /&gt;
| [https://matrix.to/#/#pinecil:matrix.org #pinecil:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Kmi2S1iej-_4DgrVf3jjnQ Pinecil]&lt;br /&gt;
| #pinecil&lt;br /&gt;
|-&lt;br /&gt;
| Pinecil Development&lt;br /&gt;
| [https://matrix.to/#/#pinecil-dev:matrix.org #pinecil-dev:matrix.org]&lt;br /&gt;
| [https://t.me/+8_pdKqXrVuQ4OTk1 Pinecil-dev]&lt;br /&gt;
| Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| Pinetalk Podcast || Unavailable || Unavailable || Unavailable&lt;br /&gt;
|-&lt;br /&gt;
| PineCube&lt;br /&gt;
| [https://matrix.to/#/#cube64:matrix.org #cube64:matrix.org]&lt;br /&gt;
| [https://t.me/pinecube @pinecube]&lt;br /&gt;
| #cube&lt;br /&gt;
|-&lt;br /&gt;
| Nutcracker, Ox64&lt;br /&gt;
| [https://matrix.to/#/#pine64-nutcracker:matrix.org #pine64-nutcracker:matrix.org]&lt;br /&gt;
| [https://t.me/joinchat/Kmi2S0nOsT240emHk-aO6g Nutcracker]&lt;br /&gt;
| #nutcracker&lt;br /&gt;
|-&lt;br /&gt;
| LoRa&lt;br /&gt;
| [https://matrix.to/#/#pinelora:matrix.org #pinelora:matrix.org]&lt;br /&gt;
| [https://t.me/pine64lora @pine64lora]&lt;br /&gt;
| #lora&lt;br /&gt;
|-&lt;br /&gt;
| Off-topic&lt;br /&gt;
| [https://matrix.to/#/#offtopic64:matrix.org #offtopic64:matrix.org]&lt;br /&gt;
| [https://t.me/pine64offtopic @pine64offtopic]&lt;br /&gt;
| #Offtopic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also an unofficial Matrix Space at [https://matrix.to/#/#pine64-space:matrix.org #pine64-space:matrix.org] for supported clients that organizes all of the above matrix channels into one place.&lt;br /&gt;
&lt;br /&gt;
=== Forums ===&lt;br /&gt;
&lt;br /&gt;
PINE64 runs an official forum powered by the open-source forum server software ''MyBB''. The forum can be used to report issues, help out other users, offer findings and new information and more. Users can also engage directly with the community and the developers of partner projects, as well as with the PINE64 members.&lt;br /&gt;
&lt;br /&gt;
The official PINE64 forum can be accessed here:&lt;br /&gt;
* [https://forum.pine64.org/ Official PINE64 Forum]&lt;br /&gt;
&lt;br /&gt;
Also, these are the official Subreddits:&lt;br /&gt;
&lt;br /&gt;
* [https://www.reddit.com/r/PINE64official/ Official PINE64 Reddit]&lt;br /&gt;
* [https://www.reddit.com/r/PinePhoneOfficial/ Official PinePhone Reddit]&lt;br /&gt;
&lt;br /&gt;
== Helpful Information for Beginners ==&lt;br /&gt;
&lt;br /&gt;
* '''[[Getting started]]''': Basic information on setting up and handling PINE64 devices, such as how to write (flash) OS images to microSD cards and eMMC modules&lt;br /&gt;
* '''[[How to Contribute]]''': Information about how to contribute to different partner projects&lt;br /&gt;
* '''[[Where to Report Bugs]]''': Information about how to report bugs&lt;br /&gt;
* '''[[Project]]''': A variety of well documented PINE64 projects to serve as inspiration&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=20599</id>
		<title>PinePhone (Pro) Keyboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=20599"/>
		<updated>2023-08-31T14:50:16Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Safety */ Added sentence&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PP_KB_Front-1024x576.jpg|400px|thumb|right|Picture of the PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone (Pro) Keyboard Case''' is a case compatible with the [[PinePhone]] and [[PinePhone Pro]], adding a keyboard functionality to the phone. It features a clam-shell design and uses the pogo pins located on the smartphone’s midsection and attaches by replacing the default back cover. This add-on effectively turns the PinePhone (Pro) into a PDA with an in-built LTE modem.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
[[File:Ppkb_description.png|thumb|upright=1.2|&lt;br /&gt;
① Contact pads&amp;lt;br&amp;gt;&lt;br /&gt;
② Battery switch&amp;lt;br&amp;gt;&lt;br /&gt;
③ USB-C connector]]&lt;br /&gt;
&lt;br /&gt;
The keyboard case works with both the PinePhone and PinePhone Pro and features a clam-shell design. It uses pogo pins located on the phone’s midsection and attaches by replacing the default back cover. When folded, the phone’s screen and the keyboard rest securely against each other. The hinge features a 180° design, which not only allows for two-hand typing on a surface but also for comfortable thumb-typing when fully extended. The etched keycaps can be easily relocated for alternate layouts such as AZERTY or QWERTZ. The keyboard case runs an [https://xff.cz/git/pinephone-keyboard/ open firmware], which means that anyone with the know-how can alter existing functions or add new ones. The bottom (keyboard) and top (phone) sections of the assembly are well-balanced thanks to the large, 6000mAh, internal battery capable of charging the PinePhone (Pro) during operation. The internal battery effectively triples the phone’s battery life. The internal keyboard battery can be manually toggled on/off and the keyboard’s battery charge level can be read in the supported operating systems; the keyboard remains functional with the battery fully depleted.&lt;br /&gt;
&lt;br /&gt;
You do not lose access to the PinePhone (Pro)’s USB-C port, speaker, microphone, or any external features, such as volume and lock buttons, with the keyboard attached. There is also a cut-out for the camera, torch, and headphone jack. The USB-C port on the keyboard is capable of powering both the keyboard and PinePhone (Pro) simultaneously. This means that you can plug in a USB-C charger into the keyboard to charge the keyboard's internal battery, while the PinePhone (Pro) is charging via the internal connection between phone and keyboard.&lt;br /&gt;
&lt;br /&gt;
{{warning|Do not plug in a charger into the keyboard and the phone at the same time. Using the USB-C port of the PinePhone (Pro) while a charger to is connected to the USB-C port of the keyboard is also discouraged for the same reason. Technical details regarding the issue can be found in the blog post of the developer ''megi'' [http://xnux.eu/log/072.html here], in [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post and the [[PinePhone (Pro) Keyboard#Safety|safety]] section.}}&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that the keyboard case transforms the PinePhone (Pro) into a PDA, which means that taking calls will likely prove awkward without a wired or wireless headset connected (try speakerphone button if available).&lt;br /&gt;
&lt;br /&gt;
=== Mounting the keyboard ===&lt;br /&gt;
Power off your PinePhone and remove the back case. To remove the back case of the PinePhone use your fingernail or another soft object to pry up the back case. A notch to easily remove the cover is located at the bottom left of the PinePhone with the backcover facing the user. &lt;br /&gt;
&lt;br /&gt;
Open and place the keyboard flat on a hard surface with the hinge fully extended. Proceed to insert the PinePhone into the keyboard at an angle of approx. 15 degrees. Make sure that the PinePhone’s pogo pins and the corresponding pads ① on the keyboard are aligned. The leading edge with volume and power buttons should make contact first. Firmly press the PinePhone into place. Multiple clicks should be heard as the two snap into place. Pay special attention to the plastic pin below the camera hole. Firmly push from the rear, below the camera hole, to click it into position. Failing to do so may cause an insufficient pin contact and prevent the case from charging the phone.&lt;br /&gt;
&lt;br /&gt;
The PinePhone can be removed from the keyboard easily using a notch similar to the one found on the back case. The notch is located at the bottom of the leading edge with the power and volume buttons.&lt;br /&gt;
&lt;br /&gt;
=== Operation ===&lt;br /&gt;
The keyboard will function automatically once a PinePhone running a compatible operating system is mounted. For alterations to physical layout and firmware see the relevant sections respectively.&lt;br /&gt;
&lt;br /&gt;
The keyboard features an in-built 6000mAh battery. The battery can be turned ON/OFF using the button on the right leading edge of the keyboard ②. A short button press activates the internal battery while a long (15 seconds) press or double press deactivates it. Compatible operating systems display both the PinePhone’s and keyboard’s battery status together.&lt;br /&gt;
&lt;br /&gt;
You should charge the PinePhone and the keyboard &amp;lt;u&amp;gt;only&amp;lt;/u&amp;gt; using the USB-C ③ port on the keyboard. The keyboard’s USB-C port cannot be used for peripherals. The PinePhone’s USB-C port remains operational when mounted in the keyboard and can be used for data and peripherals.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
There are multiple possible hardware issues users could face. It is recommend to check the following most common hardware issues and their solutions and workarounds.&lt;br /&gt;
&lt;br /&gt;
==== Pogo pins not making proper contact ====&lt;br /&gt;
Under certain scenarios the keyboard's contacts are not making proper contact with the pogo pins of the phone. To address the issue:&lt;br /&gt;
&lt;br /&gt;
* Power down the phone!&lt;br /&gt;
* Apply '''slight''' pressure in the upper mid of the PinePhone's backside until the plastic holder pin towards the upper middle of the keyboard cover, until an audible click can be heard.&lt;br /&gt;
* Make sure the contacts and pogo pins are clean and the pogo pins can be slightly pressed individually.&lt;br /&gt;
* If the above does not work, a shim under the keyboard's contacts might be required, as explained [https://xnux.eu/pinephone-keyboard/faq.html#ts FAQ troubleshooting section]. See also this [https://freiburg.social/system/media_attachments/files/107/684/243/421/870/279/original/a5e9c68ff3510ec8.jpeg photo of where to place the shim], or [https://www.youtube.com/watch?v=4ixPjz6SPIA this video].&lt;br /&gt;
&lt;br /&gt;
==== Top row is less responsive ====&lt;br /&gt;
The keys of the top row may be less responsive. The issue can be worked around by adding inserts to the underside of the top row key caps to decrease the travel distance. More details regarding the workaround can be found in the corresponding section of the FAQ page of the developer megi: https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
==== Software issues ====&lt;br /&gt;
For any software issue please see the [[PinePhone (Pro) Keyboard#Software support|Software support section]] and the [[PinePhone (Pro) Keyboard#Frequently asked questions|FAQ section]].&lt;br /&gt;
&lt;br /&gt;
== Safety ==&lt;br /&gt;
&lt;br /&gt;
Do not plug in a charger into the keyboard and the phone at the same time. Doing so may result in damage or loss of the keyboard charging functionality. Using the USB-C port of the PinePhone (Pro) while a charger to is connected to the USB-C port of the keyboard is also discouraged for the same reason. Technical details regarding the issue can be found in the blog post of the developer ''megi'' [http://xnux.eu/log/072.html here] and [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post.&lt;br /&gt;
&lt;br /&gt;
Please note: Only use mild isopropyl alcohol when wiping down the clamshell of the device. Stronger solutions may partially strip the coatings. Do not lube the keyboard with GPL 205G0 switch grease, it can cause problems with the key responsiveness and tactility.&lt;br /&gt;
&lt;br /&gt;
== Software support ==&lt;br /&gt;
&lt;br /&gt;
=== Kernel-space driver ===&lt;br /&gt;
&lt;br /&gt;
Kernel driver implementation from Samuel Holland: CONFIG_IP5XXX_POWER (module ip5xxx_power) and CONFIG_KEYBOARD_PINEPHONE (module pinephone_keyboard) https://github.com/smaeul/linux/commits/wip/pp-keyboard&lt;br /&gt;
&lt;br /&gt;
Note: If you've upgraded to &amp;gt;=5.18, don't forget to upgrade the dtb as kb151 now appears to be a stub.&lt;br /&gt;
&lt;br /&gt;
=== User-space driver ===&lt;br /&gt;
The user-space driver is available [https://xff.cz/git/pinephone-keyboard/ here]. Use git to clone the repository. You're going to need sdcc 4.1+ installed to build it, so use your package manager to install that first. Next you'll cd into the directory you cloned pinephone-keyboard and use the command &amp;quot;make&amp;quot; to build. After the build is completed, cd into the build directory and you'll notice several new files starting with ppkb-. To use your keyboard case, you'll want to run the following command: &amp;lt;code&amp;gt;sudo ./ppkb-i2c-inputd&amp;lt;/code&amp;gt; &amp;lt;!-- this isn't running as a daemon, if anyone knows how to make it do so please edit that info in! --&amp;gt; Open something you can type into like a new terminal window or text editor and you should now be able to use the keyboard case! &lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Virtual keyboards such as &amp;lt;i&amp;gt;squeekboard&amp;lt;/i&amp;gt; are opening whenever a text field is selected.&lt;br /&gt;
&lt;br /&gt;
To disable this behavior under Linux running '''Phosh''' you can change the corresponding settings under ''Settings'' &amp;gt; ''Accessibility'' &amp;gt; ''Screen Keyboard'' (see [https://forum.pine64.org/showthread.php?tid=15789&amp;amp;pid=105152 here]). The virtual keyboard can also be disabled temporarily for one session using: &lt;br /&gt;
&lt;br /&gt;
* To temporarily disable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To temporarily enable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The virtual keyboard needs to be activated before removing the keyboard case again.&lt;br /&gt;
&lt;br /&gt;
Under '''Plasma Mobile''' the keyboard can be disabled via a widget, see [https://forum.pine64.org/showthread.php?tid=14789&amp;amp;pid=105077#pid105077 here].&lt;br /&gt;
&lt;br /&gt;
In '''Sxmo''' disabling the keyboard is not required, as the keyboard will only shown when the corresponding hotkey button is pressed.&lt;br /&gt;
&lt;br /&gt;
== Keyboard layout ==&lt;br /&gt;
The keyboard features a default layout (pictured below) created and agreed upon by the community. The keyboard layout can be altered using software as well as by physically repositioning keycaps. All keycaps, with the &amp;lt;u&amp;gt;exception&amp;lt;/u&amp;gt; of space and return keys, can be easily and safely relocated for alternative layouts corresponding to software settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;nolines&amp;quot; widths=&amp;quot;500px&amp;quot; heights=&amp;quot;400px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Ppkb_layout2.png|The keyboard layout how the keys were originally intended&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Keyboard firmware ==&lt;br /&gt;
PinePhone’s keyboard firmware was developed independently by Ondřej Jirman as a free-of-charge contribution to PINE64. The firmware source code is freely and publicly available and you can modify it, and the supporting utilities, using common FOSS tools.  &lt;br /&gt;
&lt;br /&gt;
=== Firmware and supporting utilities ===&lt;br /&gt;
The design of the firmware allows the keys, modifier keys, and their combinations to be handled in virtually unlimited ways, without a need to flash a customized version of the firmware. Mapping of keys is defined at runtime, using the supporting utilities, and is not hardcoded in the firmware. Different keyboard layouts can be loaded dynamically to support various use cases.&lt;br /&gt;
&lt;br /&gt;
The repository that contains the source code of the firmware, supporting utilities and associated documentation is located at https://xnux.eu/pinephone-keyboard/.&lt;br /&gt;
&lt;br /&gt;
You are welcome to contribute patches and improvements to the firmware and the supporting utilities. A summary of firmware development history is available at https://xnux.eu/log/ alongside other development updates from the firmware author.&lt;br /&gt;
&lt;br /&gt;
Much time and effort went into the development of this firmware. If you wish to send a token of appreciation or support the development efforts in any way, please consider making a donation to the author via one of the methods listed at the bottom of this web page: https://xnux.eu/contribute.html.&lt;br /&gt;
&lt;br /&gt;
=== Firmware License ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Copyright (C) 2021 Ondřej Jirman &amp;lt;megi@xff.cz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, with either version 3 of the License or&lt;br /&gt;
(at your discretion) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &lt;br /&gt;
See GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
GNU General Public License http://www.gnu.org/licenses/&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Key hardware specifications:&lt;br /&gt;
* Dimensions (closed): 161 x 95 x 25mm&lt;br /&gt;
* Weights (without / with PinePhone mounted): ~ 191 / ~391 grams&lt;br /&gt;
* Number of keys: 54&lt;br /&gt;
* Number of rows: 5&lt;br /&gt;
** Keyboard IC: Keyboard IC: EM85F684A 8-bit microcontroller with 256 bytes RAM, 2048/ bytes XRAM; 16kB for user’s own firmware&lt;br /&gt;
* Battery capacity: 6000mAh (22.2Wh 3.7V)&lt;br /&gt;
* Charger input: 5V, 3A (15W)&lt;br /&gt;
** Charging and battery IC chip: IP5209 power management IC with charge indicate controller and boost converter&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
''' What is the keyboard driver situation? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#drivers&lt;br /&gt;
&lt;br /&gt;
''' Are keyboard drivers included in my distribution? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#distros&lt;br /&gt;
&lt;br /&gt;
''' What's the status of the existing software for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#sw-status&lt;br /&gt;
&lt;br /&gt;
''' My keyboard doesn't work (well)! '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#faq-ts&lt;br /&gt;
&lt;br /&gt;
''' How does charging work? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#charging&lt;br /&gt;
&lt;br /&gt;
''' What charger is best for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#chargers&lt;br /&gt;
&lt;br /&gt;
''' How safe is the charger circuit in the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#safety&lt;br /&gt;
&lt;br /&gt;
''' Keyboard doesn't react to any key presses '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Keyboard works but top row of keys is less responsive '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is not charging from the keyboard '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is charging slowly from the keyboard battery '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
and https://forum.pine64.org/showthread.php?tid=16979&amp;amp;pid=111414#pid111414#ts&lt;br /&gt;
&lt;br /&gt;
''' Can you open the keyboard and add extra functionality? '''&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to do so, however the production units can be extremely difficult to open. Do not attempt to open the keyboard if you do not want to risk cosmetic damage (scaring and scratching of the plastic).&lt;br /&gt;
&lt;br /&gt;
''' How can I rotate the screen display in tty ? '''&amp;lt;br&amp;gt;&lt;br /&gt;
Under Linux this can be done using the command &amp;lt;code&amp;gt;echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Top row stopped displaying symbols! (kernel &amp;gt; 5.17) ''' &amp;lt;br&amp;gt;&lt;br /&gt;
* For Phosh (at the example of Mobian) see: https://wiki.mobian-project.org/doku.php?id=ppaccessories&lt;br /&gt;
* For TTY and SWMO see: https://codeberg.org/HazardChem/PinePhone_Keyboard&lt;br /&gt;
* For Plasma Mobile, one of either ''/etc/xdg/kxkbrc'' or ''~/.config/kxkbrc'' is necessary, with contents as described in https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3438&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.pdf PinePhone Keyboard 4 language user manual ver 2.0 in PDF format]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.odt PinePhone Keyboard 4 language user manual ver 2.0 in ODT format]&lt;br /&gt;
&lt;br /&gt;
== Schematics, Datasheet and certifications ==&lt;br /&gt;
&lt;br /&gt;
* Schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PinePhone/PinePhone%20Keyboard%20Schematic%20V1.0-20211009.pdf PinePhone Keyboard Schematic ver 1.0 20211009]&lt;br /&gt;
&lt;br /&gt;
* Datasheet:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/EM85F684A.pdf PEM85F684A USB Microcontroller Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/IP5209.pdf IP5209 Power Bank SOC Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/txs0104e.pdf TXS0104E 4-Bit Bidirectional Voltage-Level Translator Datasheet]&lt;br /&gt;
&lt;br /&gt;
* Certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20FCC%20Certificate-S21111804102001.pdf PinePhone Keyboard FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20CE%20Certificate-S21111804101001.pdf PinePhone Keyboard CE RED Certificate]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/2022/01/11/pinephone-pro-explorer-edition-pre-orders-open-january-11/ Pre-order announcement]&lt;br /&gt;
* FAQ of the developer megous: https://xnux.eu/pinephone-keyboard/faq.html&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;br /&gt;
[[Category:PinePhone (Pro) Add-Ons]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=20598</id>
		<title>PinePhone (Pro) Keyboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=20598"/>
		<updated>2023-08-31T14:49:19Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Getting started */ Clarified wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PP_KB_Front-1024x576.jpg|400px|thumb|right|Picture of the PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone (Pro) Keyboard Case''' is a case compatible with the [[PinePhone]] and [[PinePhone Pro]], adding a keyboard functionality to the phone. It features a clam-shell design and uses the pogo pins located on the smartphone’s midsection and attaches by replacing the default back cover. This add-on effectively turns the PinePhone (Pro) into a PDA with an in-built LTE modem.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
[[File:Ppkb_description.png|thumb|upright=1.2|&lt;br /&gt;
① Contact pads&amp;lt;br&amp;gt;&lt;br /&gt;
② Battery switch&amp;lt;br&amp;gt;&lt;br /&gt;
③ USB-C connector]]&lt;br /&gt;
&lt;br /&gt;
The keyboard case works with both the PinePhone and PinePhone Pro and features a clam-shell design. It uses pogo pins located on the phone’s midsection and attaches by replacing the default back cover. When folded, the phone’s screen and the keyboard rest securely against each other. The hinge features a 180° design, which not only allows for two-hand typing on a surface but also for comfortable thumb-typing when fully extended. The etched keycaps can be easily relocated for alternate layouts such as AZERTY or QWERTZ. The keyboard case runs an [https://xff.cz/git/pinephone-keyboard/ open firmware], which means that anyone with the know-how can alter existing functions or add new ones. The bottom (keyboard) and top (phone) sections of the assembly are well-balanced thanks to the large, 6000mAh, internal battery capable of charging the PinePhone (Pro) during operation. The internal battery effectively triples the phone’s battery life. The internal keyboard battery can be manually toggled on/off and the keyboard’s battery charge level can be read in the supported operating systems; the keyboard remains functional with the battery fully depleted.&lt;br /&gt;
&lt;br /&gt;
You do not lose access to the PinePhone (Pro)’s USB-C port, speaker, microphone, or any external features, such as volume and lock buttons, with the keyboard attached. There is also a cut-out for the camera, torch, and headphone jack. The USB-C port on the keyboard is capable of powering both the keyboard and PinePhone (Pro) simultaneously. This means that you can plug in a USB-C charger into the keyboard to charge the keyboard's internal battery, while the PinePhone (Pro) is charging via the internal connection between phone and keyboard.&lt;br /&gt;
&lt;br /&gt;
{{warning|Do not plug in a charger into the keyboard and the phone at the same time. Using the USB-C port of the PinePhone (Pro) while a charger to is connected to the USB-C port of the keyboard is also discouraged for the same reason. Technical details regarding the issue can be found in the blog post of the developer ''megi'' [http://xnux.eu/log/072.html here], in [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post and the [[PinePhone (Pro) Keyboard#Safety|safety]] section.}}&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that the keyboard case transforms the PinePhone (Pro) into a PDA, which means that taking calls will likely prove awkward without a wired or wireless headset connected (try speakerphone button if available).&lt;br /&gt;
&lt;br /&gt;
=== Mounting the keyboard ===&lt;br /&gt;
Power off your PinePhone and remove the back case. To remove the back case of the PinePhone use your fingernail or another soft object to pry up the back case. A notch to easily remove the cover is located at the bottom left of the PinePhone with the backcover facing the user. &lt;br /&gt;
&lt;br /&gt;
Open and place the keyboard flat on a hard surface with the hinge fully extended. Proceed to insert the PinePhone into the keyboard at an angle of approx. 15 degrees. Make sure that the PinePhone’s pogo pins and the corresponding pads ① on the keyboard are aligned. The leading edge with volume and power buttons should make contact first. Firmly press the PinePhone into place. Multiple clicks should be heard as the two snap into place. Pay special attention to the plastic pin below the camera hole. Firmly push from the rear, below the camera hole, to click it into position. Failing to do so may cause an insufficient pin contact and prevent the case from charging the phone.&lt;br /&gt;
&lt;br /&gt;
The PinePhone can be removed from the keyboard easily using a notch similar to the one found on the back case. The notch is located at the bottom of the leading edge with the power and volume buttons.&lt;br /&gt;
&lt;br /&gt;
=== Operation ===&lt;br /&gt;
The keyboard will function automatically once a PinePhone running a compatible operating system is mounted. For alterations to physical layout and firmware see the relevant sections respectively.&lt;br /&gt;
&lt;br /&gt;
The keyboard features an in-built 6000mAh battery. The battery can be turned ON/OFF using the button on the right leading edge of the keyboard ②. A short button press activates the internal battery while a long (15 seconds) press or double press deactivates it. Compatible operating systems display both the PinePhone’s and keyboard’s battery status together.&lt;br /&gt;
&lt;br /&gt;
You should charge the PinePhone and the keyboard &amp;lt;u&amp;gt;only&amp;lt;/u&amp;gt; using the USB-C ③ port on the keyboard. The keyboard’s USB-C port cannot be used for peripherals. The PinePhone’s USB-C port remains operational when mounted in the keyboard and can be used for data and peripherals.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
There are multiple possible hardware issues users could face. It is recommend to check the following most common hardware issues and their solutions and workarounds.&lt;br /&gt;
&lt;br /&gt;
==== Pogo pins not making proper contact ====&lt;br /&gt;
Under certain scenarios the keyboard's contacts are not making proper contact with the pogo pins of the phone. To address the issue:&lt;br /&gt;
&lt;br /&gt;
* Power down the phone!&lt;br /&gt;
* Apply '''slight''' pressure in the upper mid of the PinePhone's backside until the plastic holder pin towards the upper middle of the keyboard cover, until an audible click can be heard.&lt;br /&gt;
* Make sure the contacts and pogo pins are clean and the pogo pins can be slightly pressed individually.&lt;br /&gt;
* If the above does not work, a shim under the keyboard's contacts might be required, as explained [https://xnux.eu/pinephone-keyboard/faq.html#ts FAQ troubleshooting section]. See also this [https://freiburg.social/system/media_attachments/files/107/684/243/421/870/279/original/a5e9c68ff3510ec8.jpeg photo of where to place the shim], or [https://www.youtube.com/watch?v=4ixPjz6SPIA this video].&lt;br /&gt;
&lt;br /&gt;
==== Top row is less responsive ====&lt;br /&gt;
The keys of the top row may be less responsive. The issue can be worked around by adding inserts to the underside of the top row key caps to decrease the travel distance. More details regarding the workaround can be found in the corresponding section of the FAQ page of the developer megi: https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
==== Software issues ====&lt;br /&gt;
For any software issue please see the [[PinePhone (Pro) Keyboard#Software support|Software support section]] and the [[PinePhone (Pro) Keyboard#Frequently asked questions|FAQ section]].&lt;br /&gt;
&lt;br /&gt;
== Safety ==&lt;br /&gt;
&lt;br /&gt;
Do not plug in a charger into the keyboard and the phone at the same time. Doing so may result in damage or loss of the keyboard charging functionality. Technical details regarding the issue can be found in the blog post of the developer ''megi'' [http://xnux.eu/log/072.html here] and [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post.&lt;br /&gt;
&lt;br /&gt;
Please note: Only use mild isopropyl alcohol when wiping down the clamshell of the device. Stronger solutions may partially strip the coatings. Do not lube the keyboard with GPL 205G0 switch grease, it can cause problems with the key responsiveness and tactility.&lt;br /&gt;
&lt;br /&gt;
== Software support ==&lt;br /&gt;
&lt;br /&gt;
=== Kernel-space driver ===&lt;br /&gt;
&lt;br /&gt;
Kernel driver implementation from Samuel Holland: CONFIG_IP5XXX_POWER (module ip5xxx_power) and CONFIG_KEYBOARD_PINEPHONE (module pinephone_keyboard) https://github.com/smaeul/linux/commits/wip/pp-keyboard&lt;br /&gt;
&lt;br /&gt;
Note: If you've upgraded to &amp;gt;=5.18, don't forget to upgrade the dtb as kb151 now appears to be a stub.&lt;br /&gt;
&lt;br /&gt;
=== User-space driver ===&lt;br /&gt;
The user-space driver is available [https://xff.cz/git/pinephone-keyboard/ here]. Use git to clone the repository. You're going to need sdcc 4.1+ installed to build it, so use your package manager to install that first. Next you'll cd into the directory you cloned pinephone-keyboard and use the command &amp;quot;make&amp;quot; to build. After the build is completed, cd into the build directory and you'll notice several new files starting with ppkb-. To use your keyboard case, you'll want to run the following command: &amp;lt;code&amp;gt;sudo ./ppkb-i2c-inputd&amp;lt;/code&amp;gt; &amp;lt;!-- this isn't running as a daemon, if anyone knows how to make it do so please edit that info in! --&amp;gt; Open something you can type into like a new terminal window or text editor and you should now be able to use the keyboard case! &lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Virtual keyboards such as &amp;lt;i&amp;gt;squeekboard&amp;lt;/i&amp;gt; are opening whenever a text field is selected.&lt;br /&gt;
&lt;br /&gt;
To disable this behavior under Linux running '''Phosh''' you can change the corresponding settings under ''Settings'' &amp;gt; ''Accessibility'' &amp;gt; ''Screen Keyboard'' (see [https://forum.pine64.org/showthread.php?tid=15789&amp;amp;pid=105152 here]). The virtual keyboard can also be disabled temporarily for one session using: &lt;br /&gt;
&lt;br /&gt;
* To temporarily disable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To temporarily enable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The virtual keyboard needs to be activated before removing the keyboard case again.&lt;br /&gt;
&lt;br /&gt;
Under '''Plasma Mobile''' the keyboard can be disabled via a widget, see [https://forum.pine64.org/showthread.php?tid=14789&amp;amp;pid=105077#pid105077 here].&lt;br /&gt;
&lt;br /&gt;
In '''Sxmo''' disabling the keyboard is not required, as the keyboard will only shown when the corresponding hotkey button is pressed.&lt;br /&gt;
&lt;br /&gt;
== Keyboard layout ==&lt;br /&gt;
The keyboard features a default layout (pictured below) created and agreed upon by the community. The keyboard layout can be altered using software as well as by physically repositioning keycaps. All keycaps, with the &amp;lt;u&amp;gt;exception&amp;lt;/u&amp;gt; of space and return keys, can be easily and safely relocated for alternative layouts corresponding to software settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;nolines&amp;quot; widths=&amp;quot;500px&amp;quot; heights=&amp;quot;400px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Ppkb_layout2.png|The keyboard layout how the keys were originally intended&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Keyboard firmware ==&lt;br /&gt;
PinePhone’s keyboard firmware was developed independently by Ondřej Jirman as a free-of-charge contribution to PINE64. The firmware source code is freely and publicly available and you can modify it, and the supporting utilities, using common FOSS tools.  &lt;br /&gt;
&lt;br /&gt;
=== Firmware and supporting utilities ===&lt;br /&gt;
The design of the firmware allows the keys, modifier keys, and their combinations to be handled in virtually unlimited ways, without a need to flash a customized version of the firmware. Mapping of keys is defined at runtime, using the supporting utilities, and is not hardcoded in the firmware. Different keyboard layouts can be loaded dynamically to support various use cases.&lt;br /&gt;
&lt;br /&gt;
The repository that contains the source code of the firmware, supporting utilities and associated documentation is located at https://xnux.eu/pinephone-keyboard/.&lt;br /&gt;
&lt;br /&gt;
You are welcome to contribute patches and improvements to the firmware and the supporting utilities. A summary of firmware development history is available at https://xnux.eu/log/ alongside other development updates from the firmware author.&lt;br /&gt;
&lt;br /&gt;
Much time and effort went into the development of this firmware. If you wish to send a token of appreciation or support the development efforts in any way, please consider making a donation to the author via one of the methods listed at the bottom of this web page: https://xnux.eu/contribute.html.&lt;br /&gt;
&lt;br /&gt;
=== Firmware License ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Copyright (C) 2021 Ondřej Jirman &amp;lt;megi@xff.cz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, with either version 3 of the License or&lt;br /&gt;
(at your discretion) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &lt;br /&gt;
See GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
GNU General Public License http://www.gnu.org/licenses/&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Key hardware specifications:&lt;br /&gt;
* Dimensions (closed): 161 x 95 x 25mm&lt;br /&gt;
* Weights (without / with PinePhone mounted): ~ 191 / ~391 grams&lt;br /&gt;
* Number of keys: 54&lt;br /&gt;
* Number of rows: 5&lt;br /&gt;
** Keyboard IC: Keyboard IC: EM85F684A 8-bit microcontroller with 256 bytes RAM, 2048/ bytes XRAM; 16kB for user’s own firmware&lt;br /&gt;
* Battery capacity: 6000mAh (22.2Wh 3.7V)&lt;br /&gt;
* Charger input: 5V, 3A (15W)&lt;br /&gt;
** Charging and battery IC chip: IP5209 power management IC with charge indicate controller and boost converter&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
''' What is the keyboard driver situation? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#drivers&lt;br /&gt;
&lt;br /&gt;
''' Are keyboard drivers included in my distribution? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#distros&lt;br /&gt;
&lt;br /&gt;
''' What's the status of the existing software for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#sw-status&lt;br /&gt;
&lt;br /&gt;
''' My keyboard doesn't work (well)! '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#faq-ts&lt;br /&gt;
&lt;br /&gt;
''' How does charging work? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#charging&lt;br /&gt;
&lt;br /&gt;
''' What charger is best for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#chargers&lt;br /&gt;
&lt;br /&gt;
''' How safe is the charger circuit in the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#safety&lt;br /&gt;
&lt;br /&gt;
''' Keyboard doesn't react to any key presses '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Keyboard works but top row of keys is less responsive '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is not charging from the keyboard '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is charging slowly from the keyboard battery '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
and https://forum.pine64.org/showthread.php?tid=16979&amp;amp;pid=111414#pid111414#ts&lt;br /&gt;
&lt;br /&gt;
''' Can you open the keyboard and add extra functionality? '''&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to do so, however the production units can be extremely difficult to open. Do not attempt to open the keyboard if you do not want to risk cosmetic damage (scaring and scratching of the plastic).&lt;br /&gt;
&lt;br /&gt;
''' How can I rotate the screen display in tty ? '''&amp;lt;br&amp;gt;&lt;br /&gt;
Under Linux this can be done using the command &amp;lt;code&amp;gt;echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Top row stopped displaying symbols! (kernel &amp;gt; 5.17) ''' &amp;lt;br&amp;gt;&lt;br /&gt;
* For Phosh (at the example of Mobian) see: https://wiki.mobian-project.org/doku.php?id=ppaccessories&lt;br /&gt;
* For TTY and SWMO see: https://codeberg.org/HazardChem/PinePhone_Keyboard&lt;br /&gt;
* For Plasma Mobile, one of either ''/etc/xdg/kxkbrc'' or ''~/.config/kxkbrc'' is necessary, with contents as described in https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3438&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.pdf PinePhone Keyboard 4 language user manual ver 2.0 in PDF format]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.odt PinePhone Keyboard 4 language user manual ver 2.0 in ODT format]&lt;br /&gt;
&lt;br /&gt;
== Schematics, Datasheet and certifications ==&lt;br /&gt;
&lt;br /&gt;
* Schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PinePhone/PinePhone%20Keyboard%20Schematic%20V1.0-20211009.pdf PinePhone Keyboard Schematic ver 1.0 20211009]&lt;br /&gt;
&lt;br /&gt;
* Datasheet:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/EM85F684A.pdf PEM85F684A USB Microcontroller Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/IP5209.pdf IP5209 Power Bank SOC Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/txs0104e.pdf TXS0104E 4-Bit Bidirectional Voltage-Level Translator Datasheet]&lt;br /&gt;
&lt;br /&gt;
* Certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20FCC%20Certificate-S21111804102001.pdf PinePhone Keyboard FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20CE%20Certificate-S21111804101001.pdf PinePhone Keyboard CE RED Certificate]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/2022/01/11/pinephone-pro-explorer-edition-pre-orders-open-january-11/ Pre-order announcement]&lt;br /&gt;
* FAQ of the developer megous: https://xnux.eu/pinephone-keyboard/faq.html&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;br /&gt;
[[Category:PinePhone Pro]]&lt;br /&gt;
[[Category:PinePhone (Pro) Add-Ons]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PINE_A64&amp;diff=20549</id>
		<title>PINE A64</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PINE_A64&amp;diff=20549"/>
		<updated>2023-08-27T08:43:21Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Software releases */ Specified the section, removed old mentions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PINEA64_sideimg.jpg|400px|thumb|right|The PINE A64]]&lt;br /&gt;
&lt;br /&gt;
The '''PINE A64''' and the '''PINE A64+''' is ''PINE64's'' first Single Board Computer powered by Allwinner’s A64 quad-core ARM Cortex A53 64-Bit SoC. There are many Operating Systems available for the PINE A64 created by the open source community and various partner projects. Currently the majority of Linux distributions for the PINE A64 are using mainline Linux but there are a number of BSP-based distribution and / or legacy systems that can be downloaded too.&lt;br /&gt;
&lt;br /&gt;
== Software releases ==&lt;br /&gt;
&lt;br /&gt;
Under [[PINE A64 Software Releases]] you will find a complete list of currently supported operating system images, which work with the PINE A64 and PINE A64+, as well as other related software.&lt;br /&gt;
&lt;br /&gt;
== Accessories Step-by-Step Guides ==&lt;br /&gt;
&lt;br /&gt;
Under [[Accessories Step by Step Guides]] you can find instructions and guides pertaining to:&lt;br /&gt;
* Enclosures&lt;br /&gt;
* Bluetooth and WiFi module&lt;br /&gt;
* Real Time Clock (RTC) battery&lt;br /&gt;
* Real Time Clock (RTC) battery holder&lt;br /&gt;
* First and third party cases&lt;br /&gt;
* Featured 3D printed cases (and more).&lt;br /&gt;
&lt;br /&gt;
== SoC and Memory Specification ==&lt;br /&gt;
* Based on Allwinner A64&lt;br /&gt;
[[File:Allwinner_A64.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
=== CPU Architecture ===&lt;br /&gt;
* [https://www.arm.com/products/processors/cortex-a/cortex-a53-processor.php Quad-core ARM Cortex-A53 Processor@1152Mhz]&lt;br /&gt;
* A power-efficient ARM v8 architecture&lt;br /&gt;
* 64 and 32bit execution states for scalable high performance&lt;br /&gt;
* Support NEON Advanced SIMD (Single Instruction Multiple Data) instruction for acceleration of media and signal processing function&lt;br /&gt;
* Support Large Physical Address Extensions(LPAE)&lt;br /&gt;
* VFPv4 Floating Point Unit&lt;br /&gt;
* 32KB L1 Instruction cache and 32KB L1 Data cache&lt;br /&gt;
* 512KB L2 cache&lt;br /&gt;
&lt;br /&gt;
=== GPU Architecture ===&lt;br /&gt;
* [https://www.arm.com/products/multimedia/mali-gpu/ultra-low-power/mali-400.php ARM Mali400MP2 Dual-core GPU]&lt;br /&gt;
* Support OpenGL ES 2.0 and OpenVG 1.1 standard&lt;br /&gt;
&lt;br /&gt;
=== System Memory ===&lt;br /&gt;
* RAM Memory Variants: 512MB, 1GB and 2GB DDR3.&lt;br /&gt;
* Storage Memory: PINE A64 boards ''do not'' have built-in Flash memory but use '''bootable microSD Cards''' or USB attached storage.&lt;br /&gt;
&lt;br /&gt;
== Board Features ==&lt;br /&gt;
=== Video ===&lt;br /&gt;
* Digital Video Port (Type A - full)&lt;br /&gt;
&lt;br /&gt;
=== Audio ===&lt;br /&gt;
* 3.5mm stereo earphone/microphone plug&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
* 10/100/1000Mbps Ethernet (PINE A64+ version), 10/100Mbps Ethernet (PINE A64 version)&lt;br /&gt;
* WiFi 802.11 b/g/n with Bluetooth 4.0 (optional)&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
* microSD - bootable, support SDHC and SDXC, storage up to 256GB&lt;br /&gt;
* USB -	2 USB2.0 Host port&lt;br /&gt;
&lt;br /&gt;
=== Expansion Ports ===&lt;br /&gt;
* DSI - Display Serial Interface, 4 lanes MiPi, up to 1080P&lt;br /&gt;
* CSI - CMOS Camera Interface up to 5 mega pixel&lt;br /&gt;
* TP - Touch Panel Port, SPI with interrupt&lt;br /&gt;
* RTC - Real Time Clock Battery Connector&lt;br /&gt;
* VBAT - Lithium Battery Connector with temperature sensor input&lt;br /&gt;
* Wifi/BT Module Header - SDIO 3.0 and UART&lt;br /&gt;
* 2x20 pins &amp;quot;Pi2&amp;quot; GPIO Header&lt;br /&gt;
* 2x17 pins &amp;quot;Euler&amp;quot; GPIO Header&lt;br /&gt;
* 2x5 pins &amp;quot;EXP&amp;quot; Console Header&lt;br /&gt;
&lt;br /&gt;
== Information, Schematics and Certifications ==&lt;br /&gt;
&lt;br /&gt;
Board Dimensions: 133mm x 80mm x 19mm&lt;br /&gt;
&lt;br /&gt;
Input Power: DC 5V @ 2A, 3.7V Li-Ion battery connector, microUSB connector, Euler connector&lt;br /&gt;
&lt;br /&gt;
Schematics and general files:&lt;br /&gt;
* [https://wiki.pine64.org/images/1/1d/Power_Consumption.jpg Power Consumption: 2.5W]&lt;br /&gt;
* [https://wiki.pine64.org/images/7/7d/Pine64_Board_Connector.png PINE A64 Connector Layout @courtesy of norm24]&lt;br /&gt;
* [https://wiki.pine64.org/images/2/2e/Pine64_Board_Connector_heatsink.png PINE A64 Heat Sink Location @courtesy of norm24]&lt;br /&gt;
* [https://wiki.pine64.org/images/d/da/Pine64_Connector.JPG PINE A64 Connector List]&lt;br /&gt;
* [https://files.pine64.org/doc/Pine%20A64%20Schematic/Pine%20A64%20Pin%20Assignment%20160215.pdf PINE A64 Pi-2/Eular/Ext Bus/Wifi Bus Connector Pin Assignment (Updated 15/Feb/2016)]&lt;br /&gt;
* [https://synfare.com/599N105E/hwdocs/pine64/index.html Good documentation about PINE A64, A64+, and A64-LTS GPIO pins article]&lt;br /&gt;
* [https://wiki.pine64.org/images/b/be/Pine64_Model_Spec.JPG Board Model Comparison]&lt;br /&gt;
&lt;br /&gt;
Board schematics:&lt;br /&gt;
* [https://files.pine64.org/doc/Pine%20A64%20Schematic/Pine%20A64%20512MB%20rev%20B-2015121601_Release.pdf PINE A64 512MB Rev B Board Schematic]&lt;br /&gt;
* [https://files.pine64.org/doc/Pine%20A64%20Schematic/a64-db-rev%20b-20151217-Plus-Release.pdf PINE A64+ 1GB Rev B Board Schematic]&lt;br /&gt;
* [https://files.pine64.org/doc/Pine%20A64%20Schematic/Pine%20A64plus%202GB%20Rev%20C-20160113_Release.pdf PINE A64+ 2GB Rev C Board Schematic]&lt;br /&gt;
* [https://files.pine64.org/doc/Pine%20A64%20Schematic/A64-DB-WIFI-BT-REV%20B.pdf PINE A64 Wifi/BT Module Schematic]&lt;br /&gt;
&lt;br /&gt;
Stereo audio DAC schematics:&lt;br /&gt;
* [https://forum.pine64.org/attachment.php?aid=697 PINE A64 Stereo audio DAC schematics]&lt;br /&gt;
&lt;br /&gt;
Certifications:&lt;br /&gt;
* Disclaimer: Please note that PINE64 SBC is not a &amp;quot;final&amp;quot; product and in general certification is not necessary. However, PINE64 still submit the SBC for FCC, CE, and ROHS certifications and obtain the certificates to prove that the SBC board can pass the testing. Please note, a final commercial product needs to perform its own testing and obtain its own certificate.&lt;br /&gt;
* [https://files.pine64.org/doc/cert/Pine%20A64%20Board%20FCC%20certification%20CCF20160624.jpg PINE A64 FCC Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/Pine%20A64%20Board%20CE%20Certification%20CCF20160624.jpg PINE A64 CE Certificate]&lt;br /&gt;
* [https://files.pine64.org/doc/cert/CCF20160627_00000.jpg PINE A64 RoHS Certificate]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for Components and Peripherals ==&lt;br /&gt;
Allwinner A64 SoC information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC Brief Introduction]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
* [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC Datasheet]&lt;br /&gt;
&lt;br /&gt;
'''PINE A64, PINE A64+ and SOPINE Related:'''&lt;br /&gt;
* 5MPixel CMOS Camera module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/YL-PINE64-4EC.pdf PINE64 YL-PINE64-4EC 5M Pixel CMOS Image Sensor Module (Description in Chinese)]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/S5K4EC%205M%208%205X8%205%20PLCC%20%20Data%20Sheet_V1.0.pdf S5K4EC 5MP CMOS Image Sensor SoC Module Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/S5K4ECGX_EVT1_DataSheet_R005_20100816.pdf S5K4EC 5MP CMOS Image Sensor SoC Chip Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/s5k4ec.c S5K4EC 5MP CMOS Image Sensor Driver Source Code in C language]&lt;br /&gt;
** Early version Camera module information:&lt;br /&gt;
*** [https://files.pine64.org/doc/datasheet/pine64/D116-A64_Bonsen_cmos_camera.pdf Bonsen Kexin V118-A64-GC2145-HM5065 CMOS Image Sensor Module]&lt;br /&gt;
*** [https://files.pine64.org/doc/datasheet/pine64/HM5065-DS-V03.pdf HiMax 5MP CMOS Image Sensor SoC]&lt;br /&gt;
* LCD Touch Screen Panel information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/FY07024DI26A30-D_feiyang_LCD_panel.pdf 7.0&amp;quot; 1200x600 TFT-LCD Panel Specification]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/HK70DR2459-PG-V01.pdf Touch Panel Specification]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/GT911%20Capacitive%20Touch%20Controller%20Datasheet.pdf GOODiX GT911 5-Point Capacitive Touch Controller Datasheet]&lt;br /&gt;
* Lithium Battery information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/9070120P%203.7V%208000MAH.pdf 8000mAH Lithium Battery Specification]&lt;br /&gt;
* Ethernet PHY information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/rtl8211e(g)-vb(vl)-cg_datasheet_1.6.pdf Realtek RTL8211 10/100/1000M Ethernet Transceiver for PINE A64+ Board]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/rtl8201cp.pdf Realtek RTL8201 10/100M Ethernet Transceiver for PINE A64 Board]&lt;br /&gt;
* Wifi/BT module information:&lt;br /&gt;
** [https://files.pine64.org/doc/Pine%20A64%20Schematic/A64-DB-WIFI-BT-REV%20B.pdf PINE A64 Wifi/BT Module Schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf Realtek RTL8723BS WiFi with BT SDIO]&lt;br /&gt;
* Enclosure information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/case/playbox_enclosure_20160426.stp Playbox Enclosure 3D file]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/case/ABS_enclosure_20160426.stp ABS Enclosure 3D file]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/case/pine64%20Die%20Cast%20casing-final.jpg Outdoor Aluminum Cast Dust-proof IP67 Enclosure Drawing]&lt;br /&gt;
* Connector information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/ePH.pdf 2.0mm PH Type connector specification use in Lithium Battery (VBAT) port and RTC Battery port]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/0.5FPC%20Front%20Open%20Connector%20H=1.5.pdf 0.5mm Pitch cover type FPC connector specification use in DSI port, TP port and CSI port]&lt;br /&gt;
* Remote control button mapping&lt;br /&gt;
** [https://files.pine64.org/doc/Pine%20A64%20Schematic/remote-wit-logo.jpg Official Remote Control for the PINE A64 Button Mapping]&lt;br /&gt;
&lt;br /&gt;
== Pine A64 POT ==&lt;br /&gt;
* [[POT|PINE A64 Peripheral On Top (POT) and Related Devices]]&lt;br /&gt;
* [[Wifi_Remote_I2c|WiFi Remote I2c Quick Start Guide]]&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
* [https://linux-sunxi.org/Pine64#Manufacturer_images Linux Sunxi Wiki page on PINE A64]&lt;br /&gt;
* [https://github.com/longsleep/build-pine64-image PINE A64 Linux build scripts, tools and instructions by Longsleep]&lt;br /&gt;
* [https://www.stdin.xyz/downloads/people/longsleep/pine64-images/ PINE A64 Linux image by Longsleep]&lt;br /&gt;
* [https://github.com/ayufan-pine64/linux-build/releases PINE A64 Linux Github by ayufan]&lt;br /&gt;
* [https://github.com/ayufan-pine64/android-7.1/releases PINE A64 Android Github by ayufan]&lt;br /&gt;
* [https://www.armbian.com/pine64 Armbian's PINE A64 Page]&lt;br /&gt;
* [https://github.com/umiddelb/z2d/tree/master/pine64 Collection of scripts to set up a minimal Xenial 14.04.3 / Debian 8 Jessie root filesystem Contributed By Uli Middelberg]&lt;br /&gt;
* [https://github.com/apritzel/pine64 Linux Image created by Andre Przywara]&lt;br /&gt;
* [https://blog.hypriot.com/post/the-pine-a64-is-about-to-become=the-cheapest-ARM-64-bit-platform-to-run-Docker/ PINE A64 with HypriotOS by Dieter and Govinda]&lt;br /&gt;
* [https://sosfakeflash.wordpress.com/2008/09/02/h2testw-14-gold-standard-in-detecting-usb-counterfeit-drives/comment-page-3/#comment-9861 H2testw 1.4 – Gold Standard In Detecting USB Counterfeit Drives]&lt;br /&gt;
* [https://oss.digirati.com.br/f3/ F3 - an alternative to h2testw]&lt;br /&gt;
* [https://www.phoronix.com/scan.php?page=article&amp;amp;item=pine-64-benchmark&amp;amp;num=1 Benchmarking The Low-Cost PINE 64+ ARM Single Board Computer by Michael Larabel]&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLgj96wTPcMKffRm_Sk6673Nfy_I6b5UJW A series of Youtube video on PINE A64 Developers Board by Michael Larson]&lt;br /&gt;
* [https://rayhightower.com/blog/2016/04/04/pine64-quick-start-guide-using-mac-os-x/ PINE64 Quick Start Guide (with Gotchas)]&lt;br /&gt;
* [https://softwarebakery.com/shrinking-images-on-linux Shrinking images on Linux by FrozenCow]&lt;br /&gt;
* [https://github.com/avafinger/ffmpeg-3.3.4_cedrus264 FFmpeg Hardware encoder Cedrus264 on Linux by avafinger ]&lt;br /&gt;
&lt;br /&gt;
[[Category:PINE A64]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PINE_A64_Software_Releases&amp;diff=20548</id>
		<title>PINE A64 Software Releases</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PINE_A64_Software_Releases&amp;diff=20548"/>
		<updated>2023-08-27T08:41:20Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Changed style&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a list of all available releases for the [[PINE A64|PINE A64 and PINE A64+]], as well as links to other resources. &lt;br /&gt;
&lt;br /&gt;
{{Info|The images for the PINE A64 and PINE A64+ are '''not compatible with the PINE A64-LTS''' due to LPDDR3 memory configuration. For PINE A64-LTS, please use the [[SOPINE Software Releases]].}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
'''Special thanks to Sunxi community and longsleep for their contributions'''&lt;br /&gt;
&lt;br /&gt;
Below you will find useful links to various resources and forum threads:&lt;br /&gt;
* [https://linux-sunxi.org/Pine64 Sunxi PINE64 Page]&lt;br /&gt;
* [https://www.stdin.xyz/downloads/people/longsleep/tmp/pine64-images Longsleep BSP Linux Builds Download Page]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=293 Longsleep BSP Linux Kernel Thread on PINE64 Forum]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=376 Longsleep BSP Xenial Thread on PINE64 Forum]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=343 Longsleep BSP Arch Linux Thread on PINE64 Forum]&lt;br /&gt;
&lt;br /&gt;
=== AOSC ===&lt;br /&gt;
[[File:aosc.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''AOSC OS''' is a general purpose Linux distribution that strives to simplify user experience and improve free and open source software for day-to-day productivity. To learn more about AOSC, please visit the official [https://aosc.io/ AOSC website].&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* https://aosc.io/downloads/ (supports the microSD card and eMMC, 8GB or more)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;aosc/anthon&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''Arch Linux ARM''' is a distribution of Linux for ARM computers.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
* https://archlinuxarm.org/platforms/armv8/allwinner/pine64&lt;br /&gt;
&lt;br /&gt;
=== Armbian ===&lt;br /&gt;
[[File:armbian.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''Armbian''' is a Linux distribution designed for ARM boards. They are usually Debian or Ubuntu flavored.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* https://www.armbian.com/pine64/&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
[[File:Debian-logo.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''Debian''' is an operating system and a distribution of free software. See the forum thread [https://forum.pine64.org/showthread.php?tid=9744 here].&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://deb.debian.org/debian/dists/bullseye/main/installer-arm64/current/images/netboot/SD-card-images/ Debian 11 Bullseye] (recommended)&lt;br /&gt;
* [https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/SD-card-images/ Debian 12 Bookworm]&lt;br /&gt;
* [https://d-i.debian.org/daily-images/arm64/ Daily netboot images]&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download: &amp;lt;code&amp;gt;firmware.pine64_plus.img.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
* Download: &amp;lt;code&amp;gt;partition.img.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
* Create the disk image:&lt;br /&gt;
** For Linux: &amp;lt;code&amp;gt;zcat firmware.pine64_plus.img.gz partition.img.gz &amp;gt; complete_image.img&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Mac: &amp;lt;code&amp;gt;gzcat firmware.pine64_plus.img.gz partition.img.gz &amp;gt; complete_image.img&amp;lt;/code&amp;gt;&lt;br /&gt;
* Write the image to your boot device:&lt;br /&gt;
** For Linux: &amp;lt;code&amp;gt;dd if=complete_image.img of=your_chosen_boot_device bs=4M&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Mac: see [[Getting started]]&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* An Ethernet connection is required for the above installer&lt;br /&gt;
&lt;br /&gt;
=== DietPi ===&lt;br /&gt;
[[File:dietpi.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''DietPi''' is a lightweight yet easy to setup and feature-rich Linux distribution, based on Debian. To find out more about DietPi, please visit the [https://dietpi.com/docs/ official documentation]. Discuss the PINE A64 build on the [https://forum.pine64.org/showthread.php?tid=12513 PINE64 forum thread].&lt;br /&gt;
&lt;br /&gt;
Download: &lt;br /&gt;
* [https://dietpi.com/downloads/images/DietPi_PINEA64-ARMv8-Bullseye.7z Debian 11 Bullseye] (supports the microSD card and eMMC, 4GB or more)&lt;br /&gt;
* [https://dietpi.com/downloads/images/DietPi_PINEA64-ARMv8-Bookworm.7z Debian 12 Bookworm] (supports the microSD card and eMMC, 4GB or more)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;root/dietpi&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FreedomBox ===&lt;br /&gt;
[[File:FreedomBox.jpg|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''FreedomBox''' is a private server for non-experts: it lets you install and configure server applications with only a few clicks. For more information about FreedomBox, please visit http://www.freedombox.org.&lt;br /&gt;
&lt;br /&gt;
{{Outdated release}}&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://ftp.freedombox.org/pub/freedombox/hardware/pine64-plus/stable/freedombox-stable-free_buster_pine64-plus-arm64.img.xz Direct download from FreedomBox site]&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* This is a headless build, not HDMI output.&lt;br /&gt;
* Please plug-in Ethernet cable first before initial power up. After power up for 10 minutes, using browser and type in https://fredombox.local to setup. Browser may warms for unsecure site and please proceed with exception.&lt;br /&gt;
* Freedom Manual: https://wiki.debian.org/FreedomBox/Manual&lt;br /&gt;
&lt;br /&gt;
=== LibreELEC ===&lt;br /&gt;
[[File:libreelec.jpg|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''LibreELEC''' is a &amp;quot;Just enough OS&amp;quot; Linux distribution combining the Kodi media center with an operating system.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* 512MB PINE A64: [https://test.libreelec.tv/ direct download] from Libreelec nightly build site (look for ''LibreELEC-A64.arm-...-nightly-xxxxxxxx-xxxxxxx-pine64.img.gz'')&lt;br /&gt;
* 1GB/2GB PINE A64+ Board: [https://test.libreelec.tv/ direct download] from Libreelec nightly build site (look for ''LibreELEC-A64.arm-...-nightly-xxxxxxxx-xxxxxxx-pine64-plus.img.gz'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Nightly build for microSD boot&lt;br /&gt;
&lt;br /&gt;
=== motionEyeOS ===&lt;br /&gt;
[[File:motioneyeos.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''motionEyeOS''' is a Linux distribution that turns a single-board computer into a video surveillance system. The OS is based on BuildRoot and uses motion as a backend and motionEye for the frontend. Visit the [https://github.com/ccrisan/motioneyeos/releases/ motionEyeOS GitHub] and its [https://github.com/ccrisan/motioneyeos/wiki GitHub Wiki] for more information&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* 1GB/2GB PINE A64(+): [https://github.com/ccrisan/motioneyeos/releases/latest Direct download from GitHub] (look for ''motioneyeos-pine64-xxxxxxxx.img.xz'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Suitable for 1GB/2GB PINE A64(+) variants&lt;br /&gt;
* There are 2 ways to interact with the OS:&lt;br /&gt;
** Scan for its IP with hostname MEYE-* and go to the admin web interface https://[PINE A64(+) motionEyeOS IP Address] and after login, you should able to see the output of the CAMERA MODULE on the web interface&lt;br /&gt;
** Use the PINE64 USB SERIAL CONSOLE/PROGRAMMER and login&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;admin/-&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NEMS Linux ===&lt;br /&gt;
[[File:nems.jpg|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''NEMS''' stands for &amp;quot;Nagios Enterprise Monitoring Server&amp;quot; and it is a modern pre-configured, customized and ready-to-deploy Nagios Core image designed to run on low-cost micro computers. To find out more on NEMS Linux, please visit their [https://nemslinux.com/ site].&lt;br /&gt;
&lt;br /&gt;
{{Outdated release}}&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://nemslinux.com/download/nagios-for-pine64.php Download torrent seed from NEMS Linux] (2.66GB, MD5 of the xz file is ''ac508549a829021491cfa23aeb18a063'')&lt;br /&gt;
* [https://files.pine64.org/os/pine-a64/nems/NEMS_v1.5-Pine64-Build1.zip Direct download from pine64.org] (2.66GB, MD5 of the xz file is ''ac508549a829021491cfa23aeb18a063'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Suitable for all 512MB/1GB/2GB PINE A64(+) variants&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;nemsadmin/nemsadmin&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
[[File:Opensuse-distribution.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''openSUSE''' is a free and open source RPM-based Linux distribution developed by the openSUSE project. More details can be found under https://en.opensuse.org/HCL:Pine64.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/Pine64/images/ Images]&lt;br /&gt;
* Headless build: [http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/Pine64/images/openSUSE-Tumbleweed-ARM-JeOS-pine64.aarch64.raw.xz Direct download]&lt;br /&gt;
&lt;br /&gt;
=== OpenWRT ===&lt;br /&gt;
[[File:Openwrt logo square.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
The '''OpenWrt''' Project is a Linux operating system targeting embedded devices.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://downloads.lede-project.org/snapshots/targets/sunxi/cortexa53/ Direct download] (look for ''pine64_pine64-baseboard-ext4-sdcard.img.gz'' and ''pine64_pine64-baseboard-squashfs-sdcard.img.gz'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* OpenWRT community build for microSD boot. &lt;br /&gt;
* This is headless build, please use serial console to configure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;-/passwd&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== BSD ==&lt;br /&gt;
&lt;br /&gt;
=== NetBSD ===&lt;br /&gt;
[[File:netbsd.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''NetBSD''' is a free, fast, secure, and highly portable Unix-like Open Source operating system. To learn more about NetBSD please visit [https://www.netbsd.org/ NetBSD main page]. &lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://www.invisible.ca/arm/ Direct download] (345MB, select ''PINE A64 / PINE A64+'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* NetBSD community build for microSD boot&lt;br /&gt;
* Instructions concerning enabling SSH can be found [https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-ssh here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Root user and SSH&lt;br /&gt;
| &amp;lt;code&amp;gt;root/[none]&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Windows 10 IoT ==&lt;br /&gt;
[[File:win10iot.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://files.pine64.org/os/pine-a64/win10-iot/PINE64_Win10IoT_TestOS_build_10.0.15063.0_20170602.ffu Windows IoT direct download] from ''pine64.org'' (957MB, MD5 of FFU file ''ACA617C0C9CEDA705DD510BF041E79B4'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* PINE64 Win10 IoT build already passed the [https://catalog.azureiotsuite.com/details?title=Allwinner_Technology_Pine64 Microsoft Azure certification]&lt;br /&gt;
* For step by step installation process, please follow this [https://github.com/Leeway213/Win10-IoT-for-A64-Release-Notes/blob/master/doc/How%20to%20flash%20ffu.md github link]&lt;br /&gt;
* For release note, please follow this [https://github.com/Leeway213/Win10-IoT-for-A64-Release-Notes/blob/master/20160809/Pine64/ReleaseNotes.md github link]&lt;br /&gt;
* For Microsoft Azure IoT SDKs, please follow this [https://github.com/Azure/azure-iot-sdks/ github link]&lt;br /&gt;
&lt;br /&gt;
Changelog for Win10 IoT 10.0.15063.0_20170602:&lt;br /&gt;
* 10.0.15063.0_20170602&lt;br /&gt;
** Update Notes since 10.0.15063.0_20170524:&lt;br /&gt;
*** Fix the failure of default application installation caused by a app certification issue&lt;br /&gt;
*** Fix that the default application cannot start automatically after installation&lt;br /&gt;
*** Fix Ethernet initialization problem and now the Ethernet will start successfully every time&lt;br /&gt;
*** Enable the usermode access for all unusable GPIO pins in Pi-2 bus( later provide a UWP sample to show how to control these pins )&lt;br /&gt;
** Extra Notes:&lt;br /&gt;
*** If you want to connect a USB peripheral for extension, please connect a USB hub to the lower USB interface as the medium&lt;br /&gt;
*** Please refer to [https://github.com/Leeway213/BSP-aw1689/blob/master/doc/Dev%20Guide.md Part 2 of chapter 3: Debug with a virtual net over USB] on how to use the upper USB interface&lt;br /&gt;
&lt;br /&gt;
* 10.0.15063.0_20170524&lt;br /&gt;
** Some Updates:&lt;br /&gt;
*** Update the OS version to build v.10.0.15063.0 (Creators Update)&lt;br /&gt;
*** New page style of Device Portal, visit https://deviceipaddr:8080 to check it&lt;br /&gt;
*** Built-in Cortana assistant, need to be enabled in settings page in default app and Device Portal&lt;br /&gt;
*** Support on-screen keyboard, need to be enabled in Device Portal&lt;br /&gt;
*** Enable 100M Ethernet and fix some bugs&lt;br /&gt;
*** Support built-in UART bus in A64 SoC(not built in the ffu, later provide driver binary and deployment helper)&lt;br /&gt;
*** Support built-in IR module in A64 SoC(not built in the ffu, later provide source code and dev doc for developers in community)&lt;br /&gt;
** Known Issues:&lt;br /&gt;
*** Kernel debug is enabled by default. This will slow the bring-up process. If a kernel debug is not necessary for you, visit Device Portal and navigate to Processes-&amp;gt;Run Command page, run this command to disable:&lt;br /&gt;
**** Bcdedit /store C:\EFIESP\EFI\Microsoft\boot\BCD /set {default} debug off&lt;br /&gt;
*** An PnP bug in audio device may cause a blue screen when acting software shutdown&lt;br /&gt;
*** Ethernet device may not start with problem code 12 at the first time to bring up&lt;br /&gt;
&lt;br /&gt;
== Linux BSP SDK ==&lt;br /&gt;
&lt;br /&gt;
Linux BSP Kernel 4.9&lt;br /&gt;
* [https://files.pine64.org/SDK/PINE-A64/PINE-A64_lichee_BSP4.9.tar.xz Direct Download] from ''pine64.org'' (5.4GB, MD5 of the TAR-GZip file ''7736e3c4d50c021144d125cc4ee047a4'')&lt;br /&gt;
&lt;br /&gt;
== Android SDK ==&lt;br /&gt;
&lt;br /&gt;
Android Oreo (v8.1)&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/SDK/PINE-A64/PINE-A64_SDK_android8.1.tar.xz Direct Download] from ''pine64.org'' (24.94GB, MD5 of the TAR-GZip file ''b0394af324c70ce28067e52cd7bc0c87'')&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Mali Driver]]&lt;br /&gt;
* [https://files.pine64.org/tools/allwinner/PhoenixCard4_1_3.zip Allwinner PhoenixCard Bootable SD-Card Creator]&lt;br /&gt;
* [https://files.pine64.org/tools/allwinner/DragonFace.zip Allwinner DragonFace software that will let you edit and modify A64 Stock Android Build PhoenixCard image]&lt;br /&gt;
&lt;br /&gt;
[[Category:PINE A64]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PINE_A64_Software_Releases&amp;diff=20547</id>
		<title>PINE A64 Software Releases</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PINE_A64_Software_Releases&amp;diff=20547"/>
		<updated>2023-08-27T08:39:17Z</updated>

		<summary type="html">&lt;p&gt;Fxc: added release&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a list of all available releases for the [[PINE A64|PINE A64(+)]], as well as links to other resources. &lt;br /&gt;
&lt;br /&gt;
Note that the PINE A64(+) images are '''not compatible with the PINE A64-LTS''' due to LPDDR3 memory configuration. For PINE A64-LTS, please use the [[SOPINE Software Releases]].&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
'''Special thanks to Sunxi community and longsleep for their contributions'''&lt;br /&gt;
&lt;br /&gt;
Below you will find useful links to various resources and forum threads:&lt;br /&gt;
* [https://linux-sunxi.org/Pine64 Sunxi PINE64 Page]&lt;br /&gt;
* [https://www.stdin.xyz/downloads/people/longsleep/tmp/pine64-images Longsleep BSP Linux Builds Download Page]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=293 Longsleep BSP Linux Kernel Thread on PINE64 Forum]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=376 Longsleep BSP Xenial Thread on PINE64 Forum]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=343 Longsleep BSP Arch Linux Thread on PINE64 Forum]&lt;br /&gt;
&lt;br /&gt;
=== AOSC ===&lt;br /&gt;
[[File:aosc.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''AOSC OS''' is a general purpose Linux distribution that strives to simplify user experience and improve free and open source software for day-to-day productivity. To learn more about AOSC, please visit the official [https://aosc.io/ AOSC website].&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* https://aosc.io/downloads/ (supports the microSD card and eMMC, 8GB or more)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;aosc/anthon&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''Arch Linux ARM''' is a distribution of Linux for ARM computers.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
* https://archlinuxarm.org/platforms/armv8/allwinner/pine64&lt;br /&gt;
&lt;br /&gt;
=== Armbian ===&lt;br /&gt;
[[File:armbian.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''Armbian''' is a Linux distribution designed for ARM boards. They are usually Debian or Ubuntu flavored.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* https://www.armbian.com/pine64/&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
[[File:Debian-logo.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''Debian''' is an operating system and a distribution of free software. See the forum thread [https://forum.pine64.org/showthread.php?tid=9744 here].&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://deb.debian.org/debian/dists/bullseye/main/installer-arm64/current/images/netboot/SD-card-images/ Debian 11 Bullseye] (recommended)&lt;br /&gt;
* [https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/SD-card-images/ Debian 12 Bookworm]&lt;br /&gt;
* [https://d-i.debian.org/daily-images/arm64/ Daily netboot images]&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
* Download: &amp;lt;code&amp;gt;firmware.pine64_plus.img.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
* Download: &amp;lt;code&amp;gt;partition.img.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
* Create the disk image:&lt;br /&gt;
** For Linux: &amp;lt;code&amp;gt;zcat firmware.pine64_plus.img.gz partition.img.gz &amp;gt; complete_image.img&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Mac: &amp;lt;code&amp;gt;gzcat firmware.pine64_plus.img.gz partition.img.gz &amp;gt; complete_image.img&amp;lt;/code&amp;gt;&lt;br /&gt;
* Write the image to your boot device:&lt;br /&gt;
** For Linux: &amp;lt;code&amp;gt;dd if=complete_image.img of=your_chosen_boot_device bs=4M&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Mac: see [[Getting started]]&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* An Ethernet connection is required for the above installer&lt;br /&gt;
&lt;br /&gt;
=== DietPi ===&lt;br /&gt;
[[File:dietpi.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''DietPi''' is a lightweight yet easy to setup and feature-rich Linux distribution, based on Debian. To find out more about DietPi, please visit the [https://dietpi.com/docs/ official documentation]. Discuss the PINE A64 build on the [https://forum.pine64.org/showthread.php?tid=12513 PINE64 forum thread].&lt;br /&gt;
&lt;br /&gt;
Download: &lt;br /&gt;
* [https://dietpi.com/downloads/images/DietPi_PINEA64-ARMv8-Bullseye.7z Debian 11 Bullseye] (supports the microSD card and eMMC, 4GB or more)&lt;br /&gt;
* [https://dietpi.com/downloads/images/DietPi_PINEA64-ARMv8-Bookworm.7z Debian 12 Bookworm] (supports the microSD card and eMMC, 4GB or more)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;root/dietpi&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FreedomBox ===&lt;br /&gt;
[[File:FreedomBox.jpg|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''FreedomBox''' is a private server for non-experts: it lets you install and configure server applications with only a few clicks. For more information about FreedomBox, please visit http://www.freedombox.org.&lt;br /&gt;
&lt;br /&gt;
{{Outdated release}}&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://ftp.freedombox.org/pub/freedombox/hardware/pine64-plus/stable/freedombox-stable-free_buster_pine64-plus-arm64.img.xz Direct download from FreedomBox site]&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* This is a headless build, not HDMI output.&lt;br /&gt;
* Please plug-in Ethernet cable first before initial power up. After power up for 10 minutes, using browser and type in https://fredombox.local to setup. Browser may warms for unsecure site and please proceed with exception.&lt;br /&gt;
* Freedom Manual: https://wiki.debian.org/FreedomBox/Manual&lt;br /&gt;
&lt;br /&gt;
=== LibreELEC ===&lt;br /&gt;
[[File:libreelec.jpg|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''LibreELEC''' is a &amp;quot;Just enough OS&amp;quot; Linux distribution combining the Kodi media center with an operating system.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* 512MB PINE A64: [https://test.libreelec.tv/ direct download] from Libreelec nightly build site (look for ''LibreELEC-A64.arm-...-nightly-xxxxxxxx-xxxxxxx-pine64.img.gz'')&lt;br /&gt;
* 1GB/2GB PINE A64+ Board: [https://test.libreelec.tv/ direct download] from Libreelec nightly build site (look for ''LibreELEC-A64.arm-...-nightly-xxxxxxxx-xxxxxxx-pine64-plus.img.gz'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Nightly build for microSD boot&lt;br /&gt;
&lt;br /&gt;
=== motionEyeOS ===&lt;br /&gt;
[[File:motioneyeos.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''motionEyeOS''' is a Linux distribution that turns a single-board computer into a video surveillance system. The OS is based on BuildRoot and uses motion as a backend and motionEye for the frontend. Visit the [https://github.com/ccrisan/motioneyeos/releases/ motionEyeOS GitHub] and its [https://github.com/ccrisan/motioneyeos/wiki GitHub Wiki] for more information&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* 1GB/2GB PINE A64(+): [https://github.com/ccrisan/motioneyeos/releases/latest Direct download from GitHub] (look for ''motioneyeos-pine64-xxxxxxxx.img.xz'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Suitable for 1GB/2GB PINE A64(+) variants&lt;br /&gt;
* There are 2 ways to interact with the OS:&lt;br /&gt;
** Scan for its IP with hostname MEYE-* and go to the admin web interface https://[PINE A64(+) motionEyeOS IP Address] and after login, you should able to see the output of the CAMERA MODULE on the web interface&lt;br /&gt;
** Use the PINE64 USB SERIAL CONSOLE/PROGRAMMER and login&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;admin/-&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NEMS Linux ===&lt;br /&gt;
[[File:nems.jpg|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''NEMS''' stands for &amp;quot;Nagios Enterprise Monitoring Server&amp;quot; and it is a modern pre-configured, customized and ready-to-deploy Nagios Core image designed to run on low-cost micro computers. To find out more on NEMS Linux, please visit their [https://nemslinux.com/ site].&lt;br /&gt;
&lt;br /&gt;
{{Outdated release}}&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://nemslinux.com/download/nagios-for-pine64.php Download torrent seed from NEMS Linux] (2.66GB, MD5 of the xz file is ''ac508549a829021491cfa23aeb18a063'')&lt;br /&gt;
* [https://files.pine64.org/os/pine-a64/nems/NEMS_v1.5-Pine64-Build1.zip Direct download from pine64.org] (2.66GB, MD5 of the xz file is ''ac508549a829021491cfa23aeb18a063'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Suitable for all 512MB/1GB/2GB PINE A64(+) variants&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;nemsadmin/nemsadmin&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
[[File:Opensuse-distribution.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''openSUSE''' is a free and open source RPM-based Linux distribution developed by the openSUSE project. More details can be found under https://en.opensuse.org/HCL:Pine64.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/Pine64/images/ Images]&lt;br /&gt;
* Headless build: [http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/Pine64/images/openSUSE-Tumbleweed-ARM-JeOS-pine64.aarch64.raw.xz Direct download]&lt;br /&gt;
&lt;br /&gt;
=== OpenWRT ===&lt;br /&gt;
[[File:Openwrt logo square.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
The '''OpenWrt''' Project is a Linux operating system targeting embedded devices.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://downloads.lede-project.org/snapshots/targets/sunxi/cortexa53/ Direct download] (look for ''pine64_pine64-baseboard-ext4-sdcard.img.gz'' and ''pine64_pine64-baseboard-squashfs-sdcard.img.gz'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* OpenWRT community build for microSD boot. &lt;br /&gt;
* This is headless build, please use serial console to configure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Default user&lt;br /&gt;
| &amp;lt;code&amp;gt;-/passwd&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== BSD ==&lt;br /&gt;
&lt;br /&gt;
=== NetBSD ===&lt;br /&gt;
[[File:netbsd.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
'''NetBSD''' is a free, fast, secure, and highly portable Unix-like Open Source operating system. To learn more about NetBSD please visit [https://www.netbsd.org/ NetBSD main page]. &lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://www.invisible.ca/arm/ Direct download] (345MB, select ''PINE A64 / PINE A64+'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* NetBSD community build for microSD boot&lt;br /&gt;
* Instructions concerning enabling SSH can be found [https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-ssh here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;background: #a7d7f9;&amp;quot;| Default credentials&lt;br /&gt;
|-&lt;br /&gt;
! Root user and SSH&lt;br /&gt;
| &amp;lt;code&amp;gt;root/[none]&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Windows 10 IoT ==&lt;br /&gt;
[[File:win10iot.png|right|100px]]&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
* [https://files.pine64.org/os/pine-a64/win10-iot/PINE64_Win10IoT_TestOS_build_10.0.15063.0_20170602.ffu Windows IoT direct download] from ''pine64.org'' (957MB, MD5 of FFU file ''ACA617C0C9CEDA705DD510BF041E79B4'')&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* PINE64 Win10 IoT build already passed the [https://catalog.azureiotsuite.com/details?title=Allwinner_Technology_Pine64 Microsoft Azure certification]&lt;br /&gt;
* For step by step installation process, please follow this [https://github.com/Leeway213/Win10-IoT-for-A64-Release-Notes/blob/master/doc/How%20to%20flash%20ffu.md github link]&lt;br /&gt;
* For release note, please follow this [https://github.com/Leeway213/Win10-IoT-for-A64-Release-Notes/blob/master/20160809/Pine64/ReleaseNotes.md github link]&lt;br /&gt;
* For Microsoft Azure IoT SDKs, please follow this [https://github.com/Azure/azure-iot-sdks/ github link]&lt;br /&gt;
&lt;br /&gt;
Changelog for Win10 IoT 10.0.15063.0_20170602:&lt;br /&gt;
* 10.0.15063.0_20170602&lt;br /&gt;
** Update Notes since 10.0.15063.0_20170524:&lt;br /&gt;
*** Fix the failure of default application installation caused by a app certification issue&lt;br /&gt;
*** Fix that the default application cannot start automatically after installation&lt;br /&gt;
*** Fix Ethernet initialization problem and now the Ethernet will start successfully every time&lt;br /&gt;
*** Enable the usermode access for all unusable GPIO pins in Pi-2 bus( later provide a UWP sample to show how to control these pins )&lt;br /&gt;
** Extra Notes:&lt;br /&gt;
*** If you want to connect a USB peripheral for extension, please connect a USB hub to the lower USB interface as the medium&lt;br /&gt;
*** Please refer to [https://github.com/Leeway213/BSP-aw1689/blob/master/doc/Dev%20Guide.md Part 2 of chapter 3: Debug with a virtual net over USB] on how to use the upper USB interface&lt;br /&gt;
&lt;br /&gt;
* 10.0.15063.0_20170524&lt;br /&gt;
** Some Updates:&lt;br /&gt;
*** Update the OS version to build v.10.0.15063.0 (Creators Update)&lt;br /&gt;
*** New page style of Device Portal, visit https://deviceipaddr:8080 to check it&lt;br /&gt;
*** Built-in Cortana assistant, need to be enabled in settings page in default app and Device Portal&lt;br /&gt;
*** Support on-screen keyboard, need to be enabled in Device Portal&lt;br /&gt;
*** Enable 100M Ethernet and fix some bugs&lt;br /&gt;
*** Support built-in UART bus in A64 SoC(not built in the ffu, later provide driver binary and deployment helper)&lt;br /&gt;
*** Support built-in IR module in A64 SoC(not built in the ffu, later provide source code and dev doc for developers in community)&lt;br /&gt;
** Known Issues:&lt;br /&gt;
*** Kernel debug is enabled by default. This will slow the bring-up process. If a kernel debug is not necessary for you, visit Device Portal and navigate to Processes-&amp;gt;Run Command page, run this command to disable:&lt;br /&gt;
**** Bcdedit /store C:\EFIESP\EFI\Microsoft\boot\BCD /set {default} debug off&lt;br /&gt;
*** An PnP bug in audio device may cause a blue screen when acting software shutdown&lt;br /&gt;
*** Ethernet device may not start with problem code 12 at the first time to bring up&lt;br /&gt;
&lt;br /&gt;
== Linux BSP SDK ==&lt;br /&gt;
&lt;br /&gt;
Linux BSP Kernel 4.9&lt;br /&gt;
* [https://files.pine64.org/SDK/PINE-A64/PINE-A64_lichee_BSP4.9.tar.xz Direct Download] from ''pine64.org'' (5.4GB, MD5 of the TAR-GZip file ''7736e3c4d50c021144d125cc4ee047a4'')&lt;br /&gt;
&lt;br /&gt;
== Android SDK ==&lt;br /&gt;
&lt;br /&gt;
Android Oreo (v8.1)&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/SDK/PINE-A64/PINE-A64_SDK_android8.1.tar.xz Direct Download] from ''pine64.org'' (24.94GB, MD5 of the TAR-GZip file ''b0394af324c70ce28067e52cd7bc0c87'')&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Mali Driver]]&lt;br /&gt;
* [https://files.pine64.org/tools/allwinner/PhoenixCard4_1_3.zip Allwinner PhoenixCard Bootable SD-Card Creator]&lt;br /&gt;
* [https://files.pine64.org/tools/allwinner/DragonFace.zip Allwinner DragonFace software that will let you edit and modify A64 Stock Android Build PhoenixCard image]&lt;br /&gt;
&lt;br /&gt;
[[Category:PINE A64]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab2_FAQ&amp;diff=20537</id>
		<title>PineTab2 FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab2_FAQ&amp;diff=20537"/>
		<updated>2023-08-16T18:11:37Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Performing USB Tethering with a KaiOS phone */ removed side comment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a collection of tutorials and frequently asked questions for the [[PineTab2]].&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Putting the Device into Maskrom Mode ===&lt;br /&gt;
&lt;br /&gt;
To recover from a bad eMMC/SPI flash, plug the included debug adapter into the charging USB-C port and switch the white switch to its &amp;quot;ON&amp;quot; position to bypass eMMC/SPI boot. This tries to boot from SD, and if no SD is inserted, enters Maskrom mode.&lt;br /&gt;
&lt;br /&gt;
=== Networking using USB ===&lt;br /&gt;
&lt;br /&gt;
Until the internal BES2600 WIFI has a stable driver, the community suggests that you connect using USB. This section summarizes the more detailed information in [[File:PineTab2_USB_Guide.pdf]], which covers connecting via [[#Performing USB Tethering with an Android Phone|a tethered Android phone]], [[#Selecting a USB WIFI Adapter|a suitable USB WIFI adapter]], a wired USB Ethernet adapter, and a tethered iOS device.&lt;br /&gt;
&lt;br /&gt;
==== Selecting a USB WIFI Adapter ====&lt;br /&gt;
&lt;br /&gt;
Insert a supported WIFI dongle in the upper USB port, using a USB-C to USB-A adapter as necessary. As a general rule, single state adapters are recommended. Even better, select one from this list: https://github.com/morrownr/USB-WiFi/blob/main/home/The_Short_List.md&lt;br /&gt;
&lt;br /&gt;
If you must use a multi-state adapter and it isn't recognized by the kernel, you can try ejecting the device. This ''should'' force it back into adapter mode. If this does not work, you can try installing [https://man.archlinux.org/man/usb_modeswitch.1.en usb_modeswitch] to troubleshoot. You will need to temporarily use another method to get internet (such as phone tethering below) or load the package on an SD card to install it.&lt;br /&gt;
&lt;br /&gt;
==== Performing USB Tethering with an Android Phone ====&lt;br /&gt;
&lt;br /&gt;
This guide simply describes HOW to undertake this option. The user is responsible for ensuring that their wireless plan permits such use, and for any fees incurred.&lt;br /&gt;
&lt;br /&gt;
You can use an Android phone as a network adapter.&lt;br /&gt;
&lt;br /&gt;
You'll need:&lt;br /&gt;
&lt;br /&gt;
* An Android phone&lt;br /&gt;
* A USB OTG adapter (or the USB-C to USB-C cable)&lt;br /&gt;
* Some knowledge of your variation of Android&lt;br /&gt;
&lt;br /&gt;
Do the following in order:&lt;br /&gt;
&lt;br /&gt;
* Plug in the device to the PineTab2 using the USB cable and a USB OTG adapter&lt;br /&gt;
* On your android phone, open the settings app (specifics from here may vary on version)&lt;br /&gt;
** Navigate to &amp;quot;Network &amp;amp; Internet&amp;quot;&lt;br /&gt;
** Navigate to &amp;quot;Hotspot &amp;amp; Tethering&amp;quot;&lt;br /&gt;
** Tap on &amp;quot;USB Tethering&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You should now see a new network interface on the PineTab2.&lt;br /&gt;
&lt;br /&gt;
==== Performing USB Tethering with an iPhone ====&lt;br /&gt;
&lt;br /&gt;
Prerequisite:&lt;br /&gt;
&lt;br /&gt;
On the iPhone make sure that Settings -&amp;gt; Personal Hotspot -&amp;gt; Allow others to join is turned on.&lt;br /&gt;
&lt;br /&gt;
# Use an Lightning (Apple) to USB-C (Pinetab2) cable to connect the devices.&lt;br /&gt;
# In the Pinetab make sure to use the USB-C port next to the volume keys.&lt;br /&gt;
# Once the cable is connected open your iPhone.&lt;br /&gt;
# You will see a request to trust the new device. Trust it.&lt;br /&gt;
# Confirm by typing in your Apple Device PIN&lt;br /&gt;
&lt;br /&gt;
This should be it. The Pinetab2 will show you the new device and the network connects to `Wired connection 1`&lt;br /&gt;
&lt;br /&gt;
Make sure to open the iPhone once you reconnect.&lt;br /&gt;
&lt;br /&gt;
==== Performing USB Tethering with a KaiOS phone ====&lt;br /&gt;
&lt;br /&gt;
This guide simply describes HOW to undertake this option. The user is responsible for ensuring that their wireless plan permits such use, and for any fees incurred.&lt;br /&gt;
&lt;br /&gt;
You can use a KaiOS phone for mobile Internet use with your PineTab2.&lt;br /&gt;
&lt;br /&gt;
You'll need:&lt;br /&gt;
&lt;br /&gt;
* A KaiOS phone&lt;br /&gt;
* A USB OTG adapter&lt;br /&gt;
* Your device’s charging cable&lt;br /&gt;
* Some knowledge of your KaiOS phone&lt;br /&gt;
&lt;br /&gt;
Do the following in order:&lt;br /&gt;
&lt;br /&gt;
* Plug the device into the PineTab2 using the USB cable and a USB OTG adapter&lt;br /&gt;
* On your KaiOS phone, open settings (specifics from here may vary on version)&lt;br /&gt;
* Navigate to &amp;quot;Network &amp;amp; Connectivity&amp;quot;&lt;br /&gt;
* Navigate to &amp;quot;Internet Sharing&amp;quot;&lt;br /&gt;
* Select &amp;quot;USB&amp;quot; and select On under USB tethering (Note: This option will be greyed out unless connected to the PineTab2)&lt;br /&gt;
&lt;br /&gt;
You should now see a new network interface on the PineTab2 and it should show a wired connection icon.&lt;br /&gt;
&lt;br /&gt;
=== Screen Rotation ===&lt;br /&gt;
==== Auto-rotating the Screen ====&lt;br /&gt;
Auto-rotation is handled by your operating system. However, the following general steps should work on distributions that support iio-sensor-proxy:&lt;br /&gt;
&lt;br /&gt;
* To enable auto-rotation, install the iio-sensor-proxy package: &amp;lt;code&amp;gt;sudo pacman -S iio-sensor-proxy&amp;lt;/code&amp;gt; and reboot.&lt;br /&gt;
* Some desktop environments, such as KDE, default to only allowing screen rotation while in tablet mode (detached from the case.) To enable it with the keyboard attached, go to System Settings--&amp;gt;Display and Monitor -&amp;gt; Display Configuration -&amp;gt; Uncheck &amp;quot;Only when in tablet mode&amp;quot; and click &amp;quot;Apply.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Rotating the Login Screen ====&lt;br /&gt;
Login screen orientation is handled by your operating system. Below are the instructions for the SDDM login screen that ships with the factory image:&lt;br /&gt;
&lt;br /&gt;
By default, the login screen is set to display in portrait mode. If you wish to change it to landscape mode to match the keyboard while in the case, use the following steps ([https://forum.pine64.org/showthread.php?tid=18313 Credit to chzbacon]) :&lt;br /&gt;
&lt;br /&gt;
* Install necessary software: &amp;lt;code&amp;gt;sudo pacman -S xorg-xrandr xorg-xinput&amp;lt;/code&amp;gt;&lt;br /&gt;
* Edit /usr/share/sddm/scripts/Xsetup. For example, using nano: &amp;lt;code&amp;gt;sudo nano /usr/share/sddm/scripts/Xsetup&amp;lt;/code&amp;gt; and add the following two lines to the end of file:&lt;br /&gt;
** &amp;lt;code&amp;gt;xrandr --output DSI-1 --mode 800x1280 --rate 60.00 --rotate right&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;xinput set-prop &amp;quot;pointer:Goodix Capacitive TouchScreen&amp;quot; --type=float &amp;quot;Coordinate Transformation Matrix&amp;quot; 0 1 0 -1 0 1 0 0 1&amp;lt;/code&amp;gt;&lt;br /&gt;
* Now edit /etc/sddm.conf.d/sddm.conf, for example: &amp;lt;code&amp;gt;sudo nano /etc/sddm.conf.d/sddm.conf&amp;lt;/code&amp;gt; and add the following two lines (case sensitive):&lt;br /&gt;
** &amp;lt;code&amp;gt;[X11]&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;DisplayCommand=/usr/share/sddm/scripts/Xsetup&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reboot, and your login screen should now display in landscape mode.&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
==== How does the PineTab2 compare to the Pinebook Pro? ====&lt;br /&gt;
It's slower, as it is intended to be a successor to the PineTab1, not the Pinebook Pro. It'll still handle web browsing, video playback and documents fine though.&lt;br /&gt;
&lt;br /&gt;
==== What is the Performance of the PineTab2 compared to the PineTab-V? ====&lt;br /&gt;
The PineTab2 is notably faster than the PineTab-V. You can see this by [https://github.com/ThomasKaiser/sbc-bench/blob/master/Results.md comparing the Quartz64 sbc-bench results to the Star64 ones]. Performance should not be a factor of consideration when purchasing a PineTab-V.&lt;br /&gt;
&lt;br /&gt;
==== I am a casual user with minimal Linux experience. Is this device for me? ====&lt;br /&gt;
The PineTab 2 is considered early release at this point, and the community is expected to develop support for it over time. For example, the [[PineTab2#Known_Issues]] page details several features that are not yet fully working. You may at times need to troubleshoot this device and some development experience is ideal if you want to realize the tablet's full potential at this stage.&lt;br /&gt;
&lt;br /&gt;
For these reasons, the PineTab2 may not be the ideal device for casual users. However, if you feel up to the challenge and want to learn while joining a great community, you are more than welcome! Please join one of our [[Main_Page#Chat_Platforms|chat platforms]]: the community is always happy to help!&lt;br /&gt;
&lt;br /&gt;
==== What works, what doesn't? ====&lt;br /&gt;
&lt;br /&gt;
Please see [[PineTab2#Known_Issues]].&lt;br /&gt;
&lt;br /&gt;
==== I only know Python, can I help with drivers? ====&lt;br /&gt;
Drivers are (at least typically) written in the C programming language. Unfortunately, there is no way to &amp;quot;code drivers in Python&amp;quot; because usually drivers need to access and process memory allocation directly. If you feel like this is interesting to you, we suggest you to spend some time learning the C programming language, maybe with an emphasis in device driver development. The good news is that, since you already know a programming language, you already know part of the skill.&lt;br /&gt;
&lt;br /&gt;
In short, you can only help with drivers development if you learn the C programming language first.&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
==== Does the Tablet support a Pen? ====&lt;br /&gt;
No, adding a digitiser for pen inputs would make the price too high.&lt;br /&gt;
&lt;br /&gt;
==== Is there SPI Flash? ====&lt;br /&gt;
Yes! A 128 Mbit flash chip (sk25lp128) is reportedly present on production devices.&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
==== What operating systems are currently available? ====&lt;br /&gt;
The PineTab2 uses ARM operating systems. Please see [[PineTab2 Releases]] for a current list of software releases.&lt;br /&gt;
&lt;br /&gt;
==== How can I install an operating system on the SD card / eMMC? ====&lt;br /&gt;
&lt;br /&gt;
See the article [[PineTab2]].&lt;br /&gt;
&lt;br /&gt;
==== Can I run Android on it? ====&lt;br /&gt;
&lt;br /&gt;
Theoretically yes, practically there's little chance anyone wants to make a well-supported Android build for this device. If you're looking for an Android tablet, buy any mainstream tablet, and you'll get better value for your money.&lt;br /&gt;
&lt;br /&gt;
However, if you just need to run a few simple android apps, you might want to have a look at [https://docs.waydro.id/usage/install-on-desktops Waydroid] which can be installed on Arch Linux ARM using the following command: &amp;lt;code&amp;gt;sudo pacman -S waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting ===&lt;br /&gt;
&lt;br /&gt;
==== What's the boot order for SD cards and eMMC? ====&lt;br /&gt;
&lt;br /&gt;
The SPI and the internal memory (eMMC) have a higher boot priority than the microSD card. Please see the [[PineTab2]] for more detailed information.&lt;br /&gt;
&lt;br /&gt;
==== Can I install a different OS on my PineTab2? ====&lt;br /&gt;
&lt;br /&gt;
Yes! While all PineTab2 come with an OS preinstalled, you are free to use any OS on the integrated storage (the eMMC) or an SD card. See [[PineTab2]] and [[PineTab2 Releases]] for how to install them.&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth ===&lt;br /&gt;
&lt;br /&gt;
==== The Bluetooth isn't working ====&lt;br /&gt;
&lt;br /&gt;
The BES2600 Bluetooth driver still needs to be implemented. Please see the [[#Networking Using USB]] section above for a workaround.&lt;br /&gt;
&lt;br /&gt;
=== Wi-Fi ===&lt;br /&gt;
&lt;br /&gt;
==== The Wi-Fi isn't working ====&lt;br /&gt;
The [https://gitlab.com/TuxThePenguin0/bes2600 BES2600 Wi-Fi driver] needs major cleanup and bugfixing: at the moment it causes system crashes. Please see the [[#Networking Using USB]] section above for a workaround.&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
&lt;br /&gt;
==== Can PineTab2 play back DRM content such as Netflix? ====&lt;br /&gt;
&lt;br /&gt;
Yes, though the specific implementation depends on your installed operating system.&lt;br /&gt;
&lt;br /&gt;
On the default Arch Linux Arm: Widevine, using the `widevine-aarch64` package in the AUR is working, and was demonstrated on the PineTab2 using Paramount+ and Disney+. Install it (`yay -S widevine-aarch64`), run the included register script to get Firefox to recognize it, and it should start working.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Rockchip RK3566]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20534</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20534"/>
		<updated>2023-08-14T14:16:09Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]].&lt;br /&gt;
&lt;br /&gt;
Further instructions regarding ''rk2aw'' can be found on megi's website under https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL.&lt;br /&gt;
&lt;br /&gt;
== MicroSD card ==&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
Requirements: SSH connection from Linux machine to PinePhone Pro, internet connection.&lt;br /&gt;
&lt;br /&gt;
{{Info|Loader and userspace utility to flash it are free, but not open-source.}}&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;'' # start ssh connection''&lt;br /&gt;
 cd ~/Downloads'' # enter to directory''&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz'' # download installer''&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads'' # extract''&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh'' # flash SPI''&lt;br /&gt;
&lt;br /&gt;
=== Flash Multi-Distro SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images and decompress them (i.e. Manjaro Phosh beta 34, Mobian, Arch Linux)&lt;br /&gt;
&lt;br /&gt;
Mount distribution images both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; for each distribution.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 or sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 32 GB for the microSD card is recommended.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb/ &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=10G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=10G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 lsblk'' # list partitions on sd and mounted distro images''&lt;br /&gt;
  Device        Start      End        Sectors    Size	 Type&lt;br /&gt;
  /dev/sdb1     64         32767      32704      16M     unknown&lt;br /&gt;
  /dev/sdb2     32768      16809983   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb3     16809984   33587199   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb4     33587200   60524543   26937344   12.8G   Linux filesystem&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Arch Linux ARM ====&lt;br /&gt;
&lt;br /&gt;
 sudo su'' # login with your psw''&lt;br /&gt;
 dd if=/dev/loop2p2 of=/dev/sdb2 bs=1M status=progress conv=fsync'' # copy rootfs to sd part2''&lt;br /&gt;
 mount /dev/sdb2 /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
 scp -r /media/xxx/52CA-6165/* /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot'' # copy bootfs to to part2/boot''&lt;br /&gt;
 mv /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/boot.scr /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&amp;lt;del&amp;gt;1&amp;lt;/del&amp;gt;/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 nano /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/etc/fstab'' # add PARTLABEL=ALARM and delete UUID=xxx from second line, delete /boot entry''&lt;br /&gt;
 mkdir /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL ALarm&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Manjaro ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/sdb3 bs=1M status=progress conv=fsync'' # copy rootfs to sd part3''&lt;br /&gt;
 mount /dev/sdb3 /media/xxx/ROOT_MNJRO1/&lt;br /&gt;
 scp -r /media/xxx/BOOT_MNJRO/* /media/xxx/ROOT_MNJRO1/boot'' # copy bootfs to to part3/boot''&lt;br /&gt;
 nano /media/xxx/ROOT_MNJRO1/etc/fstab'' # change UUID=xxx to PARTLABEL=MANJARO, delete /boot line''&lt;br /&gt;
 mv /media/xxx/ROOT_MNJRO1/boot/boot.scr /media/xxx/ROOT_MNJRO1/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 mkdir /media/xxx/ROOT_MNJRO1/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL Manjaro&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Mobian ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/sdb4 bs=1M status=progress conv=fsync'' # copy rootfs to microSD card partition 4''&lt;br /&gt;
 mount /dev/sdb4 /media/xxx/rootfs1/&lt;br /&gt;
 scp -r /media/xxx/boot/* /media/xxx/rootfs1/boot'' # copy bootfs to to part4/boot''&lt;br /&gt;
 nano /media/xxx/rootfs1/etc/fstab'' # replace UUID=xxx with PARTLABEL=MOBIAN and delete UUID=xxx from second line. Delete /boot line''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/rootfs1/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  default l0&lt;br /&gt;
  menu title Pinephone Pro Boot Menu&lt;br /&gt;
  prompt 0&lt;br /&gt;
  timeout 10 &lt;br /&gt;
  label l0&lt;br /&gt;
   menu label Mobian 63&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.3-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.3-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.3-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  label l1&lt;br /&gt;
   menu label Mobian 61&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.1-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.1-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.1-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
== eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the Images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh Partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO Partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
=== Follow-Up Comments ===&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - ''sudo resize2fs'' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20533</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20533"/>
		<updated>2023-08-14T14:10:21Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]].&lt;br /&gt;
&lt;br /&gt;
== MicroSD card ==&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
References: https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL, https://xnux.eu/rk2aw/ and https://xff.cz/git/u-boot/log/?h=ppp-2023.07&lt;br /&gt;
&lt;br /&gt;
Requirements: SSH connection from Linux machine to PinePhone Pro, internet connection.&lt;br /&gt;
&lt;br /&gt;
{{Info|Loader and userspace utility to flash it are free, but not open-source.}}&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;'' # start ssh connection''&lt;br /&gt;
 cd ~/Downloads'' # enter to directory''&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz'' # download installer''&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads'' # extract''&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh'' # flash SPI''&lt;br /&gt;
&lt;br /&gt;
=== Flash Multi-Distro SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images and decompress them (i.e. Manjaro Phosh beta 34, Mobian, Arch Linux)&lt;br /&gt;
&lt;br /&gt;
Mount distribution images both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; for each distribution.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 or sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 32 GB for the microSD card is recommended.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb/ &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=10G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=10G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 lsblk'' # list partitions on sd and mounted distro images''&lt;br /&gt;
  Device        Start      End        Sectors    Size	 Type&lt;br /&gt;
  /dev/sdb1     64         32767      32704      16M     unknown&lt;br /&gt;
  /dev/sdb2     32768      16809983   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb3     16809984   33587199   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb4     33587200   60524543   26937344   12.8G   Linux filesystem&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Arch Linux ARM ====&lt;br /&gt;
&lt;br /&gt;
 sudo su'' # login with your psw''&lt;br /&gt;
 dd if=/dev/loop2p2 of=/dev/sdb2 bs=1M status=progress conv=fsync'' # copy rootfs to sd part2''&lt;br /&gt;
 mount /dev/sdb2 /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
 scp -r /media/xxx/52CA-6165/* /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot'' # copy bootfs to to part2/boot''&lt;br /&gt;
 mv /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/boot.scr /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&amp;lt;del&amp;gt;1&amp;lt;/del&amp;gt;/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 nano /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/etc/fstab'' # add PARTLABEL=ALARM and delete UUID=xxx from second line, delete /boot entry''&lt;br /&gt;
 mkdir /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL ALarm&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Manjaro ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/sdb3 bs=1M status=progress conv=fsync'' # copy rootfs to sd part3''&lt;br /&gt;
 mount /dev/sdb3 /media/xxx/ROOT_MNJRO1/&lt;br /&gt;
 scp -r /media/xxx/BOOT_MNJRO/* /media/xxx/ROOT_MNJRO1/boot'' # copy bootfs to to part3/boot''&lt;br /&gt;
 nano /media/xxx/ROOT_MNJRO1/etc/fstab'' # change UUID=xxx to PARTLABEL=MANJARO, delete /boot line''&lt;br /&gt;
 mv /media/xxx/ROOT_MNJRO1/boot/boot.scr /media/xxx/ROOT_MNJRO1/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 mkdir /media/xxx/ROOT_MNJRO1/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL Manjaro&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Mobian ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/sdb4 bs=1M status=progress conv=fsync'' # copy rootfs to microSD card partition 4''&lt;br /&gt;
 mount /dev/sdb4 /media/xxx/rootfs1/&lt;br /&gt;
 scp -r /media/xxx/boot/* /media/xxx/rootfs1/boot'' # copy bootfs to to part4/boot''&lt;br /&gt;
 nano /media/xxx/rootfs1/etc/fstab'' # replace UUID=xxx with PARTLABEL=MOBIAN and delete UUID=xxx from second line. Delete /boot line''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/rootfs1/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  default l0&lt;br /&gt;
  menu title Pinephone Pro Boot Menu&lt;br /&gt;
  prompt 0&lt;br /&gt;
  timeout 10 &lt;br /&gt;
  label l0&lt;br /&gt;
   menu label Mobian 63&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.3-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.3-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.3-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  label l1&lt;br /&gt;
   menu label Mobian 61&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.1-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.1-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.1-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
== eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash rk2aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the Images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh Partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO Partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
=== Follow-Up Comments ===&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - '''sudo resize2fs''' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20532</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20532"/>
		<updated>2023-08-14T14:09:01Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Flash Multi-Distro SD Card */ style&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]].&lt;br /&gt;
&lt;br /&gt;
== MicroSD card ==&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
References: https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL, https://xnux.eu/rk2aw/ and https://xff.cz/git/u-boot/log/?h=ppp-2023.07&lt;br /&gt;
&lt;br /&gt;
Requirements: SSH connection from Linux machine to PinePhone Pro, internet connection.&lt;br /&gt;
&lt;br /&gt;
{{Info|Loader and userspace utility to flash it are free, but not open-source.}}&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;'' # start ssh connection''&lt;br /&gt;
 cd ~/Downloads'' # enter to directory''&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz'' # download installer''&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads'' # extract''&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh'' # flash SPI''&lt;br /&gt;
&lt;br /&gt;
=== Flash Multi-Distro SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images and decompress them (i.e. Manjaro Phosh beta 34, Mobian, Arch Linux)&lt;br /&gt;
&lt;br /&gt;
Mount distribution images both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; for each distribution.&lt;br /&gt;
&lt;br /&gt;
 lsblk ''# show /loop, /sd references''&lt;br /&gt;
 blkid ''# show UUID for the partition''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk ''(after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 or sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition the microSD card ====&lt;br /&gt;
&lt;br /&gt;
{{Info|A minimum capacity of 32 GB for the microSD card is recommended.}}&lt;br /&gt;
&lt;br /&gt;
 sudo sfdisk /dev/sdb/ &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=10G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=10G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 lsblk'' # list partitions on sd and mounted distro images''&lt;br /&gt;
  Device        Start      End        Sectors    Size	 Type&lt;br /&gt;
  /dev/sdb1     64         32767      32704      16M     unknown&lt;br /&gt;
  /dev/sdb2     32768      16809983   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb3     16809984   33587199   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb4     33587200   60524543   26937344   12.8G   Linux filesystem&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Arch Linux ARM ====&lt;br /&gt;
&lt;br /&gt;
 sudo su'' # login with your psw''&lt;br /&gt;
 dd if=/dev/loop2p2 of=/dev/sdb2 bs=1M status=progress conv=fsync'' # copy rootfs to sd part2''&lt;br /&gt;
 mount /dev/sdb2 /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
 scp -r /media/xxx/52CA-6165/* /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot'' # copy bootfs to to part2/boot''&lt;br /&gt;
 mv /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/boot.scr /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&amp;lt;del&amp;gt;1&amp;lt;/del&amp;gt;/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 nano /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/etc/fstab'' # add PARTLABEL=ALARM and delete UUID=xxx from second line, delete /boot entry''&lt;br /&gt;
 mkdir /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL ALarm&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Manjaro ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/sdb3 bs=1M status=progress conv=fsync'' # copy rootfs to sd part3''&lt;br /&gt;
 mount /dev/sdb3 /media/xxx/ROOT_MNJRO1/&lt;br /&gt;
 scp -r /media/xxx/BOOT_MNJRO/* /media/xxx/ROOT_MNJRO1/boot'' # copy bootfs to to part3/boot''&lt;br /&gt;
 nano /media/xxx/ROOT_MNJRO1/etc/fstab'' # change UUID=xxx to PARTLABEL=MANJARO, delete /boot line''&lt;br /&gt;
 mv /media/xxx/ROOT_MNJRO1/boot/boot.scr /media/xxx/ROOT_MNJRO1/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 mkdir /media/xxx/ROOT_MNJRO1/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL Manjaro&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Mobian ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/sdb4 bs=1M status=progress conv=fsync'' # copy rootfs to microSD card partition 4''&lt;br /&gt;
 mount /dev/sdb4 /media/xxx/rootfs1/&lt;br /&gt;
 scp -r /media/xxx/boot/* /media/xxx/rootfs1/boot'' # copy bootfs to to part4/boot''&lt;br /&gt;
 nano /media/xxx/rootfs1/etc/fstab'' # replace UUID=xxx with PARTLABEL=MOBIAN and delete UUID=xxx from second line. Delete /boot line''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/rootfs1/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  default l0&lt;br /&gt;
  menu title Pinephone Pro Boot Menu&lt;br /&gt;
  prompt 0&lt;br /&gt;
  timeout 10 &lt;br /&gt;
  label l0&lt;br /&gt;
   menu label Mobian 63&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.3-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.3-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.3-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  label l1&lt;br /&gt;
   menu label Mobian 61&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.1-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.1-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.1-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
== eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the Images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh Partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO Partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
=== Follow-Up Comments ===&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - '''sudo resize2fs''' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20531</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20531"/>
		<updated>2023-08-14T14:06:56Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Wiki style fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to install megi's [https://xnux.eu/rk2aw/ rk2aw loader], U-Boot and a multi-distribution image to the microSD card and eMMC of the [[PinePhone Pro]].&lt;br /&gt;
&lt;br /&gt;
== MicroSD card ==&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
References: https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL, https://xnux.eu/rk2aw/ and https://xff.cz/git/u-boot/log/?h=ppp-2023.07&lt;br /&gt;
&lt;br /&gt;
Requirements: SSH connection from Linux machine to PinePhone Pro, internet connection.&lt;br /&gt;
&lt;br /&gt;
{{Info|Loader and userspace utility to flash it are free, but not open-source.}}&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhone Pro to a Linux machine&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;'' # start ssh connection''&lt;br /&gt;
 cd ~/Downloads'' # enter to directory''&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz'' # download installer''&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads'' # extract''&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh'' # flash SPI''&lt;br /&gt;
&lt;br /&gt;
=== Flash Multi-Distro SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images and decompress them (i.e. Manjaro Phosh beta 34, Mobian, Arch Linux)&lt;br /&gt;
&lt;br /&gt;
Mount distribution images both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; for each distro&lt;br /&gt;
&lt;br /&gt;
 lsblk'' # show /loop, /sd references''&lt;br /&gt;
 blkid'' show UUID for the partition''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk '' (after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 or sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition SD Card (min 32GB) ====&lt;br /&gt;
 sudo sfdisk /dev/sdb/ &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=10G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=10G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 lsblk'' # list partitions on sd and mounted distro images''&lt;br /&gt;
  Device        Start      End        Sectors    Size	 Type&lt;br /&gt;
  /dev/sdb1     64         32767      32704      16M     unknown&lt;br /&gt;
  /dev/sdb2     32768      16809983   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb3     16809984   33587199   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb4     33587200   60524543   26937344   12.8G   Linux filesystem&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Arch Linux ARM ====&lt;br /&gt;
&lt;br /&gt;
 sudo su'' # login with your psw''&lt;br /&gt;
 dd if=/dev/loop2p2 of=/dev/sdb2 bs=1M status=progress conv=fsync'' # copy rootfs to sd part2''&lt;br /&gt;
 mount /dev/sdb2 /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
 scp -r /media/xxx/52CA-6165/* /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot'' # copy bootfs to to part2/boot''&lt;br /&gt;
 mv /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/boot.scr /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&amp;lt;del&amp;gt;1&amp;lt;/del&amp;gt;/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 nano /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/etc/fstab'' # add PARTLABEL=ALARM and delete UUID=xxx from second line, delete /boot entry''&lt;br /&gt;
 mkdir /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL ALarm&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Manjaro ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/sdb3 bs=1M status=progress conv=fsync'' # copy rootfs to sd part3''&lt;br /&gt;
 mount /dev/sdb3 /media/xxx/ROOT_MNJRO1/&lt;br /&gt;
 scp -r /media/xxx/BOOT_MNJRO/* /media/xxx/ROOT_MNJRO1/boot'' # copy bootfs to to part3/boot''&lt;br /&gt;
 nano /media/xxx/ROOT_MNJRO1/etc/fstab'' # change UUID=xxx to PARTLABEL=MANJARO, delete /boot line''&lt;br /&gt;
 mv /media/xxx/ROOT_MNJRO1/boot/boot.scr /media/xxx/ROOT_MNJRO1/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 mkdir /media/xxx/ROOT_MNJRO1/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL Manjaro&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Mobian ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/sdb4 bs=1M status=progress conv=fsync'' # copy rootfs to microSD card partition 4''&lt;br /&gt;
 mount /dev/sdb4 /media/xxx/rootfs1/&lt;br /&gt;
 scp -r /media/xxx/boot/* /media/xxx/rootfs1/boot'' # copy bootfs to to part4/boot''&lt;br /&gt;
 nano /media/xxx/rootfs1/etc/fstab'' # replace UUID=xxx with PARTLABEL=MOBIAN and delete UUID=xxx from second line. Delete /boot line''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/rootfs1/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  default l0&lt;br /&gt;
  menu title Pinephone Pro Boot Menu&lt;br /&gt;
  prompt 0&lt;br /&gt;
  timeout 10 &lt;br /&gt;
  label l0&lt;br /&gt;
   menu label Mobian 63&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.3-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.3-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.3-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  label l1&lt;br /&gt;
   menu label Mobian 61&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.1-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.1-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.1-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
== eMMC ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to overwrite the eMMC. Note that below, Arch is booted from the microSD card and the microSD card is listed as the device '''/dev/mmcblk1'''.&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw loader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the Images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh Partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO Partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
=== Follow-Up Comments ===&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - '''sudo resize2fs''' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20530</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20530"/>
		<updated>2023-08-14T14:00:02Z</updated>

		<summary type="html">&lt;p&gt;Fxc: /* Rk2Aw PreLoader, U-Boot &amp;amp; Multi-Distro on eMMC for PinePhonePro */ Moved image up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rk2Aw PreLoader, U-Boot &amp;amp; Multi-Distro on SD Card for PinePhonePro ==&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
References: https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL, https://xnux.eu/rk2aw/ and https://xff.cz/git/u-boot/log/?h=ppp-2023.07&lt;br /&gt;
&lt;br /&gt;
Requirements: SSH connection from linux machine to PinePhonePro, internet connection.&lt;br /&gt;
&lt;br /&gt;
Note: Preloader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
Thanks: Megi at https://xnux.eu/log/ for the PreLoader and U-Boot, and Chris Norris for improving this guide.&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw PreLoader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhonePro to a Linux machine&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;'' # start ssh connection''&lt;br /&gt;
 cd ~/Downloads'' # enter to directory''&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz'' # download installer''&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads'' # extract''&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh'' # flash SPI''&lt;br /&gt;
&lt;br /&gt;
=== Flash Multi-Distro SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images and decompress them (i.e. Manjaro Phosh beta 34, Mobian, Arch Linux)&lt;br /&gt;
&lt;br /&gt;
Mount distribution images both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; for each distro&lt;br /&gt;
&lt;br /&gt;
 lsblk'' # show /loop, /sd references''&lt;br /&gt;
 blkid'' show UUID for the partition''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk '' (after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 or sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition SD Card (min 32GB) ====&lt;br /&gt;
 sudo sfdisk /dev/sdb/ &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=10G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=10G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 lsblk'' # list partitions on sd and mounted distro images''&lt;br /&gt;
  Device        Start      End        Sectors    Size	 Type&lt;br /&gt;
  /dev/sdb1     64         32767      32704      16M     unknown&lt;br /&gt;
  /dev/sdb2     32768      16809983   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb3     16809984   33587199   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb4     33587200   60524543   26937344   12.8G   Linux filesystem&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Arch Linux ARM ====&lt;br /&gt;
&lt;br /&gt;
 sudo su'' # login with your psw''&lt;br /&gt;
 dd if=/dev/loop2p2 of=/dev/sdb2 bs=1M status=progress conv=fsync'' # copy rootfs to sd part2''&lt;br /&gt;
 mount /dev/sdb2 /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
 scp -r /media/xxx/52CA-6165/* /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot'' # copy bootfs to to part2/boot''&lt;br /&gt;
 mv /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/boot.scr /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&amp;lt;del&amp;gt;1&amp;lt;/del&amp;gt;/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 nano /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/etc/fstab'' # add PARTLABEL=ALARM and delete UUID=xxx from second line, delete /boot entry''&lt;br /&gt;
 mkdir /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL ALarm&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Manjaro ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/sdb3 bs=1M status=progress conv=fsync'' # copy rootfs to sd part3''&lt;br /&gt;
 mount /dev/sdb3 /media/xxx/ROOT_MNJRO1/&lt;br /&gt;
 scp -r /media/xxx/BOOT_MNJRO/* /media/xxx/ROOT_MNJRO1/boot'' # copy bootfs to to part3/boot''&lt;br /&gt;
 nano /media/xxx/ROOT_MNJRO1/etc/fstab'' # change UUID=xxx to PARTLABEL=MANJARO, delete /boot line''&lt;br /&gt;
 mv /media/xxx/ROOT_MNJRO1/boot/boot.scr /media/xxx/ROOT_MNJRO1/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 mkdir /media/xxx/ROOT_MNJRO1/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL Manjaro&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Mobian ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/sdb4 bs=1M status=progress conv=fsync'' # copy rootfs to microSD card partition 4''&lt;br /&gt;
 mount /dev/sdb4 /media/xxx/rootfs1/&lt;br /&gt;
 scp -r /media/xxx/boot/* /media/xxx/rootfs1/boot'' # copy bootfs to to part4/boot''&lt;br /&gt;
 nano /media/xxx/rootfs1/etc/fstab'' # replace UUID=xxx with PARTLABEL=MOBIAN and delete UUID=xxx from second line. Delete /boot line''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/rootfs1/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  default l0&lt;br /&gt;
  menu title Pinephone Pro Boot Menu&lt;br /&gt;
  prompt 0&lt;br /&gt;
  timeout 10 &lt;br /&gt;
  label l0&lt;br /&gt;
   menu label Mobian 63&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.3-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.3-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.3-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  label l1&lt;br /&gt;
   menu label Mobian 61&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.1-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.1-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.1-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
== Rk2Aw PreLoader, U-Boot &amp;amp; Multi-Distro on eMMC for PinePhonePro ==&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|thumb|right|200px|Options to boot Phosh or sxmo]]&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to be building the eMMC. Note that below, arch is booted from the microSD card and the microSD card shows as /dev/mmcblk1&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw PreLoader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the Images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh Partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO Partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
=== Follow-Up Comments ===&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - '''sudo resize2fs''' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20529</id>
		<title>PinePhone Pro/Create a multi-distribution image using rk2aw</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/Create_a_multi-distribution_image_using_rk2aw&amp;diff=20529"/>
		<updated>2023-08-14T13:58:50Z</updated>

		<summary type="html">&lt;p&gt;Fxc: Moved image up, line fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rk2Aw PreLoader, U-Boot &amp;amp; Multi-Distro on SD Card for PinePhonePro ==&lt;br /&gt;
&lt;br /&gt;
[[File:multi_distro_sd.jpg|thumb|right|200px|Options to boot Arch Linux ARM, Manjaro and Mobian (kernel 6.1 and 6.3)]]&lt;br /&gt;
&lt;br /&gt;
References: https://xff.cz/kernels/rk2aw/rk2aw-rk3399-pinephone-pro/INSTALL, https://xnux.eu/rk2aw/ and https://xff.cz/git/u-boot/log/?h=ppp-2023.07&lt;br /&gt;
&lt;br /&gt;
Requirements: SSH connection from linux machine to PinePhonePro, internet connection.&lt;br /&gt;
&lt;br /&gt;
Note: Preloader and userspace utility to flash it are free, but not open-source.&lt;br /&gt;
&lt;br /&gt;
Thanks: Megi at https://xnux.eu/log/ for the PreLoader and U-Boot, and Chris Norris for improving this guide.&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw PreLoader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Connect PinePhonePro to a Linux machine&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;'' # start ssh connection''&lt;br /&gt;
 cd ~/Downloads'' # enter to directory''&lt;br /&gt;
 curl -O https://xff.cz/kernels/bootloaders/ppp.tar.gz'' # download installer''&lt;br /&gt;
 tar -xvzf ppp.tar.gz -C ~/Downloads'' # extract''&lt;br /&gt;
 # scp -r ~/Downloads/ppp &amp;lt;user&amp;gt;@&amp;lt;phoneip&amp;gt;:~/Downloads'' # copy to phone, non needed''&lt;br /&gt;
 sudo ./spinor-flash-initial-setup.sh'' # flash SPI''&lt;br /&gt;
&lt;br /&gt;
=== Flash Multi-Distro SD Card ===&lt;br /&gt;
&lt;br /&gt;
Get the compressed distribution images and decompress them (i.e. Manjaro Phosh beta 34, Mobian, Arch Linux)&lt;br /&gt;
&lt;br /&gt;
Mount distribution images both partitions &amp;quot;/boot&amp;quot;, &amp;quot;/root&amp;quot; for each distro&lt;br /&gt;
&lt;br /&gt;
 lsblk'' # show /loop, /sd references''&lt;br /&gt;
 blkid'' show UUID for the partition''&lt;br /&gt;
  ├─loop0p1	/media/xxx/BOOT_MNJRO&lt;br /&gt;
  └─loop0p2	/media/xxx/ROOT_MNJRO&lt;br /&gt;
  ├─loop1p1	/media/xxx/boot&lt;br /&gt;
  └─loop1p2	/media/xxx/rootfs&lt;br /&gt;
  ├─loop2p1 /media/xxx/52CA-6165  &lt;br /&gt;
  └─loop2p2	/media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
  └─sdb	disk '' (after each dd command you'll see the partition id name to adjust into scripts.)''&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/sdb count=945728 bs=32768 status=progress'' # quick erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=945728volte)''&lt;br /&gt;
 or sudo dd if=/dev/zero of=/dev/sdb count=1 bs=32768 status=progress'' # slow erase sd card. i.e. # 32GB SDcard (30989615104bytes/32768dim=1volta)''&lt;br /&gt;
&lt;br /&gt;
==== Partition SD Card (min 32GB) ====&lt;br /&gt;
 sudo sfdisk /dev/sdb/ &amp;lt;&amp;lt;EOF&lt;br /&gt;
  label: gpt&lt;br /&gt;
  first-lba: 64&lt;br /&gt;
  table-length: 8&lt;br /&gt;
  start=64, size=32704, type=D7B1F817-AA75-2F4F-830D-84818A145370, name=&amp;quot;loader&amp;quot;, attrs=RequiredPartition&lt;br /&gt;
  size=10G, name=&amp;quot;ALARM&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=10G, name=&amp;quot;MANJARO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
  size=+, name=&amp;quot;MOBIAN&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 lsblk'' # list partitions on sd and mounted distro images''&lt;br /&gt;
  Device        Start      End        Sectors    Size	 Type&lt;br /&gt;
  /dev/sdb1     64         32767      32704      16M     unknown&lt;br /&gt;
  /dev/sdb2     32768      16809983   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb3     16809984   33587199   16777216   8G      Linux filesystem&lt;br /&gt;
  /dev/sdb4     33587200   60524543   26937344   12.8G   Linux filesystem&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Arch Linux ARM ====&lt;br /&gt;
&lt;br /&gt;
 sudo su'' # login with your psw''&lt;br /&gt;
 dd if=/dev/loop2p2 of=/dev/sdb2 bs=1M status=progress conv=fsync'' # copy rootfs to sd part2''&lt;br /&gt;
 mount /dev/sdb2 /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&lt;br /&gt;
 scp -r /media/xxx/52CA-6165/* /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot'' # copy bootfs to to part2/boot''&lt;br /&gt;
 mv /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/boot.scr /media/xxx/3d99072c-9fd6-4316-8526-9192e192c441&amp;lt;del&amp;gt;1&amp;lt;/del&amp;gt;/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 nano /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/etc/fstab'' # add PARTLABEL=ALARM and delete UUID=xxx from second line, delete /boot entry''&lt;br /&gt;
 mkdir /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL ALarm&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=ALARM console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Manjaro ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/sdb3 bs=1M status=progress conv=fsync'' # copy rootfs to sd part3''&lt;br /&gt;
 mount /dev/sdb3 /media/xxx/ROOT_MNJRO1/&lt;br /&gt;
 scp -r /media/xxx/BOOT_MNJRO/* /media/xxx/ROOT_MNJRO1/boot'' # copy bootfs to to part3/boot''&lt;br /&gt;
 nano /media/xxx/ROOT_MNJRO1/etc/fstab'' # change UUID=xxx to PARTLABEL=MANJARO, delete /boot line''&lt;br /&gt;
 mv /media/xxx/ROOT_MNJRO1/boot/boot.scr /media/xxx/ROOT_MNJRO1/boot/boot.scrORIG'' # hide auto-menu item''&lt;br /&gt;
 mkdir /media/xxx/ROOT_MNJRO1/boot/extlinux'' # add directory''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/3d99072c-9fd6-4316-8526-9192e192c4411/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL Manjaro&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=MANJARO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==== Copy Files for Mobian ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/sdb4 bs=1M status=progress conv=fsync'' # copy rootfs to microSD card partition 4''&lt;br /&gt;
 mount /dev/sdb4 /media/xxx/rootfs1/&lt;br /&gt;
 scp -r /media/xxx/boot/* /media/xxx/rootfs1/boot'' # copy bootfs to to part4/boot''&lt;br /&gt;
 nano /media/xxx/rootfs1/etc/fstab'' # replace UUID=xxx with PARTLABEL=MOBIAN and delete UUID=xxx from second line. Delete /boot line''&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /media/xxx/rootfs1/boot/extlinux/extlinux.conf&lt;br /&gt;
 #/boot/extlinux/extlinux.conf&lt;br /&gt;
  default l0&lt;br /&gt;
  menu title Pinephone Pro Boot Menu&lt;br /&gt;
  prompt 0&lt;br /&gt;
  timeout 10 &lt;br /&gt;
  label l0&lt;br /&gt;
   menu label Mobian 63&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.3-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.3-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.3-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  label l1&lt;br /&gt;
   menu label Mobian 61&lt;br /&gt;
   linux '''/boot'''/vmlinuz-6.1-rockchip&lt;br /&gt;
   initrd '''/boot'''/initrd.img-6.1-rockchip&lt;br /&gt;
   fdtdir '''/usr/lib'''/linux-image-6.1-rockchip/&lt;br /&gt;
   append root=PARTLABEL=MOBIAN console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
== Rk2Aw PreLoader, U-Boot &amp;amp; Multi-Distro on eMMC for PinePhonePro ==&lt;br /&gt;
&lt;br /&gt;
Make sure you boot from the microSD card in your PinePhone Pro as we are going to be building the eMMC. Note that below, arch is booted from the microSD card and the microSD card shows as /dev/mmcblk1&lt;br /&gt;
&lt;br /&gt;
=== Flash Rk2Aw PreLoader to SPI ===&lt;br /&gt;
&lt;br /&gt;
Same as above. Note this installs rk2aw and a bootloader to SPI NOR flash. Resulting SPI status is as follows:&lt;br /&gt;
&lt;br /&gt;
 # ./rk2aw-spi-flasher &lt;br /&gt;
 Machine: Pine64 PinePhonePro (pine64,pinephone-pro)&lt;br /&gt;
 SPI NOR Flash:&lt;br /&gt;
 - Total size: 16384 KiB&lt;br /&gt;
 - Erase block size: 4 KiB&lt;br /&gt;
 - Write size: 1&lt;br /&gt;
 - Manufacturer: gigadevice&lt;br /&gt;
 - Part name: gd25lq128e&lt;br /&gt;
 - JEDEC ID: 257018&lt;br /&gt;
&lt;br /&gt;
 Bootable images currently present in SPI NOR flash:&lt;br /&gt;
 Idx Header     Off 1      Size 1     Off 2      Size 2     Notes/content&lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 0   0          2048       6144       0          0          (padded) 0='rk2aw'&lt;br /&gt;
 5   131072     133120     67584      200704     124928     0='U-Boot TPL' 1='U-Boot SPL'&lt;br /&gt;
 7   524288     526336     147456     673792     124928     0='ddrbin' 1='U-Boot SPL'&lt;br /&gt;
&lt;br /&gt;
 Auto-calculated layout for rk2aw dual bootloader scheme:&lt;br /&gt;
 Area                 Offset     Size      &lt;br /&gt;
 ---------------------------------------------------&lt;br /&gt;
 rk2aw primary        0          65536     &lt;br /&gt;
 rk2aw backup         65536      65536     &lt;br /&gt;
 spl fallback         131072     393216    &lt;br /&gt;
 spl primary          524288     389120    &lt;br /&gt;
 itb fallback         913408     2097152   &lt;br /&gt;
 itb primary          3010560    2097152&lt;br /&gt;
&lt;br /&gt;
=== Build Multi-Distro eMMC ===&lt;br /&gt;
&lt;br /&gt;
In this example we are going to build 2 partitions on the eMMC, the first with Arch/Phosh and the second with Arch/sxmo. We have already downloaded the images from [https://github.com/dreemurrs-embedded/Pine64-Arch/releases Danct12] and decompressed them.&lt;br /&gt;
&lt;br /&gt;
==== Mount the Images ====&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads ''# enter to directory''&lt;br /&gt;
 sudo su ''# login with your psw''&lt;br /&gt;
 losetup -P /dev/loop0 archlinux-pinephone-pro-phosh-20230203.img &lt;br /&gt;
 losetup -P /dev/loop1 archlinux-pinephone-pro-sxmo-20230203.img &lt;br /&gt;
 ls -l /mnt/&lt;br /&gt;
 mkdir /mnt/phosh&lt;br /&gt;
 mkdir /mnt/sxmo&lt;br /&gt;
 mkdir /mnt/phosh/boot&lt;br /&gt;
 mkdir /mnt/phosh/root&lt;br /&gt;
 mkdir /mnt/sxmo/boot&lt;br /&gt;
 mkdir /mnt/sxmo/root&lt;br /&gt;
 mkdir /mnt/ephosh'' # e for the partition on the eMMC''&lt;br /&gt;
 mkdir /mnt/esxmo''  # e for the partition on the eMMC''&lt;br /&gt;
 mount /dev/loop0p1 /mnt/phosh/boot/&lt;br /&gt;
 mount /dev/loop0p2 /mnt/phosh/root/&lt;br /&gt;
 mount /dev/loop1p1 /mnt/sxmo/boot/&lt;br /&gt;
 mount /dev/loop1p2 /mnt/sxmo/root/&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
 NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
 loop0          7:0    0     5G  0 loop &lt;br /&gt;
 ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
 └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
 loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
 ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
 └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
 mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
 ├─mmcblk2p1  179:1    0   122M  0 part &lt;br /&gt;
 └─mmcblk2p2  179:2    0 115.1G  0 part &lt;br /&gt;
 mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
 mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
 mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
 ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
 └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
 zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Prepare eMMC ====&lt;br /&gt;
 dd if=/dev/zero of=/dev/mmcblk2 count=32768 bs=32768 status=progress'' # overwrite the front to clear any bootloaders''&lt;br /&gt;
&lt;br /&gt;
 sfdisk /dev/mmcblk2 &amp;lt;&amp;lt; EOF&lt;br /&gt;
 label: gpt&lt;br /&gt;
 first-lba: 64&lt;br /&gt;
 table-length: 8&lt;br /&gt;
 size=32G, name=&amp;quot;PHOSH&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 size=+, name=&amp;quot;SXMO&amp;quot;, attrs=&amp;quot;RequiredPartition,LegacyBIOSBootable&amp;quot;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 Checking that no-one is using this disk right now ... OK&lt;br /&gt;
 Disk /dev/mmcblk2: 115.23 GiB, 123731968000 bytes, 241664000 sectors&lt;br /&gt;
 Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
 Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
 I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Script header accepted.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; Created a new GPT disklabel (GUID: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461).&lt;br /&gt;
 The maximal number of partitions is 8 (default is 128).&lt;br /&gt;
 /dev/mmcblk2p1: Created a new partition 1 of type 'Linux filesystem' and of size 32 GiB.&lt;br /&gt;
 /dev/mmcblk2p2: Created a new partition 2 of type 'Linux filesystem' and of size 83.2 GiB.&lt;br /&gt;
 /dev/mmcblk2p3: Done.&lt;br /&gt;
&lt;br /&gt;
 New situation:&lt;br /&gt;
 Disklabel type: gpt&lt;br /&gt;
 Disk identifier: 7EB4B1E0-5F49-4F30-9F1E-E9E1F305D461&lt;br /&gt;
 Device            Start       End   Sectors  Size Type&lt;br /&gt;
 /dev/mmcblk2p1     2048  67110911  67108864   32G Linux filesystem&lt;br /&gt;
 /dev/mmcblk2p2 67110912 241661951 174551040 83.2G Linux filesystem&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part /mnt/phosh/boot&lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part /mnt/phosh/root&lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
&lt;br /&gt;
==== Build Phosh Partition ====&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/loop0p2 of=/dev/mmcblk2p1 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p1 /mnt/ephosh/&lt;br /&gt;
 scp -r /mnt/phosh/boot/* /mnt/ephosh/boot&lt;br /&gt;
 mv /mnt/ephosh/boot/boot.scr /mnt/ephosh/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/etc/fstab&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  #Static information about the filesystems.&lt;br /&gt;
  #See fstab(5) for details.&lt;br /&gt;
  #&amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
  PARTLABEL=PHOSH 	/   ext4   rw,relatime	0 1&lt;br /&gt;
  # UUID=52CA-6165  /boot vf rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/ephosh/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/ephosh/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL phosh&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=PHOSH console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
  EOF&lt;br /&gt;
&lt;br /&gt;
==== Build SXMO Partition ====&lt;br /&gt;
&lt;br /&gt;
We have unmounted all the Phosh devices, so&lt;br /&gt;
&lt;br /&gt;
 lsblk&lt;br /&gt;
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS&lt;br /&gt;
  loop0          7:0    0     5G  0 loop &lt;br /&gt;
  ├─loop0p1    259:0    0   122M  0 part &lt;br /&gt;
  └─loop0p2    259:1    0   4.9G  0 part &lt;br /&gt;
  loop1          7:1    0   3.5G  0 loop &lt;br /&gt;
  ├─loop1p1    259:2    0   122M  0 part /mnt/sxmo/boot&lt;br /&gt;
  └─loop1p2    259:3    0   3.4G  0 part /mnt/sxmo/root&lt;br /&gt;
  mmcblk2      179:0    0 115.2G  0 disk &lt;br /&gt;
  ├─mmcblk2p1  179:1    0    32G  0 part &lt;br /&gt;
  └─mmcblk2p2  179:2    0  83.2G  0 part &lt;br /&gt;
  mmcblk2boot0 179:32   0     4M  1 disk &lt;br /&gt;
  mmcblk2boot1 179:64   0     4M  1 disk &lt;br /&gt;
  mmcblk1      179:96   0  59.6G  0 disk &lt;br /&gt;
  ├─mmcblk1p1  179:97   0   122M  0 part /boot&lt;br /&gt;
  └─mmcblk1p2  179:98   0  59.5G  0 part /&lt;br /&gt;
  zram0        254:0    0   1.5G  0 disk [SWAP]&lt;br /&gt;
 &lt;br /&gt;
 dd if=/dev/loop1p2 of=/dev/mmcblk2p2 bs=1M status=progress conv=fsync&lt;br /&gt;
 mount /dev/mmcblk2p2 /mnt/esxmo/&lt;br /&gt;
 scp -r /mnt/sxmo/boot/* /mnt/esxmo/boot&lt;br /&gt;
 mv /mnt/esxmo/boot/boot.scr /mnt/esxmo/boot/boot.scrORIG&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/etc/fstab&lt;br /&gt;
 # Static information about the filesystems.&lt;br /&gt;
 # See fstab(5) for details.&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;dir&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
 PARTLABEL=SXMO /     ext4      	rw,relatime	0 1&lt;br /&gt;
 # UUID=841C-F9DD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2&lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 mkdir /mnt/esxmo/boot/extlinux&lt;br /&gt;
 &lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; /mnt/esxmo/boot/extlinux/extlinux.conf&lt;br /&gt;
  #/boot/extlinux/extlinux.conf&lt;br /&gt;
  MENU TITLE Pinephone Pro Boot Menu&lt;br /&gt;
  LABEL l0&lt;br /&gt;
  MENU LABEL sxmo&lt;br /&gt;
  FDT /boot/dtbs/rockchip/rk3399-pinephone-pro.dtb&lt;br /&gt;
  KERNEL /boot/Image&lt;br /&gt;
  INITRD /boot/initramfs-linux.img&lt;br /&gt;
  APPEND root=PARTLABEL=SXMO console=ttyS2,115200 console=tty0 loglevel=4 rw rootwait&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
=== Follow-Up Comments ===&lt;br /&gt;
# On first boot neither Phosh nor sxmo resized their partition - '''sudo resize2fs''' sorted that.&lt;br /&gt;
# Any time an update rebuilds the initramfs it is necessary to delete /boot/boot.scr again to keep the rk2aw menu clean.&lt;br /&gt;
# The end result is a boot screen as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:P1090461.JPG|200px|thumb|left|Options to boot Phosh or sxmo]]&lt;/div&gt;</summary>
		<author><name>Fxc</name></author>
	</entry>
</feed>