RDK Resources

[*ASP Wiki*]

Code Management Facility

Code Releases

RDK Forums

[RDK Conferences]

RDK Support


Papers & Presentations Archive

In the News!

Skip to end of metadata
Go to start of metadata


This page describes the effort and modification done on RDK Yocto layers and RDK component's repositories which are made for porting RDK-V media client stack into NXP's i.MX8MQ EVK 64-bit hardware platform using Yocto 2.6 (Thud) and also covers the contribution to the RDK Yocto morty to thud version migration.

Scope of Work

  • porting of RDK-V media client stack into i.MX8MQ EVK platform
  • evaluation of RDK3 features - Spark application including RDK media player & rdkbrowser2 along with westeros compositor, Metrological's WPE webkit v2017 and IP client playback using Gstreamer pipeline
  • contribution for RDK's Yocto Thud migration


RDK openembedded-core and meta-openembedded layers are re-based with open source's oe-core and meta-oe master branch respectively which enables thud features. The changes which are specific to 64-bit machine architecture and specific to thud are maintained in corresponding repo's thud branch. The SoC specific changes can be found under newly created SoC layer (meta-cmf-freescale).

Build Configuration

BB_VERSION           = "1.39.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-14.04"
TARGET_SYS           = "aarch64-rdk-linux"
MACHINE              = "imx8mqevk"
DISTRO               = "rdk"
DISTRO_VERSION       = "2.0"
TUNE_FEATURES        = "aarch64"
TARGET_FPU           = ""
TOOLCHAIN            = "GCC v8.1"

Change List

This change list done for the porting of RDK into 64bit platform covers the solutions provided for the errors and dependencies due to the 64bit target architecture and thud based build system (with toolchain gcc v8.1).

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 ...
recipelayererrorroot causeaction

| /bin/bash: glib-mkenums: command not found

| make[2]: *** [soup-enum-types.h.stamp] Error 127

| make[2]: *** Waiting for unfinished jobs....

In thud, recipe-sysroot() is a task newly added that runs initially to setup sysroots files under work directory of a componentadded 'glib-2.0-native' in DEPENDS
Meta-rdk-ext has older versions whereas oe-core has v2.62.2BBMASK += "meta-rdk-ext/recipes-support/libsoup"

../../neon-0.30.2/src/ne_privssl.h:91:30: error: unknown type name 'gnutls_privkey_sign_func'; did you mean 'gnutls_sign_func'?

|                               gnutls_privkey_sign_func sign_func, void *userdata);

Neon from meta-oe has dependency with latest oe-core's gnutls. Meta-rdk-ext & meta-gplv2 has older gnutls versiongnutls should be compiled from oe-core as it has the latest. Recipes from meta-gplv2 and meta-rdk-ext to be masked
Gobject-introspectionoe-corecanner-qemuwrapper: 6: build-imx8mqevk/tmp/work/aarch64-rdk-linux/gobject-introspection/1.56.1-r0/build/g-ir-scanner-qemuwrapper: qemu-aarch64: not found'aarch64' MACHINE type is not given in rdk distro configurationadded 'aarch64' in QEMU_TARGET under rdk.conf

Neon from meta-oe has dependency with latest oe-core's gnutls.

Meta-rdk-ext & meta-gplv2 has older gnutls version (2.12.24 & 3.3.30 respectively)

BBMASK += " \

meta-rdk-ext/recipes-support/gnutls \

meta-gplv2/recipes-support/gnutls "

so that gnutls 3.6.2 from oe-core will be taken

Meta-rdk-ext has wayland v 1.6, but oe-core points to v 1.15 (latest will resolve missing APIs)BBMASK += "meta-rdk-ext/recipes-graphics/wayland"




meta-rdk-video / meta-wpe

build-imx8mqevk/tmp/work/aarch64-rdk-linux/westeros/1.0+gitAUTOINC+8ec4db4882-r0/recipe-sysroot/usr/lib/libEGL.so: undefined reference to `wl_proxy_wrapper_destroy'
build-imx8mqevk/tmp/work/aarch64-rdk-linux/westeros/1.0+gitAUTOINC+8ec4db4882-r0/recipe-sysroot/usr/lib/libEGL.so: undefined reference to `wl_proxy_marshal_constructor_versioned'
Build-imx8mqevk/tmp/work/aarch64-rdk-linux/westeros/1.0+gitAUTOINC+8ec4db4882-r0/recipe-sysroot/usr/lib/libEGL.so: undefined reference to `wl_proxy_create_wrapper'

meta-rdk-ext layer maintains wayland v1.6 but latest version is wayland v 1.15 from openembedded-core

BBMASK += "meta-rdk-ext/recipes-graphics/wayland"
Meta-rdk-ext and oe-core both has openssl v 1.0.2o which gives conflictBBMASK += "meta-rdk-ext/recipes-connectivity/openssl"
Thud specific openssl version to be preferred in distro conf.

PREFERRED_VERSION_openssl_thud = "1.0.2o"

PREFERRED_VERSION_openssl-native_thud = "1.0.2o"

PREFERRED_VERSION_nativesdk-openssl_thud = "1.0.2o"


| /bin/bash: glib-mkenums: command not found

| make[2]: *** [soup-enum-types.h.stamp] Error 127

| make[2]: *** Waiting for unfinished jobs....

any dependency file under sysroots from a component, that recipe to be mentioned in the DEPENDS variable'glib-2.0 glib-2.0-native' added to DEPENDS



meta-rdk-videoUnable to recognize the compiler flag '--with-arm-float-abi=softfp'so far pxcore's libnode and standalone are built only for 32bit environment and x86_64. The map_nodejs_arch() in recipe is giving the result arch as 'arm' for the yocto MACHINE type 'arm64'

The function in recipe is to provide 'arm64' machine type, if yocto MACHINE type be either 'arm64' or 'aarch64'

-    elif re.match('arm64$', a): return 'arm'

+    elif re.match('(arm|aarch)64$', a): return 'arm64'

| In file included from ../deps/v8/src/heap/objects-visiting.h:12,
|                  from ../deps/v8/src/heap/object-stats.h:9,
|                  from ../deps/v8/src/heap/mark-compact.cc:21:
| ../deps/v8/src/objects-body-descriptors.h: In static member function 'static void v8::internal::FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(v8::internal::HeapObject*, int)':
| ../deps/v8/src/objects-body-descriptors.h:102:20: error: no matching function for call to 'v8::internal::FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(v8::internal::HeapObject*&)'
|      IterateBody(obj);
|                     ^
gcc v8.1 doesn't recognize the template candidate unless and until the typename is specifically mentioned

-    IterateBody(obj);

+    IterateBody<StaticVisitor>(obj);

Pull Request: https://github.com/pxscene/pxCore/pull/1803

| ./rapidjson/document.h:1682:24: error: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'class rapidjson::GenericValue<rapidjson::UTF8<> >' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]

|              std::memcpy(data_.a.elements, values, count * sizeof(GenericValue));

|              ~~~~~~~~~~~^

warning with gcc 8.1

Reference link

-            std::memcpy(data_.a.elements, values, count * sizeof(GenericValue));

+            std::memcpy(static_cast<void*>(data_.a.elements), values, count * sizeof(GenericValue));

Pull Request: https://github.com/pxscene/pxCore/pull/1803

| rtRemoteValueReader.cpp: In static member function 'static rtError rtRemoteValueReader::read(rtRemoteEnvironment*, rtValue&, const Value&, const std::shared_ptr<rtRemoteClient>&)':

| rtRemoteValueReader.cpp:203:49: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

|        to.setVoidPtr((void *) val->value.GetUint());

|                                                  ^

| cc1plus: all warnings being treated as errors

64bit operations are conditionally given only for 'x86_64' architecture in rtRemoteValueReader.cpp and rtRemoteValueWriter.cpp files under remote directory

aarch64 predefined macro used wherever 64bit operations are available

-#if __x86_64

+#if __x86_64 || __aarch64__

Pull Request: https://github.com/pxscene/pxCore/pull/1803

fatal error: X11/Xlib.h: No such file or directory

CFlags from EGL pkg-config is not considered.

This is error SoC specific though a general solution can be given.

In examples/pxScene2d/src/CMakeLists.txt pkg_check_modules(EGL "egl") is added to use the SoC specific CFlags from egl.pc
tr69hostifmeta-rdk-videofatal error: tinyxml.h: No such file or directorylibtinyxml headers not available under recipe-sysroot directory+DEPENDS += "libtinyxml"
error: cast from 'void*' to 'int' loses precisiontype cast error for 64bit compilationreplaced 'int' to 'intptr_t'
| ./git/src/hostif/handlers/src/hostIf_jsonReqHandlerThread.cpp: In function 'void hostIf_HTTPJsonMsgHandler(SoupServer*, SoupMessage*, const gchar*, GHashTable*, SoupClientContext*, gpointer)':
| ./git/src/hostif/handlers/src/hostIf_jsonReqHandlerThread.cpp:306:34: error: cannot convert 'size_t*' {aka 'long unsigned int*'} to 'unsigned int*'
| yajl_gen_get_buf(json, &buf, &len);
| ^~~~
yajl_gen_get_buf() 3rd argument is unsigned int* where size_t* cannot convert to it in 64bit

Directly the 3rd argument type of yajl_gen_get_buf() to be mentioned for length.

- size_t len;
+ unsigned int len;

ERROR: QA Issue: /usr/bin/tr69hostif contained in package tr69hostif requires libds.so()(64bit), but no providers found in RDEPENDS_tr69hostif? [file-rdeps]
ERROR: QA Issue: /usr/lib/libparodusclient.so.0.0.0 contained in package tr69hostif requires libdshalcli.so()(64bit), but no providers found in RDEPENDS_tr69hostif? [file-rdeps]

QA check expects dependency package's libraries which are used on this package

added in recipe

+ RDEPENDS_${PN}_thud += " devicesettings"

tr69agentmeta-rdk-videofatal error: jansson.h: No such file or directoryjansson headers not available under recipe-sysroot directory+DEPENDS += "jansson"
cannot find: -lproc-3.2.8--enable-morty is a configure flag to link procps library based on the build system version. Thud based always provides procps v3.3.14 which gives libprocps.so


DIM_LIBS += -lprocps

- else

- DIM_LIBS += -lproc-3.2.8

- endif

servicemanagermeta-rdk-video| Project ERROR: Unknown module(s) in QT: webkitwidgets webkitAs qtwebkit is deprecated, it is removed from packagegroups and the image bb file+ EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('DISTRO_FEATURES', 'webkit', '', 'DEFINES+=DISABLE_WEBKIT', d)}"

fatal error: QtWidgets: No such file or directory

fatal error: QtOpenGL: No such file or directory

servicemanager.cpp, screencapture.cpp & rtservicemanager.cpp includes <QGraphicsView> and websocketservice.cpp includes <QApplication> but, include directory for these Qt headers are not mentioned in the .pro file

below lines added in servicemanager.pro

message(Building DEFAULT screen capturing)

+            INCLUDEPATH += "${FSROOT}/${includedir}/qt5/QtOpenGL"


+    INCLUDEPATH += "${RDK_FSROOT_PATH}/${includedir}/qt5/QtWidgets"

ERROR: QA Issue: /usr/lib/libservicemanager.so.1.0.0 contained in package servicemanager requires libds.so()(64bit), but no providers found in RDEPENDS_servicemanager? [file-rdeps]
ERROR: QA Issue: /usr/lib/libservicemanager.so.1.0.0 contained in package servicemanager requires libTTSClient.so()(64bit), but no providers found in RDEPENDS_servicemanager? [file-rdeps]

QA runtime dependency error

Added in recipe

+RDEPENDS_${PN}_thud += "devicesettings tts"


| make: Entering directory `build-imx8mqevk/tmp/work/aarch64-rdk-linux/pxcore-standalone/2.x+gitAUTOINC+cedad0852f-r0/git/remote'

|  [CC] rtRemoteConfigGen.cpp| rtRemoteConfigGen.cpp:19:22: fatal error: functional: No such file or directory

|  #include <functional>

|                       ^

fix for unrecognized command line option patch is available but conditionally added only for mortyUnconditionally the patch added to SRC_URI

| ../../git/hnsink/hnsink.cpp: In function 'void cvpIfCheckForDtcpThread(void*)':
| ../../git/hnsink/hnsink.cpp:773:28: error: cast from 'void*' to 'int' loses precision [-fpermissive]
| int dtcpPort= (int)(arg);

on 64bit typecasting from void pointer to int (32bit) type loses precision

Though the conversion is for DTCP port, 32bit is enough

- int dtcpPort= (int)(arg);
+ int dtcpPort= (intptr_t)(arg);


| src/wrp-c.c:675:13: error: 'strncpy' output truncated before terminating nul copying 23 bytes from a string of the same length [-Werror=stringop-truncation]
| strncpy( data, keep_alive_fmt, length );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| cc1: all warnings being treated as errors
| ninja: build stopped: subcommand failed.

thud uses gcc 8.1. From gcc 8 version, it has -Wstringop-truncation error flag which checks the truncation of terminating NUL char from the source string.

Instead of using Wno-stringop-truncation, memcpy() is replaced over strncpy()

Ref. https://github.com/Comcast/wrp-c/pull/80

iarmmgrsmeta-rdk-video| jsonParser.cpp:156:1: error: invalid conversion from 'int (*)(void*, const char*, size_t)' {aka 'int (*)(void*, const char*, long unsigned int)'} to 'int (*)(void*, const char*, unsigned int)' [-fpermissive]struct yajl_callbacks defines 'unsigned int' as 3rd argument in few function pointers but, callback functions defined with size_t. When it comes to 64bit, size_t is taken as 'long unsigned int' which causes invalid conversion

'unsigned int' is given to callback arguments as given as in callback function pointers

-static int parse_number(void * ctx, const char * s, size_t l)
+static int parse_number(void * ctx, const char * s, unsigned int l)

ERROR: QA Issue: /usr/bin/irMgrMain contained in package iarmmgrs requires libdshalcli.so()(64bit), but no providers found in RDEPENDS_iarmmgrs? [file-rdeps]
ERROR: QA Issue: /usr/bin/dsMgrMain contained in package iarmmgrs requires libdshalsrv.so()(64bit), but no providers found in RDEPENDS_iarmmgrs? [file-rdeps]
ERROR: QA Issue: /usr/bin/irMgrMain contained in package iarmmgrs requires libds.so()(64bit), but no providers found in RDEPENDS_iarmmgrs? [file-rdeps]

QA check expects for devicesettings providing library

added in recipe

+ RDEPENDS_${PN}_thud += "devicesettings"


| git/source/qtbase/src/corelib/thread/qmutex_linux.cpp:63:26: error: 'has_trivial_default_constructor' is not a member of 'std'
| Q_STATIC_ASSERT(std::has_trivial_default_constructor<QT_PREPEND_NAMESPACE(QElapsedTimer)>::value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

| git/source/qtbase/src/corelib/thread/qmutex_linux.cpp:63:26: note: suggested alternative: 'is_trivially_default_constructible'
| Q_STATIC_ASSERT(std::has_trivial_default_constructor<QT_PREPEND_NAMESPACE(QElapsedTimer)>::value);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

has_trivial_default_constructor is deprecated

- Q_STATIC_ASSERT(std::has_trivial_default_constructor<QT_PREPEND_NAMESPACE(QElapsedTimer)>::value);
+ Q_STATIC_ASSERT(std::is_trivially_default_constructible<QT_PREPEND_NAMESPACE(QElapsedTimer)>::value);


| /mnt/home/mbaska691/moorthy/rdk/comcast/thud-manifest-nochange/build-imx8mqevk/tmp/work/aarch64-rdk-linux/tts/1.0-r0/recipe-sysroot/usr/include/pxcore/rtObjectMacros.h:196:199: error: nonnull argument 'r' compared to NULL [-Werror=nonnull-compare]
| rtError method##_thunk(int numArgs, const rtValue* args, rtValue& r){returntype rv; rtError e = method(rtGA(0).convert<arg1type>(), rtGA(1).convert<arg2type>(), rtGA(2).convert<arg3type>(), rv); if ((uintptr_t)NULL != (uintptr_t)&r) r.assign<returntype>(rv); return e;}

non NULL argument compared with NULL

Ignored nonnull-compare CXXFLAGS. Changed added in the recipe

+ CXXFLAGS_append_thud = " -Wno-error=nonnull-compare"

stunnelmeta-rdk-extERROR: QA Issue: /usr/bin/stunnel3 contained in package stunnel requires /usr/bin/perl, but no providers found in RDEPENDS_stunnel? [file-rdeps]QA check gives run-time dependency, as the binary uses perl

Added in recipe

+RDEPENDS_${PN}_thud += " perl"


ERROR: QA Issue: /usr/share/ipv6calc/tools/IP2Location-update.sh contained in package ipv6calc requires /bin/bash, but no providers found in RDEPENDS_ipv6calc? [file-rdeps]

ERROR: QA Issue: /usr/share/ipv6calc/tools/ipv6calc-create-registry-list-ipv4.pl contained in package ipv6calc requires /usr/bin/perl, but no providers found in RDEPENDS_ipv6calc?

QA check resolve run-time dependencies, as the binary & script use the deps. packages

Added in recipe

+RDEPENDS_${PN}_thud += " perl bash"

tenablehdcpmeta-rdk-videoERROR: QA Issue: /usr/bin/tenableHDCP contained in package tenablehdcp requires libds.so()(64bit), but no providers found in RDEPENDS_tenablehdcp? [file-rdeps]QA check expects for devicesettings library

added in recipe

+RDEPENDS_${PN}_thud += "devicesettings"


ERROR: QA Issue: /var/www/htmldiag/cgi-bin/getRecordings.sh contained in package rdk-diagnostics requires /bin/bash, but no providers found in RDEPENDS_rdk-diagnostics? [file-rdeps]

QA check expects bash bin for shell script in the package

added in recipe

+RDEPENDS_${PN}_thud += "bash"


checking for gnutls >= 2.10.0... no
configure: error: Package requirements (gnutls >= 2.10.0) were not met:

No package 'gnutls' found

gnutls not in the dependency list

added in recipe

+ DEPENDS_append_thud = " gnutls"

rmfhalheadersmeta-rdk-videormfhalheaders: LIC_FILES_CHKSUM contains an invalid URL: files://.../openembedded-core/../meta-rdk/licenses/RDK;md5=ba986f8eaa991d86ab2ab6f837701a5ffiles:// type is removed from thud system

file type is used

-LIC_FILES_CHKSUM = "files://${COREBASE}/../meta-rdk/licenses/RDK;md5=ba986f8eaa991d86ab2ab6f837701a5f"
+LIC_FILES_CHKSUM = "file://${COREBASE}/../meta-rdk/licenses/RDK;md5=ba986f8eaa991d86ab2ab6f837701a5f"


git/test/Remote.cpp:21:10: fatal error: libIBus.h: No such file or directory
#include "libIBus.h"

IARM related headers are not in the sysroots

added in recipe

+ DEPENDS_append_thud = " iarmmgrs"

dropbearmeta-rdk-extpatch failurefor thud based oe-core has dropbear v 2018.76 where the patches from meta-rdk-ext is based on older version.

Recreating patch for newer dropbear version

+SRC_URI_remove_thud = " file://revsshipv6.patch"
+SRC_URI_append_thud = " file://dropbear2018-revsshipv6.patch"


build-imx8mqevk/tmp/work/aarch64-rdk-linux/parodus/git+AUTOINC+da6614b19d-r0/git/src/conn_interface.c:39:10: fatal error: curl/curl.h: No such file or directory
| #include <curl/curl.h>

thud expects much more clear dependencies.

Added into recipe

+ DEPENDS_append_thud = " curl"


no playback.

rt:ERROR rtRemoteAsyncHandle.cpp:117 -- Thread-6123: Got error response m_error = 1000 (RT_ERROR_TIMEOUT), error = 1000 (RT_ERROR_TIM)
rt:ERROR rtRemoteClient.cpp:339 -- Thread-6123: sendSet err: RT_ERROR_TIMEOUT

[ 1211.688384] rdkmediaplayer invoked oom-killer: gfp_mask=0x26080c0(GFP_KERNEL|__GFP_ZERO|__GFP_NOTRACK), nodemask=0, order=0, oom_s0

[ 1212.414692] Out of memory: Kill process 6165 (rdkmediaplayer) score 614 or sacrifice child

rdkmediaplayer crashed due to 'Out of memory'.

There is no response sent back to RT remote client (pxscene) causing timeout error as the RT remote server (rdkmediaplayer) crashed. rdkmediaplayer met unexpected looping of timer function which creates a continuous memory consumption. gcc 8.1 optimization level made this unexpected looping (i.e) misbehavior in the player side.

The optimizing flag is removed from CXXFLAGS to make it work.

Change is added in recipe

+ CXXFLAGS_remove_thud = " -Os"

rdkbrowser2meta-rdk-videopkg-config: not foundrdkbrowser2 Makefile uses pkg-config to get WPE related CFLAGS and libs.

Added into recipe

+ inherit pkgconfig

| logger.cpp:27:10: fatal error: rdk_debug.h: No such file or directory
| #include "rdk_debug.h"

No rdk-logger added into DEPENDS but, rdk logger enabled in EXTRA_OEMAKE

Added into recipe

+ DEPENDS += "${@bb.utils.contains('EXTRA_OEMAKE', 'ENABLE_RDK_LOGGER=1', 'rdk-logger', '', d)}"

build-imx8mqevk/tmp/work/aarch64-rdk-linux/rdkbrowser2/1.0-r0/recipe-sysroot/usr/include/pxcore/rtObjectMacros.h:193:170: error: nonnull argument 'r' compared to NULL [-Werror=nonnull-compare]Non null comparison throwing error when built from gcc 8.1

added into Makefile_wpe

+ CXXFLAGS += -Wno-nonnull-compare

rdkbrowser_server.cpp -o obj/rdkbrowser_server.o
| logger.cpp: In function 'void RDK::log(RDK::LogLevel, const char*, const char*, int, int, const char*, ...)':
| logger.cpp:66:50: error: '%s' directive output may be truncated writing up to 4095 bytes into a region of size 4092 [-Werror=format-truncation=]

Format truncation check throwing error when built from gcc 8.1

This error is from rdk-logger lib but skipped this flag in this module. Change added into Makefile_wpe.

+ CXXFLAGS += -Wno-format-truncation

  • No labels