PinePhone

the pinephone is Article description::a cheap, generic, arm64 smartphone produced with the goal of supporting user-modifiable operating systems and hardware. It uses an Allwinner "sunxi" A64 processor, a Quectel EG-25G Modem, and can boot from either microSD (removable storage) or eMMC (internal storage). It comes in a couple variants that don't really affect the installation process.

Option 1: using another operating system as installation medium
TODO: make an official gentoo minimal install iso for the pinephone?

This seems like the easiest option for installing on eMMC, although it takes a long time to compile.

this method works by installing another OS on the pinephone that can be ssh'd into, then using that to partition the flash, unpack stage3, and chroot, etcetera. You can install gentoo on eMMC by installing the other operating system on microSD, but you can also install gentoo on the microSD, by first installing another OS on the eMMC (https://wiki.pine64.org/index.php/PinePhone#Flashing_eMMC_using_Jumpdrive).

I've had problems with mounting and formatting eMMC with postmarketOS (seems it has to do with the way that filesystems are mounted by it's initramfs), but I have tried the unofficial fedora linux port, and it works fine. postmarketOS has a nice ssh-over-USB feature (https://wiki.postmarketos.org/wiki/SSH), which should be considered for any gentoo minimal install iso.

Option 2: cross-compilation from another gentoo system
TODO: write and test something similar to https://wiki.gentoo.org/wiki/Raspberry_Pi_3_64_bit_Install

this is the easiest option for installing on microSD.

the eMMC can be exposed via USB by installing jumpdrive on a microSD (https://wiki.pine64.org/index.php/PinePhone#Flashing_eMMC_using_Jumpdrive). TODO: see if you can mount the filesystem directly with jumpdrive and not just flash ISOs.

Compiling the Kernel
TODO: compile the kernel (with BSP?)

TODO: try to get sys-kernel/gentoo-sources to work, or make an overlay with sys-kernel/pinephone-sources that does.

Installing the user interface
TODO: make a separate page for (each?) mobile WM?

Option 1: sxmo
TODO: make an overlay with sxmo

Option 2: framebuffer terminal with on-screen keyboard
TODO: port this from postmarketOS

Option 3: Phosh
TODO: make an overlay with phosh

Option 4: KDE mobile
TODO: make an overlay with kde mobile

Option 5: sway with custom configuration
TODO: make wayland on-screen keyboard TODO: make touch-screen alternative to dmenu

Option 6: ubports' WM
TODO: port this from ubports

Wifi/Bluetooth
uses RTL8723BS/RTL8723CS