The page for this is found:
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
The build of the FS is performed by:
The pinephone specific stuff is pulled from:
The settings for update servers etc.. is stored:
This points to the update server.
This uses the following file to define the update channels:
so for pinephone:
There are 3 channels for Pine phone: rc, stable and devel
There is no official changelog,
The kernel currently used is:
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
The Pinephone uses CRUST to do the power management.
The following is not working:
Some interesting info here: https://xnux.eu/devices/pine64-pinephone.html
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:
However the pwm_vibra module does not help.
The camera is a OV6540 and is connected via the sun6i csi interface. This is how to enable it
So First we need to enable a number of modules in the kernel tree
CONFIG_V4L2_FLASH_LED_CLASS=m CONFIG_LEDS_CLASS_FLASH=m CONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y CONFIG_LEDS_SGM3140=m
Then compile up the kernel modules, this generates three new modules led-class-flash.ko, v4l2-flash-led-class.ko, leds-sgm3140.ko.
Copy these over the PinePhone and install them into the running kernel:
sudo insmod led-class-flash.ko sudo insmod v4l2-flash-led-class.ko sudo insmod leds-sgm3140.ko
You should now have the /dev/media1 device.
Next, UT does not have media-ctl, we could use the apt version, however that one is too old. Instead I used: https://archlinuxarm.org/packages/aarch64/v4l-utils
Download this package and copy just the media-ctl over to the PinePhone. Then setup the media device:
sudo ./media-ctl -d /dev/media1 --set-v4l2 '"ov5640 3-004c":0[fmt:UYVY8_2X8/1280x720]'
Now we need to check that it all works
Ok, by using fswebcam, we can install this from apt (Note this may be unsafe and could brick the PinePhone……)
sudo mount /dev/loop0 / -o remount,rw sudo apt-get install fswebcam sudo mount /dev/loop0 / -o remount,ro
And now we are ready to capture:
fswebcam --device /dev/video1 --resolution 1280x720 -p UYVY --verbose --save bob.jpeg
Using gstreamer, the orientation is wrong.
V4l2Src should implement GstVideoOrientation see https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-v4l2src.html
this is implemented in
For gst-droid (used on android), https://github.com/sailfishos/gst-droid/blob/e755c8521b3ff0a622fba4c85e57ff41015c7793/gst/droidcamsrc/gstdroidcamsrc.c#L271
So does not look like v4l handles angle
I have created a special version of the Camera app for the Pinephone, this is not the correct solution to the problem, but works for now.
The following script also needs to be run once to setup the media control and video input. It assumes the the non-standard version of media-ctl is available along with the kernel modules (see above).
#!/bin/bash sudo insmod led-class-flash.ko sudo insmod v4l2-flash-led-class.ko sudo insmod leds-sgm3140.ko sudo ./media-ctl -d /dev/media1 --set-v4l2 '"ov5640 3-004c":0[fmt:UYVY8_2X8/1920x1080@1/20]' sudo v4l2-ctl --set-ctrl horizontal_flip=1 --device=/dev/video1 sudo v4l2-ctl --set-ctrl vertical_flip=1 --device=/dev/video1
The Custom version of the camera can be found here: uk.co.retallack.camera-3.1.5.arm64.zip
And the src is: https://gitlab.com/Retallack/camera-app