RDK-V Emulator Users Guide


Copyright 2022 RDK Management, LLC. All rights reserved.

The contents of this document are RDK Management, LLC Proprietary and Confidential and may not be distributed or otherwise disclosed without prior written permission of RDK Management, LLC.

Document Status 



Document Control Number

D10-20141105

Document Title

RDK Emulator Users Guide

Version

D05

Date

2022/12/10

Status

Issued (I)

Distribution

RDK licensees & ASP Members

Document Status Codes



Work in Progress (WIP)

An incomplete document designed to guide discussion and generate feedback that may include several alternative requirements for consideration.

Draft (D)

A document in specification format considered largely complete, but lacking review. Drafts are susceptible to substantial change during the review process.

Pre-Issued (Pre I)

A revision of a document circulated for review or approval prior to release, but not approved for distribution

Issued (I)

A stable document, which has undergone rigorous review and is suitable for product design and development 
It will serve as a basis for testing requirements.

Legal Notices


This document is provided under the terms and conditions of the RDK License Agreement, License Agreement for Software Integration Kit, License Agreement for Set-top Box Software Integration Kit.

RDK Management LLC is not responsible for any liability of any nature whatsoever resulting from or arising out of any use or reliance upon this specification. This document is furnished on an "AS IS" basis, and RDK Management, LLC does not provide any representation or warranty, express or implied, regarding its accuracy, completeness, or fitness for a particular purpose."

Table of Contents


Introduction


RDK (Reference Design Kit) is an integrated set of software components, tools and documentation that help in the development of the software stack for set-top box based on the standard Linux operating system which is designed to meet the requirements of the latest generation media servers and clients.

The RDK emulator is an x86 based implementation of the RDK software stack. It is primarily targeted towards the RDK development community (integrators, component developers and application developers) that attempts to simplify the process of working with the RDK software stack without the need for a reference hardware platform.  The key applications in the RDK Emulator are the rmfApp, Media streamer and the RDK-Browser. As RDK emulator runs on desktop computers, applications can be tested and debugged before trying to deploy them to real devices.

Purpose of this Document


The purpose of this document is to enable RDK users and developers to be able to bring up the RDK stack and emulator on the PC platform. The document also includes step-by-step procedures to setup & build RDK Emulator

Audience


The intended audience includes the MSO teams, developers and external vendors responsible for the development of firmware and applications for RDK-based Set Top Boxes 

Scope


Scope of this document includes understanding RDK Emulator and  functionalities, supported build types and to run and test in Virtual Box environment.

Limitations


RDK Emulator does not support all components of RDK 2.0 stack .Currently RDK Emulator supports mediaframework, media-streamer,RDK-Browser and RDK-Logger, XRE components.

Known Issues


Abbreviations and Acronyms


The following table describes the acronyms and abbreviations used in this document

Abbreviation/Acronym

Description

RDK

Reference Development Kit

VM

Virtual Machine

VBox

Virtual Box

QAM

Quadrature Amplitude Modulation

STB

Set Top Box

XRE

Cross-Platform Runtime Environment

HDD

Hard Disk Drive

EOS

End of Stream

SPTS

Single Program Transport Stream

MPTS

Multi-Program Transport Stream

UPNP

Universal Plug and Play

Overview of RDK Emulator


Key Features


Supported Build Types



Build Types

RDK Components Involved

Features/Applications Supported

Final Image Name

Startup Application

 RDK Mediaclient

  1. westeros
  1. westeros_test cmd line utlity
  2. gst-launch utility
  3. aamp-cli utility

rdk-generic-mediaclient-image-qemux86.vmdk

Nil. Currently boots up to console screen.

Build Setup Instructions


Setting up the Host Environment


How to Build#SettinguptheHostEnvironment

Downloading Source Code & Building


RDK-V Emulator Build Guide

Bringing up the Emulator on Virtual Box


Host Requirements

RequirementRemarks
Linux                           64 bit Ubuntu 18.04 operating system
Free HDD SpaceMinimum 100GB Free Memory
Oracle Virtual Box6.1 or higher

Install Virtual Box and follow the following steps to bring up RDK Emulator on Virtual Box:

In the following steps, it is recommended to review the description and screenshot completely before proceeding with steps.

STEP 1: Create your new VM Instance:


STEP 2: Configure your new VM Instance:

STEP 3: Create an external hard drive:

Your VM has been built with very limited hard drive space. In order to run emulator and play video files, you need to copy your video files into the file system for playback. For this, you will need to setup a virtual external hard drive.


STEP 4: Formatting and partitioning your new external hard drive:

$ ssh root@x.x.x.x
$ mount

$ fdisk -l

$ fdisk /dev/hdb

Review the description of the steps during fdisk operation below and the following screenshot for reference before proceeding.

$ Command (m for help): n

$ Partition type:

p primary (0 primary, 0 extended, 4 free)

e extended

Select (default p): p

$ Partition number (1-4, default 1): 1
$ Command (m for help): p
$ Command (m for help): w



$ mkfs.ext3 /dev/hdb1

$ mkdir /ext_hdd

$ mount /dev/hdb1 /ext_hdd

STEP 5: Copy a Single Program Transport stream to your file system to be used for emulator video playback.

$ scp <your_spts_file_name>.ts root@<your_emulator_vm_ip>:/ext_hdd
$ ln -sf /ext_hdd/<your_spts_file_name> <your_spts_file_name>

 

Usage Instructions


Logging into your VM


As described in the previous section, you can log in to your emulator VM from your Host Machine using the ssh command.

$ ssh root@x.x.x.x


Westeros Support on RDKV Emulator

RDK emulator supports westeros compositor and renderer module as westeros-renderer-gl

Applications testing over westeros Compositor

1) ssh login to the Emulator

Westeros compositor will  run automatically in startup of Emulator image

run following commands in terminal for manual starting the compositor on Emulator if needed

$ mkdir -p /run/user/0
$ export XDG_RUNTIME_DIR=/run/user/0/
$ westeros --renderer <renderer module> --display <socket-name> &
$ westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display WPE &
$ gdisplay start
$ export WAYLAND_DISPLAY=WPE

for Dunfell Emulator
---------------------
$ mkdir -p /run/user/0
$ export XDG_RUNTIME_DIR=/run/user/0/
Add the below line in westeros-init.sh
export LD_PRELOAD=/usr/lib/libwesteros_gl.so.0.0.0
$ westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display WPE &

Run the commands
westeros-init.sh
westeors_test


westeros compositor will launch

Testing Westeros_compositor

to test westeros compositor with simple egl test apliaction

run westeros_test


# After Launching westeros compositor in emulator
$ export XDG_RUNTIME_DIR=/run/user/0/
$ export WAYLAND_DISPLAY=WPE
$ westeros_test
(or)
$ westeros_test --display WPE



Testing Videosink on Westeros Compositor


$ export XDG_RUNTIME_DIR=/run/user/0/
$ export WAYLAND_DISPLAY=WPE

#Check the plugin in image
$ gst-inspect-1.0 westerossink

# To play the video and render on westeros compositor
$ gst-launch-1.0 playbin uri=http://localhost:50050/received_spts1.ts videosink=westerossink