User Tools

Site Tools


agl-distro:agl-raspberrypi

This is an old revision of the document!


Building AGL for Raspberry Pi

AGL has been initially ported to Raspberry Pi 2 and 3 by Leon Anavi thanks to the existing knowledge for enabling hardware graphics acceleration in Wayland and Weston from the Tizen Project and GENIVI Development Platform.

Prepare Repo Tool

AGL Uses the Repo tool for managing repositories. First you need to setup layers of AGL. You can use these commands.

Prepare Repo:

  $ mkdir ~/bin
  $ export PATH=~/bin:$PATH
  $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
  $ chmod a+x ~/bin/repo
  

Download Master Branch

To download all code from master:

  $ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
  $ repo sync

Set up Build Environment

Follow the steps below to set up the development environment for Raspberry Pi 2 or 3:

  • Initialize build environment
  $ source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-demo agl-netboot agl-appfw-smack  
  • Add Yocto/OE layer meta-raspberrypi to conf/bblayers.conf
  ${METADIR}/meta-raspberrypi \
  • Change MACHINE in conf/local.conf to raspberrypi2 or raspberrypi3, for example:
  MACHINE = "raspberrypi3"
  • Append the following additional configuration to the end of conf/local.conf
  GPU_MEM = "128"
  
  CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
  
  MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2"
  
  IMAGE_CLASSES += "sdcard_image-rpi-gdp"
  
  KERNEL_DEVICETREE_append = " overlays/vc4-kms-v3d-overlay.dtb"
  
  PREFERRED_VERSION_linux-raspberrypi = "4.4.%"
  PREFERRED_VERSION_mesa = "11.%"
  
  PREFERRED_PROVIDER_virtual/egl = "mesa"
  PREFERRED_PROVIDER_virtual/libgles2 = "mesa"
  PREFERRED_PROVIDER_virtual/libgl = "mesa"
  PREFERRED_PROVIDER_virtual/mesa = "mesa"
  PREFERRED_PROVIDER_jpeg = "jpeg"
  
  # For libomxil
  LICENSE_FLAGS_WHITELIST = "commercial"

Build

Run the following command to build AGL for Raspberry Pi:

  $ bitbake agl-demo-platform
  

When the build is completed flash tmp/deploy/images/raspberrypi3/agl-demo-platform-raspberrypi3.rpi-sdimg to a microSD and boot AGL on your Raspberry Pi.

Notes

The patches in meta-agl-devel for adding Raspberry Pi support in AGL are still pending for a review in AGL Gerrit:

agl-distro/agl-raspberrypi.1475683882.txt.gz · Last modified: 2016/10/05 16:11 by oytis