RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Rdkservices Generic Patches for code Upstream | |||||
S.No. | Patches | Patch Content | Patch details | ||
1 | 0001-OCDM-plugin-startup-failure.patch Patch Jira link: https://jira.rdkcentral.com/jira/browse/RDKVREFPLT-1073 | From 63e09373eecaee0efae00f23e5ef4589088bd9ec Mon Sep 17 00:00:00 2001 From: natraj_sankarasubbaian <natraj_sankarasubbaian@comcast.com> Date: Tue, 12 Mar 2024 11:46:53 +0000 Subject: [PATCH] AMLS905X4-1488,RTD131X-1131 - OCDM plugin startup failure Reason for change: OCDM plugin is not getting activated on startup by default Test Procedure: Check OCDM plugin is activated at startup of device Risks: High Signed-off-by:natraj_sankarasubbaian@comcast.com --- OpenCDMi/OCDM.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenCDMi/OCDM.conf.in b/OpenCDMi/OCDM.conf.in index 2679ceab4..7fd279635 100644 --- a/OpenCDMi/OCDM.conf.in +++ b/OpenCDMi/OCDM.conf.in @@ -1,4 +1,4 @@ -precondition = ["Provisioning"] +precondition = ["Platform"] autostart = "@PLUGIN_OPENCDMI_AUTOSTART@" if boolean("@PLUGIN_OPENCDMI_PLAYREADY_NEXUS@") or \ -- 2.17.1 | Issue is due to precondition of OCDM plugin is not met on wpeframework startup. Failure of precondition result failure to create socket(i.e /tmp/ocdm file) which results exit on playing encrypted contents. there is extra spaces in OCDM.conf.in which is removed by Comcast, which causing this issue Now by removing the extra spaces, it requires for provisoning, which we dont have support on VA devices. | ||
2 | 0001-RDKCOM-2201-RDKService-plugin-config-configurable.patch Patch Jira link: https://ccp.sys.comcast.net/browse/RDKCOM-2201 | From 39431ad4914f787818710376c29da6e6a084a851 Mon Sep 17 00:00:00 2001 From: Arun P Madhavan <arun_madhavan@comcast.com> Date: Tue, 29 Jun 2021 19:28:35 +0000 Subject: [PATCH] RDKCOM-2201: RDKService plugin config configurable Reason for change: Make rdkservices plugin configs configurable from recipe/build options. Added default settings in recipe. Test Procedure: Build complete image and test respective plugins. Risks: Medium Signed-off-by: Arun Madhavan <arun_madhavan@comcast.com> --- DisplaySettings/CMakeLists.txt | 4 ++++ DisplaySettings/DisplaySettings.config | 4 +++- SystemServices/CMakeLists.txt | 4 ++++ SystemServices/SystemServices.config | 7 ++++--- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/DisplaySettings/CMakeLists.txt b/DisplaySettings/CMakeLists.txt index eb61307f..53999040 100644 --- a/DisplaySettings/CMakeLists.txt +++ b/DisplaySettings/CMakeLists.txt @@ -23,6 +23,10 @@ set(PLUGIN_DISPLAYSETTINGS_STARTUPORDER "" CACHE STRING "To configure startup or find_package(${NAMESPACE}Plugins REQUIRED) +# Plugin Configurations +set(PLUGIN_DISPLAYSETTINGS_AUTOSTART false CACHE STRING "To automatically start DisplaySettings plugin.") +set(PLUGIN_DISPLAYSETTINGS_PRECONDITIONS_EXTRA "" CACHE STRING "To add extra preconditions.") + add_library(${MODULE_NAME} SHARED DisplaySettings.cpp Module.cpp) diff --git a/DisplaySettings/DisplaySettings.config b/DisplaySettings/DisplaySettings.config index b5612846..f863e575 100644 --- a/DisplaySettings/DisplaySettings.config +++ b/DisplaySettings/DisplaySettings.config @@ -1,5 +1,7 @@ set (autostart ${PLUGIN_DISPLAYSETTINGS_AUTOSTART}) -set (preconditions Platform) +# Pass PLUGIN_DISPLAYSETTINGS_PRECONDITIONS_EXTRA as SemiColon seperated 'Preconditions' as string. +# Eg: PLUGIN_DISPLAYSETTINGS_PRECONDITIONS_EXTRA ?= "Graphics;Time" +set (preconditions Platform ${PLUGIN_DISPLAYSETTINGS_PRECONDITIONS_EXTRA}) set (callsign "org.rdk.DisplaySettings") if(PLUGIN_DISPLAYSETTINGS_STARTUPORDER) diff --git a/SystemServices/CMakeLists.txt b/SystemServices/CMakeLists.txt index 043e37f0..7e7f6096 100644 --- a/SystemServices/CMakeLists.txt +++ b/SystemServices/CMakeLists.txt @@ -22,6 +22,10 @@ set(PLUGIN_SYSTEMSERVICE_STARTUPORDER "" CACHE STRING "To configure startup orde find_package(${NAMESPACE}Plugins REQUIRED) +# Plugin Configurations. +set(PLUGIN_SYSTEM_AUTOSTART false CACHE STRING "To automatically start System plugin.") +set(PLUGIN_SYSTEM_PRECONDITIONS_EXTRA "" CACHE STRING "To add extra preconditions.") + if(BUILD_TESTS) add_subdirectory(TestClient) endif() diff --git a/SystemServices/SystemServices.config b/SystemServices/SystemServices.config index 52f450a2..db1cc370 100644 --- a/SystemServices/SystemServices.config +++ b/SystemServices/SystemServices.config @@ -1,7 +1,8 @@ -set (autostart false) -set (preconditions Platform) +set (autostart ${PLUGIN_SYSTEM_AUTOSTART}) +# Pass PLUGIN_SYSTEM_PRECONDITIONS_EXTRA as SemiColon seperated 'Preconditions' as string. +# Eg: PLUGIN_SYSTEM_PRECONDITIONS_EXTRA ?= "Graphics;Time" +set (preconditions Platform ${PLUGIN_SYSTEM_PRECONDITIONS_EXTRA}) set (callsign "org.rdk.System") - if(PLUGIN_SYSTEMSERVICE_STARTUPORDER) set (startuporder ${PLUGIN_SYSTEMSERVICE_STARTUPORDER}) endif() -- 2.37.0 (Apple Git-136) | Make rdkservices plugin configs configurable from recipe/build options. Added default settings in recipe. Community build require few plugins to have autostart true and extra-preconditions to be configurable from build. Scope of autostart: Can be used to activate plugins without UI intervention. Scope of preconditions: Can be used to streamline the plugin startup order based on Thunder precondition events. Few plugins(System and DisplaySettings) need to be made autostart true to reduce the startup delay and aid resident UI for user input handling (Changes related to switching Power mode, Play/Pause controls etc) as well as to initialize device features at startup. If autostart option is enabled; we may require custom precondition ordering as well. Current RDKServices plugins(almost all plugins) does not expose any build-time variables to alter plugin configurations. (Eg: autostart, preconditions etc.). ThunderNanoServices and Common port PremiumApp plugins are exposing build time configuration options (Eg: DeviceIdentification, OCDM, WebKitBrowser, etc) where we could alter those from recipe/build configurations. Aim: Bring-in changes to seleccted rdkservices plugins to expose plugin configuration alterable from build/recipe. | ||
3 | warehouse-rdkservices.patch Patch CL link: https://code.rdkcentral.com/r/c/components/generic/rdk-oe/meta-cmf-video/+/69934 | Index: git/Warehouse/Warehouse.cpp =================================================================== --- git.orig/Warehouse/Warehouse.cpp +++ git/Warehouse/Warehouse.cpp @@ -21,7 +21,7 @@ #include <algorithm> #include <fstream> - +#include "secure_wrapper.h" #include <regex.h> #if defined(USE_IARMBUS) || defined(USE_IARM_BUS) @@ -66,7 +66,7 @@ #define VERSION_FILE_NAME "/version.txt" #define CUSTOM_DATA_FILE "/lib/rdk/wh_api_5.conf" -#define LIGHT_RESET_SCRIPT "rm -rf /opt/netflix/* SD_CARD_MOUNT_PATH/netflix/* XDG_DATA_HOME/* XDG_CACHE_HOME/* XDG_CACHE_HOME/../.sparkStorage/ /opt/QT/home/data/* /opt/hn_service_settings.conf /opt/apps/common/proxies.conf /opt/lib/bluetooth /opt/persistent/rdkservicestore" +#define LIGHT_RESET_SCRIPT "/opt/netflix/* SD_CARD_MOUNT_PATH/netflix/* XDG_DATA_HOME/* XDG_CACHE_HOME/* XDG_CACHE_HOME/../.sparkStorage/ /opt/QT/home/data/* /opt/hn_service_settings.conf /opt/apps/common/proxies.conf /opt/lib/bluetooth /opt/persistent/rdkservicestore" #define INTERNAL_RESET_SCRIPT "rm -rf /opt/drm /opt/www/whitebox /opt/www/authService && /rebootNow.sh -s WarehouseService &" #define FRONT_PANEL_NONE -1 @@ -256,33 +256,6 @@ namespace WPEFramework } } - static bool RunScriptIARM(const std::string& script, std::string& error) - { - IARM_Bus_SYSMgr_RunScript_t runScriptParam; - runScriptParam.return_value = -1; - size_t len = sizeof(runScriptParam.script_path)/sizeof(char); - if(script.length() > (len - 1)) - { - std::stringstream errorss; - errorss << "Length of script greater than allowed limit of " << len << "."; - error = errorss.str(); - - LOGWARN("%s", error.c_str()); - return false; - } - - strcpy(runScriptParam.script_path, script.c_str()); - IARM_Bus_Call(IARM_BUS_SYSMGR_NAME, IARM_BUS_SYSMGR_API_RunScript, &runScriptParam, sizeof(runScriptParam)); - bool ok = runScriptParam.return_value == 0; - - std::stringstream message; - message << "script returned: " << runScriptParam.return_value; - - LOGINFO("%s", message.str().c_str()); - if (!ok) - error = message.str(); - return ok; - } #endif void Warehouse::resetDevice(bool suppressReboot, const string& resetType) @@ -500,7 +473,8 @@ namespace WPEFramework { #if defined(USE_IARMBUS) || defined(USE_IARM_BUS) std::string error; - bool ok = RunScriptIARM(INTERNAL_RESET_SCRIPT, error); + int return_value = v_secure_system("rm -rf /opt/drm /opt/www/whitebox /opt/www/authService && /rebootNow.sh -s WarehouseService &"); + bool ok = return_value == 0; response[PARAM_SUCCESS] = ok; if (!ok) response[PARAM_ERROR] = error; @@ -576,7 +550,8 @@ namespace WPEFramework LOGWARN("lightReset: %s", script.c_str()); std::string error; - bool ok = RunScriptIARM(script, error); + int return_value = v_secure_system("rm -rf %s", script.c_str()); + bool ok = return_value == 0; remove("/opt/secure/persistent/rdkservicestore"); | Changes are pushed by Simon Chung (2022-04-12) | ||
4 | rdkshell-changes-crash.patch Patch Jira link: https://jira.rdkcentral.com/jira/browse/AMLS905X4-1378 | diff --git a/RDKShell/RDKShell.h b/RDKShell/RDKShell.h index 0d2bd2c5..cecd76e4 100755 --- a/RDKShell/RDKShell.h +++ b/RDKShell/RDKShell.h @@ -428,7 +428,7 @@ namespace WPEFramework { INTERFACE_ENTRY(Exchange::ICapture) END_INTERFACE_MAP - virtual void AddRef() const {} + virtual uint32_t AddRef() const {return Core::ERROR_NONE;} virtual uint32_t Release() const { return 0; } virtual const TCHAR* Name() const override { return "ScreenCapture"; } | There is a crash occurred in Wpeframework while executing RVS test For this received some fix from Comcast recipes-extended/wpe-framework/wpeframework/PR_1510_change.patch recipes-extended/wpe-framework/wpeframework/PR_1514_changes.patch https://code.rdkcentral.com/r/c/components/generic/rdk-oe/meta-cmf-video/+/98652 | ||
5 | 0003-Update-WebKitBrowser-useragent-deails-in-system-plugin-platformcapsdata-file.patch Patch Jira link: https://jira.rdkcentral.com/jira/browse/RTD131X-719 | diff --git a/SystemServices/platformcaps/platformcapsdata.cpp b/SystemServices/platformcaps/platformcapsdata.cpp index d43e9eec..94509108 100644 --- a/SystemServices/platformcaps/platformcapsdata.cpp +++ b/SystemServices/platformcaps/platformcapsdata.cpp @@ -238,8 +238,8 @@ PlatformCapsData::BrowserInfo PlatformCapsData::GetBrowser() const { if (type == "rdkbrowser") { result = {"WPE", "1.0.0.0", - "Mozilla/5.0 (Linux; x86_64 GNU/Linux) AppleWebKit/601.1 " - "(KHTML, like Gecko) Version/8.0 Safari/601.1 WPE"}; + "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/605.1.15 " + "(KHTML, like Gecko) Version/16.0 Safari/605.1.15 WPE/1.0"}; } else if (type == "cef") { result = {"CEF", "1.0.0.0", "Mozilla/5.0 (Unknown; Linux i686) AppleWebKit/537.21 " @@ -250,8 +250,8 @@ PlatformCapsData::BrowserInfo PlatformCapsData::GetBrowser() const { "(KHTML, like Gecko) NativeXREReceiver"}; } else { result = {"WPE", "1.0.0.0", - "Mozilla/5.0 (Linux; x86_64 GNU/Linux) AppleWebKit/601.1 " - "(KHTML, like Gecko) Version/8.0 Safari/601.1 WPE"}; + "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/605.1.15 " + "(KHTML, like Gecko) Version/16.0 Safari/605.1.15 WPE/1.0"}; } return result; | root@mediaclient-mediabox:~# curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0","id": 42,"method": "WebKitBrowser.1.useragent"}' http://127.0.0.1:9998/jsonrpc {"jsonrpc":"2.0","id":42,"result":"Mozilla\/5.0 (X11; Linux armv7l) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/13.0 Safari\/605.1.15 WPE\/1.0"} root@mediaclient-mediabox:~# curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0", "id":23,"method":"org.rdk.System.2.getPlatformConfiguration", "params":{"query":"DeviceInfo.webBrowser"}}' http://127.0.0.1:9998/jsonrpc {"jsonrpc":"2.0","id":23,"result":{"DeviceInfo":{"webBrowser":{"browserType":"WPE","version":"1.0.0.0","userAgent":"Mozilla\/5.0 (Linux; x86_64 GNU\/Linux) AppleWebKit\/601.1 (KHTML, like Gecko) Version\/8.0 Safari\/601.1 WPE"}},"success":true}} here getPlatformConfiguration api is not returning the correct response of useragent tis is fetch from, PlatformCapsData::GetBrowser() (SystemServices/platformcaps/platformcapsdata.cpp) so added as a patch to removed the old useragent and added the latest one | ||
SRC_URI += " ${@bb.utils.contains('DISTRO_FEATURES', 'riot', ' file://0005-Introduce-RIoTControl-plugin-To-Community.patch','', d)}" SRC_URI += " ${@bb.utils.contains('DISTRO_FEATURES', 'tinyrdk', ' file://0002-Listen-to-keyevents.patch','', d)}" | |||||
6 | 0002-Listen-to-keyevents.patch Patch CL link: https://code.rdkcentral.com/r/c/components/generic/rdk-oe/meta-cmf-video/+/79615 https://jira.rdkcentral.com/jira/browse/TINYRDKV-166 | From 3a6e2e8d1033788ef8c5263ce52f842756545a15 Mon Sep 17 00:00:00 2001 From: josekutty_kuriakose <josekutty_kuriakose@cable.comcast.com> Date: Thu, 21 Apr 2022 02:31:34 +0000 Subject: [PATCH] Changes for keyevents --- RDKShell/RDKShell.cpp | 10 ++++++++++ RDKShell/RDKShell.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/RDKShell/RDKShell.cpp b/RDKShell/RDKShell.cpp index 0b387304d..29d80253e 100755 --- a/RDKShell/RDKShell.cpp +++ b/RDKShell/RDKShell.cpp @@ -139,6 +139,7 @@ const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_DEVICE_CRITICALLY_LO const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_EASTER_EGG = "onEasterEgg"; const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_WILL_DESTROY = "onWillDestroy"; const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_SCREENSHOT_COMPLETE = "onScreenshotComplete"; +const string WPEFramework::Plugin::RDKShell::RDKSHELL_EVENT_ON_KEYEVENT = "onKeyEvent"; using namespace std; using namespace RdkShell; @@ -1601,6 +1602,15 @@ namespace WPEFramework { params["client"] = client; mShell.notify(RDKSHELL_EVENT_SIZE_CHANGE_COMPLETE, params); } + void RDKShell::RdkShellListener::onKeyEvent(const uint32_t keyCode, const uint32_t flags, const bool keyDown) + { + std::cout << "RDKShell onKeyEvent event received ..." << keyCode << std::endl; + JsonObject params; + params["keycode"] = keyCode; + params["flags"] = flags; + params["keyDown"] = keyDown; + mShell.notify(RDKSHELL_EVENT_ON_KEYEVENT, params); + } // Registered methods (wrappers) begin uint32_t RDKShell::moveToFrontWrapper(const JsonObject& parameters, JsonObject& response) diff --git a/RDKShell/RDKShell.h b/RDKShell/RDKShell.h index fcbf7532c..8b2980c36 100755 --- a/RDKShell/RDKShell.h +++ b/RDKShell/RDKShell.h @@ -148,6 +148,7 @@ namespace WPEFramework { static const string RDKSHELL_EVENT_ON_EASTER_EGG; static const string RDKSHELL_EVENT_ON_WILL_DESTROY; static const string RDKSHELL_EVENT_ON_SCREENSHOT_COMPLETE; + static const string RDKSHELL_EVENT_ON_KEYEVENT; void notify(const std::string& event, const JsonObject& parameters); void pluginEventHandler(const JsonObject& parameters); @@ -332,6 +333,7 @@ namespace WPEFramework { virtual void onEasterEgg(const std::string& name, const std::string& actionJson); virtual void onPowerKey(); virtual void onSizeChangeComplete(const std::string& client); + virtual void onKeyEvent(const uint32_t keyCode, const uint32_t flags, const bool keyDown); private: RDKShell& mShell; | TINYRDKV-166: Key listener patches Reason for change: This one taps the key events from RDKShell and pushes it to monitor application. Test Procedure: Enable distro feature for tinyrdk Risks: This will be disabled by default. | ||
7 | 0005-Introduce-RIoTControl-plugin-To-Community.patch Patch CL link: https://code.rdkcentral.com/r/c/components/generic/rdk-oe/meta-cmf-video/+/89475 https://jira.rdkcentral.com/jira/browse/RDKVVA-43 | Index: git/cmake/FindAvahi.cmake =================================================================== --- /dev/null +++ git/cmake/FindAvahi.cmake @@ -0,0 +1,6 @@ +find_package(PkgConfig) + +find_library(AVAHI_CLIENT_LIBRARIES NAMES avahi-client) +find_library(AVAHI_COMMON_LIBRARIES NAMES avahi-common) +mark_as_advanced(AVAHI_CLIENT_LIBRARIES) +mark_as_advanced(AVAHI_COMMON_LIBRARIES) Index: git/CMakeLists.txt =================================================================== --- git.orig/CMakeLists.txt +++ git/CMakeLists.txt @@ -31,6 +31,7 @@ if(COMCAST_CONFIG) endif() option(PLUGIN_OCICONTAINER "Include OCIContainer plugin" OFF) +option(PLUGIN_RIOTCONTROL "Include IOTControl plugin" OFF) if(RDK_SERVICES_TEST) include(tests.cmake) @@ -367,6 +368,10 @@ if(PLUGIN_AIRPLAYSERVICE) add_subdirectory(AirplayService) endif() +if (PLUGIN_RIOTCONTROL) + add_subdirectory(RIoTControl) +endif() + if(WPEFRAMEWORK_CREATE_IPKG_TARGETS) set(CPACK_GENERATOR "DEB") set(CPACK_DEB_COMPONENT_INSTALL ON) Index: git/RIoTControl/AvahiClient.cpp =================================================================== --- /dev/null +++ git/RIoTControl/AvahiClient.cpp @@ -0,0 +1,242 @@ +/** + * If not stated otherwise in this file or this component's LICENSE + * file the following copyright and licenses apply: + * + * Copyright 2023 RDK Management | RIoT rdkservices plugin. This can be used to query the devices from rdkb gateway, retrieve device characteristics and execute commands on the IoT device. |
1 Comment
Selva Kumar
Got comments from JoseKutty for the above patches,
0001-OCDM-plugin-startup-failure.patch
This is cmf specific. Comcast uses provisioning as pre-condition. So let us keep this in cmf layer
0001-RDKCOM-2201-RDKService-plugin-config-configurable.patch -We can push this
warehouse-rdkservices.patch. Keep this in cmf layer. it is community specific
rdkshell-changes-crash.patch - This is dependent on wpeframework patch (PR_1510_change.patch). Keep this in cmf layer
5,6,7 - No . We should keep it in cmf layer. those are distro based CMF PoCs.