Tables of Contents
Yocto Build
Host Machine Setup
Hardware requirements:
- Ubuntu 20 desktop machine
- RAM - 8 GB or more
- Memory - a minimum of 100 GB free space
Refer to the link for host machine setup: Host Setup
Yocto workspace setup
Code Block |
---|
language | bash |
---|
title | Build setup |
---|
|
repo init -u https://code.rdkcentral.com/r/manifests -b kirkstone -m rdkb-extsrc.xml
repo sync -j`nproc` --no-clone-bundle |
Populate eSDK
Code Block |
---|
language | bash |
---|
title | Image build |
---|
|
MACHINE=raspberrypi4-64-rdk-broadband source meta-cmf-raspberrypi/setup-environment
bitbake rdk-generic-broadband-image -c populate_sdk_ext -f |
The generated eSDK installer resides under the directory build-<MACHINE>/tmp/deploy/sdk/rdk-glibc-x86_64-aarch64-toolchain-ext-2.0.sh
of the Yocto workspace.
Note: The generated eSDK installer script usually occupies 1.5 to 2.5 GB
eSDK Installation
The installer can be done on any x86_64 Linux machines.
Host Configuration
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
Code Block |
---|
|
# 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-aarch64-toolchain-ext-2.0.sh(default directory ~/rdk_sdk)
# installer asks permission to proceed
./rdk-glibc-x86_64-aarch64-toolchain-ext-2.0.sh |
Below is the result (terminal output) of the installation
Code Block |
---|
|
xxxuser@yyy-machine-003:~/RPi_esdk/build-raspberrypi4-64-rdk-broadband/tmp/deploy/sdk$ ./rdk-glibc-x86_64-aarch64-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/ssiras826/rdk_sdk". Proceed [Y/n]? Y
Extracting SDK...............................................................................................done
Setting it up...
Extracting buildtools...
Preparing build system...
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/ssiras826/rdk_sdk/environment-setup-cortexa72-rdk-linux |
Build from eSDK
This section covers how to use the eSDK for component build and image build
Environment Setup
The installer can be run on any x86_64 Linux based machines.
Code Block |
---|
|
# change directory to the installed path
cd ~/rdk_sdk
# setup the eSDK environemnt
source environment-setup-cortexa72-rdk-linux |
New Components
Add Component
Code Block |
---|
|
# way 1
# add a new recipe with URL
devtool add <recipe_name> <source URL>
devtool add mosquitto "http://mosquitto.org/files/source/mosquitto-1.6.10.tar.gz"
# way 2
# add a new recipe with external source directory
devtool add <recipe_name> <absolute path>
# eg. devtool add wireless-tools /path/for/source/directory |
Modify Component
Code Block |
---|
|
# modify existing recipe's URL or srctree or to add patches
devtool modify <recipe_name> <new URL>
devtool modify mosquitto "http://mosquitto.org/files/source/mosquitto-1.6.10.tar.gz" |
Edit Component's recipe
Code Block |
---|
|
# modify recipe from an editor
devtool edit-recipe <recipe_name>
# eg. devtool edit-recipe mosquitto |
Build Components
Code Block |
---|
|
# Pre-requisite: add a new recipe using devtool
devtool build <recipe_name>
# eg. devtool build mosquitto |
Deploy binaries
Code Block |
---|
|
# Pre-requisite: add a new recipe using devtool
devtool deploy-target <recipe_name> <target_path>
# eg. devtool deploy-target mosquitto root@192.168.xx.xx |
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.
Code Block |
---|
|
# devtool command to build image from eSDK
# <IMAGE> - rdk-generic-broadband-image
devtool build-image <IMAGE> |
Known Issues
- Taskhash mismatch error may appear while generating image from sdk, but that would not break the build.
- do_rootfs error may appear while building image through devtool , we can fix through devtool upgrade <recipe_name> and adding respective needed LDFLAGS and depends in the recipe in the workspace directory
Code Block |
---|
|
Problem 1/1:
* - package packagegroup-rdk-ccsp-broadband-1.0-r0.cortexa72 requires ccsp-cm-agent, but none of the providers can be installed
* - package ccsp-cm-agent-5+git0+ed1e94d29b-r0.cortexa72 requires libcimplog1.0.0 >= git+0+4d96629b8e, but none of the providers can be installed
* - conflicting requests
* - nothing provides rdk-logger >= 5+gitr999 needed by libcimplog1.0.0-git+0+4d96629b8e-r0.cortexa72 |
Reference ticket
Jira |
---|
server | JIRA |
---|
serverId | 11deff04-0380-3a3d-a916-0849d4e573f7 |
---|
key | REFPLTB-2916 |
---|
|