Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...



Yocto Build

Host Machine Setup

...

Yocto workspace setup


build setup

repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-turris-extsrc.xml -b dunfell
repo sync -j4 --no-clone-bundle


apply bug fixes Expand source


Expand

cd meta-turris && git fetch https://github.com/Rajakumaran1106/meta-turris.git sdk && git cherry-pick f05628f0ead4139376cb6993b2c6d3466d445232


Note: The above bug fixes changes are temporary given as instructions. This is not required once the change is get merged into the appropriate layer.

Populate eSDK

  •   broadband turris gateway


image build

MACHINE=

raspberrypi-rdk-hybrid

turris source meta-

cmf-raspberrypi

turris/setup-environment
bitbake rdk-generic-

hybrid

broadband-

wpe-

image -c populate_sdk_ext

The generated eSDK installer resides under the directory build-<MACHINE>/tmp/deploy/sdk/rdk-glibc-x86_64-arm-toolchain-ext-2.0.sh of the Yocto workspace.

Note: The generated eSDK installer script usually occupies 2 1.5 to 2.5 GB

eSDK Installation

...

Refer to the RDKCentral's credential configuration to setup RDK Central's credentials in the machine where eSDK to be installed. This is to access repositories by the RDK Yocto recipes that reside in the eSDK installer.

Installation

# run the installer script file
# installer asks for a directory to install (default directory ~/rdk_sdk)
# installer asks permission to proceed
./rdk-glibc-x86_64-arm-toolchain-ext-2.0.sh

Below is the result (terminal output) of the installation

xxxuser@yyy-machine-003:~/

rpi

turris/

hyb/1712$

broadband$ build-

rpi-hyb

turris/tmp/deploy/sdk/rdk-glibc-x86_64-arm-toolchain-ext-2.0.sh
RDK (A Yocto Project based Distro) Extensible SDK installer version 2.0
=======================================================================
Enter target directory for SDK (default: ~/rdk_sdk):
You are about to install the SDK to "/home/xxxuser/rdk_sdk". Proceed [Y/n]? Y
Extracting SDK................................................................................................................done
Setting it up...
Extracting buildtools...
Preparing build system...

Parsing recipes: 100% |##################################################################| Time: 0:00:52

Initialising tasks: 100% |###############################################################| Time: 0:00:00

Checking sstate mirror object availability: 100% |#######################################| Time: 0:00:00

Loading cache: 100% |####################################################################| Time: 0:00:00

Initialising tasks: 100% |###############################################################| Time: 0:00:00

done

SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.

    $ . /home/xxxuser/rdk_sdk/environment-setup-

cortexa7t2hf

armv7ahf-neon

-vfpv4

-rdk-linux-gnueabi

SDK Installation Done.

Build from eSDK

This section covers how to use the eSDK for component build and image build

...

The installer can be run on any x86_64 Linux based machines.

# change directory to the installed path
cd ~/rdk_sdk
# setup the eSDK environemnt
source

 environment

 environment-setup-

cortexa7t2hf

armv7ahf-neon-

vfpv4-

rdk-linux-gnueabi

New Components

Add Component

# way 1
# add a new recipe with URL
devtool add <recipe_name> <source URL>
# eg.    devtool add

westeros https

mosquitto  "http://

github

mosquitto.

com

org/files/

rdkcmf/westeros

source/mosquitto-${PV}.tar.gz"
 
# way 2
# add a new recipe with external source directory
devtool add <recipe_name> <absolute path>
# eg. devtool add

westeros

wireless-tools /path/for/source/directory

Modify Component

# modify existing recipe's URL or srctree or to add patches
devtool modify <recipe_name> <new URL>
# eg. devtool

modify westeros https

modify  mosquitto "http://

code

mosquitto.

rdkcentral.com

org/

r

files/

rdk/components/generic/westeros

source/mosquitto-${PV}.tar.gz"

Edit Component's recipe

# modify recipe from an editor
devtool edit-recipe <recipe_name>
# eg. devtool edit-recipe

westeros

Upgrade Component

# modify existing recipe's URL or srctree or to add patches
devtool upgrade --version <version number> <recipe_name>
# eg. devtool upgrade --version 1.0.21 westeros

mosquitto

Build Components

# Pre-requisite: add a new recipe using devtool
devtool build <recipe_name>
# eg. devtool build

westeros

Deploy binaries

# Pre-requisite: add a new recipe using devtool
devtool deploy-target <recipe_name> <target_path>
# eg. devtool deploy-target westeros root@192.168.xx.xx

mosquitto



Build Image

A complete RDK image can be generated from the eSDK installer.

Note: The same image where the eSDK populated can be generated here.

# devtool command to build image from eSDK
# <IMAGE> - rdk-generic-

mediaclient-wpe

broadband-image

or rdk-generic-hybrid-wpe-image


devtool build-image <IMAGE>

Known Issues

  1. Taskhash mismatch error may appear while generating image from sdk, but that would not break the build.
  2. Image generated from sdk , keeps rebooting for every 2 mins (to be addressed)

Flashing procedure

Turris Omnia Reference Platform: Flashing Instruction