jeudi 2 mars 2017

Building Weston image with Yocto for Raspberry pi

This article aims at describing how to setup a weston image for raspberry pi3.
1. Start by cloning poky:

/ $ git clone git://git.yoctoproject.org/poky.git -b morty

2. Then clone layers

/ $ cd poky
/poky $ git clone git://git.yoctoproject.org/meta-raspberrypi -b morty
/poky $ git clone git://git.openembedded.org/meta-openembedded -b morty

3. setup a new environment  for your build

/poky $ source oe-init-build-env rpi3-build
/poky/rpi3-build $

4. Add the 2 repos to the layers config

/poky/rpi3-build $ cat conf/bblayers.conf
....
BBLAYERS ?= " \
  /home/geh0003/sdb1/morty/meta \
  /home/geh0003/sdb1/morty/meta-poky \
  /home/geh0003/sdb1/morty/meta-yocto-bsp \
  /home/geh0003/sdb1/morty/meta-raspberrypi \
  /home/geh0003/sdb1/morty/meta-openembedded/meta-oe \
  /home/geh0003/sdb1/morty/meta-openembedded/meta-multimedia \
  "

5. Add the following to your local.conf

/poky/rpi3-build $ cat conf/local.conf
...
MACHINE ?= "raspberrypi3"

# IMHO this should be in raspberrypi3.conf
MACHINE_FEATURES += "vc4graphics"

# Remove black border
DISABLE_OVERSCAN = "1"

# Heavily recommended for Wayland/Weston.
DISPMANX_OFFLINE = "1"

GPU_MEM = "128"
...

6. Start the build

/poky/rpi3-build $ bitbake core-image-weston -k

7. Take a coffee or a beer 

(or both this takes some time)

8. If no errors =D, copy to sdcard ...

/poky/rpi3-build $ sudo dd if=tmp/deploy/images/raspberrypi3/core-image-weston-raspberrypi3.rpi-sdimg of=/dev/mmcblk0
540672+0 records in
540672+0 records out
276824064 bytes (277 MB, 264 MiB) copied, 62.256 s, 4.4 MB/s
/poky/rpi3-build $ sync
/poky/rpi3-build $ 

9. ... and enjoy









1 commentaire:

  1. Thank you.
    In my case, below patch is required for successful build.
    https://lists.yoctoproject.org/pipermail/yocto/2017-January/034034.html

    RépondreSupprimer