RaspberryPI3 SBC and CM come with cortex-a53 based SOC which is 64-bit capable and uses ARM-v8 architecture. Originally RaspberryPI 3 was released with 32bit support alone which is backward compatible with RaspberryPI 2. However, over period of last couple of years a lot of development has gone into enabling 64-bit on ARM in community, Eric Anholt’s VC4 drivers have matured on 64bit kernels, various userspace packages have been ported by Linaro and other communities. We have put efforts in integrating all these efforts for full system using OpenEmbedded/Yocto framework. The support is fairly new and therefore there might be some issues still lurking, Here we will go through the steps for building full Graphical images.
Since the support is new, its recommended to use master (upcoming Rocko 2.5 release) and newer
mkdir rpi-yocto; cd rpi-yocto git clone git://git.yoctoproject.org/poky git clone git://git.openembedded.org/meta-openembedded git clone git://git.yoctoproject.org/meta-raspberrypi git clone git://github.com/96boards/meta-96boards source poky/oe-init-build-env rpi64-build bitbake-layers add-layer ../meta-raspberrypi bitbake-layers add-layer ../meta-96boards bitbake-layers add-layer ../meta-openembedded/meta-oe bitbake-layers add-layer ../meta-openembedded/meta-xfce bitbake-layers add-layer ../meta-openembedded/meta-python bitbake-layers add-layer ../meta-openembedded/meta-perl bitbake-layers add-layer ../meta-openembedded/meta-gnome bitbake-layers add-layer ../meta-openembedded/meta-networking
Edit conf/local.conf to set machine
MACHINE = "raspberrypi3-64"
Build Sato Image ( Yocto Project Reference GUI image )
Build XFCE image
If you intend to build a full desktop system like XFCE then build core-image-minimal-xfce
sudo dd if=tmp/deploy/images/raspberrypi3-64/core-image-sato-raspberrypi3.rpi-sdimg of=/dev/sdX
where X is the letter a,b,c which your build machine would have mounted the Micro-SD card on you can check that with
dmesg | tail -10
Add in local.conf
CORE_IMAGE_EXTRA_INSTALL_append = " 96boards-tools "
build the image again and flash it to SD-Card, this will expand the rootfs to span over complete SD card.
Using MUSL C library
Musl is a light weight alternative to glibc which is fully supported in OpenEmbedded-core and Yocto project. In order to use musl instead of glibc add ( in local.conf )
TCLIBC = "musl"
Using Clang Compiler
Clang is supported via a layer of its own, if you intend to use clang to compile the packages, you have to add meta-clang to layer mix.
cd rpi-yocto; git clone git://github.com/kraj/meta-clang bitbake-layers add-layer ../meta-clang
If clang should be used as default compiler then add following in local.conf
TOOLCHAIN ?= "clang"
Please note that there is a small number of packages which still would use gcc to build. e.g. for core-image-sato we still build following packages with gcc
- glibc( if you use it)
- Validate bluetooth
- Validate on board WiFi
- Video playback
Need Help ?
Please ask questions on IRC or mailing lists