Pine64 Layer for OpenEmbedded/Yocto
This is the general hardware specific BSP overlay for the Pine64 devices.
This layer aims to support as many features as possible on Pine64 devices. Where possible the layer aims to use opensource and upstream projects avoiding custom forks and binary solutions.
This layer depends on:
- URI: git://github.com/openembedded/openembedded-core
- branch: master
- revision: HEAD
- URI: git://github.com/openembedded/bitbake
- branch: master
- revision: HEAD
- URI: git://git.yoctoproject.org/meta-arm
- branch: master
- revision: HEAD
Follow the usual steps to setup OpenEmbedded and bitbake.
For example, if you use poky it would go like this:
git clone git://git.yoctoproject.org/poky && cd poky
git clone git://git.yoctoproject.org/meta-arm
git clone https://github.com/alistair23/meta-pine64.git
. oe-init-build-env
bitbake-layers add-layer ../meta-arm/meta-arm-toolchain/
bitbake-layers add-layer ../meta-arm/meta-arm
bitbake-layers add-layer ../meta-arm/meta-arm-bsp/
bitbake-layers add-layer ../meta-pine64/
I don't have a board to test on, so this board is supported as best I can. If you have any problems please raise an issue on GitHub.
MACHINE=pine-a64-lts bitbake core-image-base
MACHINE=sopine-a64 bitbake core-image-base
MACHINE=pine-a64-plus bitbake core-image-base
Please raise a GitHub issue if you would like another board suppoted.
To use systemd add this to your local.conf:
INIT_MANAGER = "systemd"
To use WiFi add this to your local.conf:
DISTRO_FEATURES += "ipv4 ipv6 wifi"
IMAGE_INSTALL:append = "linux-firmware-rtl8723 wpa-supplicant"
To see the kernel boot log on the HDMI output, which is useful for debugging, change recipes-bsp/u-boot/files/boot.cmd
to the following:
setenv bootargs console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
This results in adding console=tty0
which will direct Linux to display the console on the display.
To use Wayland graphics add this to your local.conf:
DISTRO_FEATURES += "wayland opengl"
PACKAGECONFIG:append:pn-mesa = " gallium lima kmsro"
Then build Weston using:
MACHINE=sopine-a64 bitbake core-image-weston
To add X11 support as well add this to your local.conf:
DISTRO_FEATURES += "x11"
Below are some demos of this layer being used with Pine64 boards.
https://www.youtube.com/watch?v=1m416FXKJWY
mpv <file> -vo=gpu --hwdec=drm --drm-device=/dev/dri/card0
https://www.youtube.com/watch?v=gNg-Jkcy0MY
gst-launch-1.0 filesrc location=<file.mp4> ! qtdemux name=demux demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink demux.video_0 ! queue ! h264parse ! v4l2slh264dec ! glimagesink rotate-method=1 render-rectangle="<0,0,720,1440>
https://www.youtube.com/watch?v=Tj3qFjfC2dc
gst-launch-1.0 filesrc location=<file.mp4> ! qtdemux name=demux demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink demux.video_0 ! queue ! h264parse ! v4l2slh264dec ! v4l2convert extra-controls="controls,rotate=90" ! video/x-raw,format=I420,width=1080,height=1920,pixel-aspect-ratio=1/1 ! waylandsink fullscreen=true
If you're doing this in a Linux environment, you can use the following process to transfer the image to an SD Card. In this example we're using the core-image-weston-pine-a64-lts.wic, if you have built a different image, update the paths accordingly.
First check your SD card path using lsblk
.
cd tmp/deploy/images/pine-a64-lts/
sudo dd if=core-image-weston-pine-a64-lts.wic of=/dev/sd<X> bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
Replace with your results from lsblk
.