This is an old revision of the document!
Table of Contents
PinePhone
UB Ports Build process
for UB Ports, the build system is taken from pinephone.yaml, This calls up pine64-common.yaml.
The pine64-common.yaml then calls up the kernel built from the special pine64-kernel-ubports branch.
The pine64-common.yaml then also includes mainline-rootfs-core.yaml. This then fetches the latest build from:
xenial-mainline-edge-pine-rootfs-arm64
The page for this is found:
https://ci.ubports.com/job/xenial-mainline-edge-pine-rootfs-arm64/
This is how you build the final image. To build the actual image (https://ci.ubports.com/job/xenial-mainline-edge-pine-rootfs-arm64/lastSuccessfulBuild/artifact/out/ubuntu-touch-xenial-edge-pine-arm64-rootfs.tar.gz)
This comes from xenial_-_edge_-_pine
https://github.com/ubports/rootstock-ng/tree/xenial_-_edge_-_pine
The build of the FS is performed by:
https://github.com/ubports/rootstock-ng/blob/xenial_-_edge_-_pine/rootstock-touch
The pinephone specific stuff is pulled from:
http://repo.ubports.com/dists/xenial_-_edge_-_pine/main/binary-arm64/Packages
UB ports update servers
The settings for update servers etc.. is stored:
/etc/system-image/config.d/01_channel.ini
This points to the update server.
system-image.ubports.com
This uses the following file to define the update channels:
http://system-image.ubports.com/channels.json
so for pinephone:
http://system-image.ubports.com/16.04/arm64/mainline/stable/pinephone/index.json
There are 3 channels for Pine phone: rc, stable and devel
Kernel
The kernel currently used is:
https://gitlab.com/pine64-org/linux/-/tree/pine64-kernel-ubports
To compile:
NOTE: this assumes OpenSuse with addition of cross-aarch64-gcc7
Also note: set CONFIG_LOCALVERSION_AUTO to “n”
# Configure make ARCH=arm64 CROSS_COMPILE=aarch64-suse-linux- pine64_defconfig # Clean make ARCH=arm64 CROSS_COMPILE=aarch64-suse-linux- LOCALVERSION="-pine64" clean # Compile image make ARCH=arm64 CROSS_COMPILE=aarch64-suse-linux- -j4 LOCALVERSION="-pine64" Image # Compile modules make ARCH=arm64 CROSS_COMPILE=aarch64-suse-linux- -j4 LOCALVERSION="-pine64" modules
Crust
The Pinephone uses CRUST to do the power management.
Current State
The following is not working:
- Camera
- Phone (no signal)
- Vibration motor
Some interesting info here: https://xnux.eu/devices/pine64-pinephone.html
Vibration motor
From https://xnux.eu/devices/feature/vibrator.html#toc-example-program-to-control-the-vibration-motor there is a test app (assuming its using the force feedback input).
Initial run return:
ERROR: Can't open vibrator event device: No such file or directory
Adding additional debug:
name: axp20x-pek name: Goodix Capacitive TouchScreen name: gpio-keys name: 1c21800.lradc ERROR: Can't open vibrator event device: No such file or directory
So, there is no vibrator driver :( this is hopefully because the kernel has not been configured to do this yet.
On the https://megous.com/git/linux/tree/arch/arm64/configs/pinephone_defconfig?h=orange-pi-5.7 kernel (not sure if this is a PinePhone kernel) sets CONFIG_INPUT_GPIO_VIBRA, However https://gitlab.com/pine64-org/linux/-/blob/pine64-kernel-ubports/arch/arm64/configs/pine64_defconfig also sets this :(
However there is also:
CONFIG_INPUT_GPIO_VIBRA=y CONFIG_INPUT_PWM_VIBRA=m
However the pwm_vibra module does not help.
Camera
The camera is a OV6540 and is connected via the sun6i csi interface.
The PostmarketOS kernel (Pulled in APKBUILD from https://gitlab.com/postmarketOS/pmaports/-/tree/master/main/linux-postmarketos-allwinner ) pulls in https://gitlab.com/pine64-org/linux/-/tree/2a6074e53b019db8a4a63cb255bc29422db3fe19
When this is compared to the current ubtouch kernel there are a few changes to the DTS files, and the sunxi usb module. However the bug difference is the kernel config files. They are very different.
The first is that CONFIG_VIDEO_DEV is build into the kernel, while ut is a module. This also includes CONFIG_VIDEO_V4L2. And CONFIG_V4L2_MEM2MEM_DEV=y for the pmos.
The following is also set on the pmos:
CONFIG_STAGING_MEDIA=y CONFIG_VIDEO_SUNXI=y CONFIG_VIDEO_SUNXI_CEDRUS=y
None of these are set on the ut kernel.
CONFIG_MEDIA_SUPPORT is also set to a module on ut, it exists, but does not load(does not fail to load). May be a dummy module?
Interestingly, CONFIG_VIDEO_SUN4I_CSI is not set in pmos, but is set to module in ut.
Strangely, if we extract config.gz from the phone, its different to the one used in the kernel!!!!
The actual config file is a lot closer to the pmos one. And nothing seems to suggest a major difference.
OPPS wrong kernel branch!!!!! try again….