This page explains how you as AppDeveloper can create, compile your native (c/c++) application using DAC SDK and how to publish it to RDK-M staging DAC-Appstore in the cloud.
When your application meets the DAC App contract for binary compatibility it will allow you as AppDeveloper
- to download, run and test that same native application on all RDK6.1 Video Accelerators without any additional integration steps
- to exchange your Application binary with real RDK operators, technically allowing them to test/run your application on their boxes.
This video from TechSummit2024 nicely explains bigger picture
What you need
- Video Accelerator with final RDK6.1 image on it. This can be Raspberry Pi 4 (RPI4) on which you can flash RDK6.1 final release image. Note that RPIv3B/3B+ is deprecated, not supported by RDK-M anymore. Tool to flash RDK6.1 rpi image to SD card, example is provided with https://www.balena.io/etcher/ tool. Contact RDK-M if you want to test it on more carrier grade Video Accelerator (with amlogic, broadcom or realtek SoC) with RDK6.1 image
- Your application source code with bitbake recipe. Needs to meet the DAC contract for binary compatibility.
- DAC SDK https://github.com/rdkcentral/meta-dac-sdk to cross compile your application, add dependent libraries in application container and package/output your application as oci compliant dac container image.
- As App developer company/entity you will need to request RDK-M DAC support team via support@rdkcentral.com :
- a login/pswd to register your app and its metadata in RDK-M ASMS instance (ASMS is AppStore Metdata µService and part of DAC cloud setup of RDK-M for Video Accelerators)
- an associated "Maintainer" identifier (string) to be able to upload/register your app.
- credentials for uploading your OCI image to the private RDK OCI container registry. This is not required if you choose to upload it to a public accessible OCI container registry or ask support team to upload it for you.
Above credentials are one time request per App developer entity. Once you have above credentials, you can reuse them for publishing other apps under your entity. At this moment requesting these credentials is still manual process, a point to improve in future
put RDK6.1 SW image on your RPI4
As an Appdeveloper you want to test and run your DAC Application on a set of real hardware reference devices. RDK-M created the Video Accelerators for that.
If your app code complies with DAC app contract for binary compatibility it should be able to run on the various RDK Video Accelerator Devices provided these run firmware images (=monolitic software image) that also live up to that DAC contract for binary compatibility. The RDK6.1 monolithic software release live up to that contract (as of RDK6.1_RC2 Feb 2024), contains UI to browse and install DAC apps from RDK-M DAC cloud/staging store. The RPI4 is the open source community Video Accelerator that RDK-M supports. RDK-M made available a pre-build of such rdk6.1 lib32-rdk-generic-mediaclient-wpe-image software image for rpi so that you can just load this image on your rpi4 device and can start testing. (without having to spend any time on building such image from scratch) This prebuilt is available in via this link https://wiki.rdkcentral.com/download/attachments/80261869/rdk-generic-mediaclient-wpe-tdk-image-raspberrypi4-64-rdk-android-mc-6.1.0.wic.bz2 See RDK6.1 rpi4 release notes wiki Raspberry Pi 4 RDK6.1 Release Notes#Downloadapre-builtimage In next section we explain how you can flash that image on rpi4.
To get your hands on other Video Accelerator HWs and their RDK6.1 SW images, we refer you to RDK-M
Flash the RDK6.1 image to your RPI
Download and install https://www.balena.io/etcher/ tool
- Find and download the .wic.bz2 file from your build: find tmp/deploy/ -name *.wic.bz2
- Flash it to the Raspberry Pi's SD card using Etcher. In principle, it can handle a wic.bz2 directly but sometimes this doesn't work great. Unzipping it first can help: bzip2 -df xxx.wic.bz2
![](/download/attachments/288001739/image2020-11-13_12-24-56.png?version=1&modificationDate=1720537099000&api=v2)
- Currently the image foresees 256-512 MB of available space to store DAC apps. That is enough for installing several DAC apps. You can foresee more space, by resizing the main partition of firmware image on the SD card to higher size (eg 2GB) using Gparted
![](/download/thumbnails/288001739/image-2024-7-9_17-1-50.png?version=1&modificationDate=1720537310000&api=v2)
- Insert the SD card back in the RaspberryPi and power up the Pi. Connect the Raspberry Pi to your network with an ethernet cable, and to your TV with a HDMI cable.
- Make sure you can SSH into the Pi as this is important for later. The default user is root with no password
- You should see the RDK Resident GUI application on your TV at bootup (after following some initial setup questions). In section X we explain how to use that resident UI to install existing DAC apps. But first we explain how you can build and publish dac apps
use DAC SDK and build your first DAC app
As part of the DAC project, an SDK has been created to make it easier to develop and build oci and DAC compliant containerized applications. The SDK is public, fully open source and uses standard Yocto 3.1 Dunfel Poky environment.
It is available on https://github.com/rdkcentral/meta-dac-sdk
Install DAC SDK
The SDK consists of
- manifest that will download Yocto Poky environment with all required meta-layers, see manifest content in https://github.com/rdkcentral/meta-dac-sdk/blob/master/manifests/dac-dunfell-manifest.xml
- meta-dac-sdk meta-layer specifically developed to make building of DAC application easy for Appdeveloper.
- It defined some base classes (dac-image-wayland, dac-image-essos, dac-image-base ) App developer can start from (inherit) to define its DAC application container image.
- It links the application to DAC GFX abstraction interfaces (gles2, essos, wayland-egl) correctly and configures DAC-RDK abstraction components (eg rialto-client) appropriately.
- It removes that complexity/specific expertise-need from Appdeveloper because:
- SDK links the application to DAC abstraction interfaces (gles2, essos, wayland-egl, rialto) correctly and configures these appropriately.
- A c/c++ application typically depends on several other standard libraries, The SDK automatically adds the correct application dependency tree into the Application Container Image
- As enf of building process the SDK itself generates and outputs an oci compliant Application Container image.
- It comes with various DAC compliant Application container examples. The recipe that defines the Application Container examples are here https://github.com/rdkcentral/meta-dac-sdk/tree/master/recipes-example/images Each one of them is yocto target that you would then build against. We provided some examples for various Graphics frameworks (Flutter, QT, SDL, directly on wayland, directly on essos). Those also have full open-source reference or hello-world application code provided so App developer can understand how App can use/configure Gfx framework so it will work seamlessly with DAC abstraction interfaces.
- build instructions as per https://github.com/rdkcentral/meta-dac-sdk/blob/master/README.md It is best to read the instructions there. They are always the latest because they are maintained together with the rest of the layer. Below is the "setup" part of the SDK.
# Create build directory
mkdir build; cd build
# Install 'repo' tool from: https://android.googlesource.com/tools/repo
repo init -u https://github.com/rdkcentral/meta-dac-sdk/ -m manifests/dac-dunfell-manifest.xml
repo sync --no-clone-bundle -v -j$(getconf _NPROCESSORS_ONLN)
. ./oe-init-build-env
cp ../.repo/manifests/manifests/bblayers.conf conf/
echo 'MACHINE = "raspberrypi4"' >> conf/local.conf
If everything worked, the SDK is now set up and ready for use. You only need to run these steps the first time you set up the SDK. For subsequent uses, you only need to run the following command to configure the build environment:
cd build
. ./oe-init-build-env
Below is demonstration on how you use the SDK to build Youtube-cobalt as DAC application
Is also available on Youtube 'https://www.youtube.com/watch?v=Ie7fQy5HTlc
Parent DAC SDK images
The meta-dac-sdk layer defined several DAC image bbclasses App developer can start from ("inherit" in yocto terminology) to define its DAC application container image.
Following oci compliant base image types are defined :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XMiOiJPSyIsInNlcnZpY2UiOiIiLCJpc1RlbXBsYXRlIjoiIiwid2lkdGgiOiIxMDMwIiwic2ltcGxlVmlld2VyIjpmYWxzZSwibGFzdE1vZGlmaWVkIjoxNzIwNjMyNjcxMDAwLCJleGNlZWRQYWdlV2lkdGgiOmZhbHNlLCJvQ2xpZW50SWQiOiIifQ==
To create new OCI Image with application, developer had to define:
- Application BitBake recipe. This recipe define:
- Where the application sources are located
- What other components and libraries are used during application build process
- How to build the application
- How to install the application and its resources
- What other components and libraries need to be installed together with the application
- Specialized OCI Image BitBake recipe. This recipe inherit one of pre-defined DAC Image recipes and define:
- Which application should be installed inside the OCI Image
- What is an entry point (executable binary) inside Container
- What additional ENV variables should be set for application
Publish your DAC app to RDK-M DAC cloud
There are two ways to publish a new application in ASMS:
- use the official ASMS REST API to publish the app (openAPI swagger REST api)
- using the dactest.py test tool
But before publishing the new app into ASMS, you need to publish the oci compliant container image of your DAC application into a container registry that supports the OCI standard format. In next section we explain how to do that.
How to publish the application oci container image to RDK-M oci container registry
You can either publish your oci container image to
- the private RDK OCI container registry setup and maintained by RDK-M DAC cloud team, being "public.ecr.aws/a0v6o9z7". You can request RDK-M DAC cloud support team (who TBD, ad interim Piotr S or Stefan V or BartC ) to upload your oci image there with version tag you specified or you can do it yourselves following practical Instructions & tools described below. You will need credentials/account for accessing this registry, which you can request via email to piotr.serafin@consult.red or bcatrysse@libertylgobal.com. (When there is time/money this credential creation process should be improved and autosetup as part of registering as New Application maintainer in RDK DAC cloud system or Firebolt Connect system.
- any of public accessible OCI container registries on the internet. Requirement is that the container registry supports OCI container format, that the container itselve is uploaded & stored in the OCIcontainer image format (so not in docker format) and is public fetchable/accessible (read only, without any user/login) from RDK DAC cloud system. Note that in this approach your application binary is publicly accessible, not all application providers will agree with that and those will need to use the private RDK oci container registry approach explained above.
Depending on the oci registry product, there are various login/access credential procedures.
We provide the instructions for Amazon Elastic Container Registry. The private container registry setup RDK-M DAC team is also such type.
instructions for amazon Elastic Container Registry
You need to have the following util programs installed: aws cli tools and skopeo.
Assuming your host is linux, configure your aws profile ~/.aws/credentials file as per below
//Obviously you need to fill in your credentials below iso xxxxx and yyyyy. If you want to use the private OCI container registry from RDK-M, request piotr.serafin@consult.red for credentials
[s3dacrdk]
aws_access_key_id = xxxxx
aws_secret_access_key = yyyyyy
Login, create new container repository and publish the OCI image in there:
# login into private RDK-M OCI container registry
aws --profile s3dacrdk ecr-public get-login-password --region us-east-1 | skopeo login --username AWS --password-stdin public.ecr.aws/a0v6o9z7
# create repo for your application, in which you can publish different versions, example below creates "cobalt" one for Youtube/cobalt application
aws --profile s3dacrdk --region us-east-1 ecr-public create-repository --repository-name cobalt
# list repos
aws --profile s3dacrdk --region us-east-1 ecr-public describe-repositories
# The actual command that uploads/publishes your local version of a oci image associated with your application to the RDK-M oci-registry
# within repo named "cobalt" with the version tag "latest" standing for latest version
skopeo copy oci-archive:dac-image-cobalt.tar docker://public.ecr.aws/a0v6o9z7/cobalt:latest
# with following command you can download your oci image from RDK-M registry to your local host
skopeo copy docker://public.ecr.aws/a0v6o9z7/cobalt:latest oci:cobalttest
# command to double check if uploaded container is oci image type
skopeo inspect --raw docker://public.ecr.aws/a0v6o9z7/cobalt:latest
{
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": 548,
"digest": "sha256:0bc2f756fc781b015769230b207c6b227b788023a5c3d599504407cc1619110e"
},
[...]
}
Obviously, you have to remember the OCI image URL of your application, which in this example is docker://public.ecr.aws/a0v6o9z7/cobalt:latest. Because you will have to specify it when publishing the DAC app to the ASMS (AppStore Metdata service).
Publish the DAC app using ASMS REST API
You can access the swagger UI here: http://rdkm-asms-external-1156877020.eu-central-1.elb.amazonaws.com:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
You can use the POST /maintainers/{maintainerCode/apps RPC call to add an ASMS dac app. dactest.py uses "rdk" as maintainerCode. You will need to provide a POST body with the required contents.
![](/download/attachments/288001739/Image%2024-10-2023%20at%2009.52.jpeg?version=1&modificationDate=1698134036000&api=v2)
Example POST body. Additionally you can check how dactest.py is doing it.
{
"header": {
"icon": "https://280222515084-default-apps-resources.s3.eu-central-1.amazonaws.com/images/apps/com.rdk.app.chocolate-doom.png",
"name": "Chocolate Doom",
"description": "Chocolate Doom aims to accurately reproduce the original DOS version of Doom and other games based on the Doom engine in a form that can be run on modern computers.",
"type": "application/dac.native",
"size": 10000000,
"category": "application",
"localization": [
{
"languageCode": "nld",
"name": "Geweldige applicatie",
"description": "Dit is een geweldige applicatie"
}
],
"id": "com.rdk.app.chocolate-doom",
"version": "1.0.0",
"visible": true,
"encryption": false,
"preferred": false,
"ociImageUrl": "docker://public.ecr.aws/a0v6o9z7/chocolate-doom:latest"
},
"requirements": {
"dependencies": [
{
"id": "com.libertyglobal.service.voice",
"version": "1.0.0"
}
],
"platform": {
"architecture": "arm",
"variant": "v7",
"os": "linux"
},
"hardware": {
"ram": "512M",
"dmips": "2000",
"persistent": "60M",
"cache": "200M"
},
"features": [
{
"name": "rdk.api.awc",
"version": "2",
"required": false
}
]
},
"maintainer": {
"code": "rdk",
"name": "RDK",
"address": "RDK Management, LLC",
"homepage": "https://rdkcentral.com",
"email": "support@rdkcentral.com"
},
"versions": [
{
"version": "1.0.0",
"visible": true,
"preferred": false,
"encryption": false
}
]
}
Among other things, dactest.py can be used list ASMS apps, add entries and remove entries.
![](/download/attachments/288001739/Image%2024-10-2023%20at%2009.41.jpeg?version=1&modificationDate=1698133496000&api=v2)
To add an entry to ASMS, i.e. to publish a DAC app you can follow these steps:
- on your development PC/laptop: install dactest.py dependencies. You need python3 and then pip3 install requests colorama websocket-client
- use ./dactest.py 192.168.0.117 (replace with your RPI IP)
- it will use the RDK ASMS to list apps available from the cloud. Use "A" to start the procedure to add an app to ASMS
- you will need to provide an id, name, version, the OCI image URL (see previous step) and a link to an icon to use. When prompted for "encryption" input "false". Unless you really want to test encrypted DAC apps. But for this feature there is a separate wiki page to read. Extra steps are needed for encryption. You can skip that for now and don't use encryption.
Install and run your DAC app on the Video Accelerator
We explain here 2 ways to download your DAC application from Staging RDK-M DAC Appstore and install it on the video Accelerator :
- via the Resident UI on RDK-Video Accelerator (is the regular, user-friendly way)
- using the dactest.py test tool
Using RDK-VA Resident UI
In the resident UI go to the icon with the 9 small squares (left bottom) to navigate to the DAC menu. There you will see three submenu items:
- My Apps: initially empty. From here you can start installed DAC apps. Use the "Home" key to exit a DAC app.
- App Catalog: these are the DAC apps from ASMS available for installation. If you published your app to ASMS you should see it here.
- Manage Apps: here you can uninstall DAC apps from your RPI
![](/download/attachments/288001739/Screenshot%202023-10-24%20at%2008.55.16.png?version=1&modificationDate=1698222843000&api=v2)
dactest.py can be used list, install, uninstall, start and stop DAC apps. It also connects to RDK ASMS to list available DAC apps in the cloud. The DAC apps downloaded from the cloud are generated to bundles inside that cloud and cached there. Sometimes the download can take a while if the bundle still needs to be generated for a specific platform and/or version.
![](/download/attachments/288001739/Image%2017-10-2023%20at%2011.02.jpeg?version=1&modificationDate=1698128816000&api=v2)
So how to use dactest.py to install an app from ASMS:
- on your development PC/laptop: install dactest.py dependencies. You need python3 and then pip3 install requests colorama websocket-client
- by default the script is configured properly for RPI3. But for RPI4 you have to edit the script and set DEFAULT_ASMS_PLATFORM_RDK="rpi4" and DEFAULT_ASMS_FIRMWARE_RDK="1.0.0-e71889dc02521bfdc2f9f38f750b34224184c375-dbg". New: since recently dactest.py will fetch this configuration from LISA itself and use it. No need to edit these anymore.
- use ./dactest.py 192.168.0.117 (replace with your RPI IP)
- it will use the RDK ASMS to list apps available from the cloud. Use "Ix" where x is the number/index of the app you want to install. Later you can use "Ux" to remove it again.
- after successful installation you can start the app using "Sx" and stop it using "Tx".
If you're interested to see what HTTP commands are sent to ASMS and what websocket commands are sent to LISA and RDKShell to support this demo then check the contents of dactest.py.