Introduction

This manual describes the up-gradation of Yocto tools, the default build system used in RDK Video, from morty(2.2) to dunfell(3.1). In addition to upgrades to opensource packages, Yocto 3.1 also contain Long term Support release feature. The current version lacks the variety of features available in the dunfell.

The upgraded build tools will be used to generate wpe-westeros-image for Raspberrypi reference platform. WPE integrated with westeros provides us better video experience with smoothness and enhances browser responsiveness. Westeros is a replacement of Weston targeting towards embedded systems.

Yocto 3.1 Upgradation support the following:

  • Yocto BSP layer for meta-raspberrypi.
  • OpenEmbedded and Yocto Dunfell.
  • Linux kernel 4.19.
  • Version upgrades for bitbake, gstreamer and other oe/wpe recipes.
  • Integrate latest westeros.
  • Launching Youtube with WPEFramework UI.

Each component in RDK is a standalone repository with its own individual build tools producing a library or set of binaries. When we upgrade the OE layers to the newer versions, we need to make necessary changes in the RDK layers which use these components, to avoid build failures.

Host Setup

The OpenEmbedded build system should be able to run on Ubuntu 18.04 distribution/other compatible linux distribution with the following versions for Git, tar, and Python.

  • Git 1.8.3.1 or greater
  • tar 1.27 or greater
  • Python 3.4.0 or greater
  • Coreutils(E.g realpath)

Note: You should also have about 50 Gbytes of free disk space for building images.

The essential packages you need for a supported Ubuntu or Debian distribution are shown in the following command:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
  build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
  xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
  pylint3 xterm

Repo Setup

In order to use Yocto build system, the repo tool must be properly installed on the machine.

To install Repo make sure you have a /bin directory in your home directory and that it is included in your path

Repo Setup Steps
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the repo tool and ensure that it is executable
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

Note: it is also recommended to put credentials in .netrc when interacting with repo.

A sample .netrc file is illustrated below

.netrc
machine code.rdkcentral.com
login YOUR_USERNAME
password YOUR_PASSWORD

Executing System

To tackle the build issues from moving one version to another, we have decided to split the problem into different subtasks. So instead of building a complete image at one go, we have planned for the generation of following images:

  • core-mnimal-image for Raspberrypi
  • wpe-westeros-image
  • rdk-generic-image for hybrid and mediaclient
  • rdk-generic-wpe-image for hybrid and mediaclient

These images need to be tested against different configurations in cmf, to ensure that nothing has broken the existing system.

In order to provide a smooth transition without disturbing the existing branch, we have created a branch called `yocto-dunfell-upgrade` for non-OE layers and another branch called `RDK/yocto-dunfell-upgrade` for OE layers.

Right now we are in the process of resolving build/parse errors. The main source for errors can be classified into 4 categories.

--> Incompatible license with RDK.
--> Trying to apply older patches into newer version of recipes.
--> Recipe version changes due to dependency.
--> If there is a license upgrade to a new recipe which is not compaitable with RDK terms then we need to stick to the older version.

Some of the build errors and its root cause is described in the below table. We will keep updating the table as we encounter more errors.


Oops, it seems that you need to place a table or a macro generating a table within the Table Filter macro.

The table is being loaded. Please wait for a bit ...

recipelayererror/warningroot causeaction
N/AN/ALayer should set LAYERSERIES_COMPAT in its conf/layer.conf file to list the core layer names it is compatible with.Newer version of bitbake throws warning if we don’t set LAYERSERIES_COMPAT in its conf/layer.conf in the respective layers.

Set LAYERSERIES_COMPAT_<layer name> = "dunfell" in all layers.

E.g LAYERSERIES_COMPAT_rdk = "dunfell" for meta-rdk layer.

N/Ameta-rdk-extbb.data_smart.ExpansionError: Failure expanding variable AVAILABLE_LICENSES[:=], expression was ${@' '.join(available_licenses(d))} which triggered exception FileNotFoundError: [Errno 2] No such file or directory.There is no directory called licenses in the corresponding meta layer.Need to create a licenses directory under the meta-layer and add RDK license file to it
N/A

meta-rdk-restricted

meta-rdk-video

meta-rdk-ext

meta-rdk-containers

meta-rdk

Error due to the usage of base_contains in multiple recipes.base_contains is deprecated.use bb.utils.contains instead of deprecated base_contains in the respective recipes.
N/AN/AError due to the usage of some of the functions in pythonnative.bbclass in multiple recipes.pythonnative.bbclass is not available in newer version.Add meta-python2 layer to get support for legacy pyhton code(E.g pythonnative.bbclass)

openssl.inc

openssl-0.9.inc

image_container_generator.bbclass

rdk.conf

meta-rdk

meta-rdk-ext

Error due to the usage of base_conditional in multiple recipes.base_conditional is deprecated.use oe.utils.conditional instead of deprecated base_conditional in the respective recipes.
uclibc.incmeta-rdk-extError due to the usage of oe_filter_out in multiple recipes.oe_filter_out is deprecated.use oe.utils.str_filter_out instead of deprecated oe_filter_out in the respective recipes.
gssdp_0.14.10.bbmeta-rdk-extCould not include required file recipes-connectivity/gupnp/gssdp.inc in gssdp_0.14.10.bbThe required file is not present in the location.Replace "require" directive to "include" to specify a loose dependency.

rdk-generic-broadband-dev-image.bb

rdk-generic-hybrid-dev-image.bb

rdk-generic-mediaclient-dev-image.bb

meta-rdkErrors due to required files not being present in yocto 3.1(dunfell) oe layers.Those file are not available in newer version of Yocto.Replace "require" directive to "include" to specify a loose dependency.
rmfhalheaders_git.bbmeta-rdk-videoError while parsing LIC_FILES_CHKSUM in rmfhalheadersThe recipe uses "files://" instead "file://" in LIC_FILES_CHKSUM fieldUpdate the LIC_FILES_CHKSUM field accordingly.

Currently, all the changes are being pushed in these branches. Once it is merged, you will be able to follow the build instructions without any error.

Yocto Build Steps

To build, follow below instructions

Build Steps
$ mkdir <workspace dir>
$ cd <workspace dir>
$ repo init -u https://code.rdkcentral.com/r/manifests -b yocto-dunfell-upgrade -m rdkv-asp-nosrc.xml
$ repo sync -j4 --no-clone-bundle
$ source meta-rdk/setup-environment (Select option raspberrypi-rdk-mc.conf)
$ bitbake wpe-westeros-image

 

Flashing Procedure

Following command can be used to flash the RPI image to sd card using linux machine . dd tool should be available in linux

Flash command
sudo dd if=<path to ImageName.rpi-sdimg> of=<path to SD card space> bs=4M
Example:
$ sudo dd if=wpe-westeros-image-raspberrypi-rdk.rpi-sdimg of=/dev/sdb bs=4M


https://www.balena.io/etcher/ can be used to flash RPI image in sd card using windows 


  • No labels