You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Introduction

This manual describes the rdk-generic-mediaclient-image build procedure for Yocto 3.1 builds. This will upgrade 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 rdk-generic-mc-image for Raspberrypi reference platform. 

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.
  • Playing a given stream using gst-launch command.
  • rmfApp Support.
  • Controlling apps using appmanager.

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 bmap-tools

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-minimal-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.bb


meta-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.
busybox_%.bbappendmeta-rdk-extError in busybox as busybox_1.31.1.bb:do_patch: failed with exit code '1'Build error  in do_package task due to some of the older patches availableThe following patches are removed from busybox recipe
for dunfell build
1. udhcp.patch
2. 0001-networking-add-ip-neigh-command.patch
3. ip6_neigh_show_
Crash.patch

glib-networking_2.54.1.bb

rdk.conf

meta-rdk-ext

meta-rdk

Glib-networking require gnutls >= 3.4.6 gnutls 3.3.x is the last branch which supports.nettle 2.7.1. So it is not possible to increase the version,Used glib-networking-2.54.1 instead of updating gnutls.
gstreamer1.0-plugins-bad.incmeta-rdk-extError while inheriting bluetooth.bbclassbluetooth.bbclass is not available in newer version of yoctoinherited bluetooth.bbclass
glib-2.0_2.62%.bbappendmeta-rdk-extError reported for glib-2.0-native-1_2.62.4-r0 patchUnable to apply the 2nd hunk due to version changes. rebased RDK patch to glib 2.62.4
openssl_1.1.0g.bbmeta-rdk-extError while fetching openssl_1.1.0g Recipe version 1.1.0 is moved to a different location. SRC_URI updated with the new changes.
systemd_216.bbmeta-rdk-extError while parsing systemd_216 legacy recipe  Circular dependency problem with systemd_216Updated the COMPATIBLE_HOST for dunfell builds.

netsrvmgr_git.bbappend

meta-cmf-videoError due to invalid version of netsrvmgrSRCREV expects a valid revision on dunfell framework  SRCREV for netsrvmgr set to AUTOREV
iptables_%.bbappendmeta-rdk-extError while installing iptablessysint provides it's own iptables systemd service file which gives a conflict on do_rootfs()Removed systemd service to avoid conflict

dropbear_%.bbappend


meta-rdk-extPatch error while building Dropbear-2019.78Older version of patches were giving build errorRebased patches to build on dunfell
openssl_1.0.2o.bbmeta-rdk-extopenssl: skip 1.0.2o for dunfellopenssl 1.0.2o recipe causing circular dependency error on dunfell buildskipped openssl 1.0.2o for dunfell
setup-environmentmeta-rdkUpdate bitbake version for dunfellBitbake version update for dunfell branch Enabled  bitbake version 1.4xx for Dunfell
RDKmeta-cmfLicense error expanding the variable AVAILABLE LICENSE in meta-cmf layerThere is no directory called licenses in the corresponding meta layer.Created license file to it
qtbase-native_5.1.1.bbappendmeta-cmf-qt5qtbase-native: fix build error due to gcc 9.xqtbase native pkg throws build error due to gcc 9.2.Added  patch to fix issue 
logrotate_%.bbappendmeta-rdk-extlogrotate: remove systemd servicesas sysint provides logrotate's systemd service, actual recipe's service gives conflictRemoved systemd's logrotate service.
dnsmasq_%.bbappendmeta-rdk-ext Postinstall scriptlets of ['systemd'] failed.As systemd in dunfell provides resolv.conf, no need to install again from dnsmasq.Removed resolv.conf from do_install for dunfell

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-cmf/setup-environment (Select option meta-raspberrypi/conf/machine/raspberrypi-rdk-mc.conf)
$ bitbake rdk-generic-mediaclient-image

 

Flashing Procedure

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

Flash command
bzip2 -d <path to ImageName.wic.bz2>
sudo -E bmaptool copy --nobmap <path to ImageName.wic> <path to SD card space>

Example:

$ bzip2 -d rdk-generic-mediaclient-image-raspberrypi-rdk-mc.wic.bz2
$ sudo -E bmaptool copy --nobmap rdk-generic-mediaclient-image-raspberrypi-rdk-mc.wic /dev/sdc


  • No labels