-
Notifications
You must be signed in to change notification settings - Fork 4
Thunder team review #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Thunder team review #212
Changes from all commits
3324427
b6e760c
fdc4105
034e5db
3ed996d
d731afd
b18f613
e6d435d
9c65c2d
ddf5841
6a2a905
10c5f29
51180b6
a816846
53aa9f4
6b55778
32bd65d
4b4c3e7
cc261ad
673c305
8ae412d
6201448
b928216
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,6 +50,19 @@ PKG_CHECK_MODULES([DBUS], [dbus-1]) | |||||||||||||
|
|
||||||||||||||
| AC_CHECK_LIB(gthread-2.0, g_thread_init) | ||||||||||||||
|
|
||||||||||||||
| # Thunder COM-RPC plugin support | ||||||||||||||
| AC_ARG_ENABLE([thunder-plugin], | ||||||||||||||
| AS_HELP_STRING([--enable-thunder-plugin], [Enable Thunder COM-RPC plugin support (default: no)]), | ||||||||||||||
| [enable_thunder_plugin=$enableval], | ||||||||||||||
| [enable_thunder_plugin=no]) | ||||||||||||||
|
|
||||||||||||||
| AM_CONDITIONAL([USE_WPE_THUNDER_PLUGIN], [test "x$enable_thunder_plugin" = "xyes"]) | ||||||||||||||
|
|
||||||||||||||
| AS_IF([test "x$enable_thunder_plugin" = "xyes"], | ||||||||||||||
| [AC_DEFINE([USE_WPE_THUNDER_PLUGIN], [1], [Define to 1 to enable Thunder COM-RPC plugin support]) | ||||||||||||||
|
||||||||||||||
| [AC_DEFINE([USE_WPE_THUNDER_PLUGIN], [1], [Define to 1 to enable Thunder COM-RPC plugin support]) | |
| [AC_DEFINE([USE_WPE_THUNDER_PLUGIN], [1], [Define to 1 to enable Thunder COM-RPC plugin support]) | |
| CPPFLAGS="$CPPFLAGS -DUSE_WPE_THUNDER_PLUGIN" |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--enable-thunder-plugin toggles compilation/linking against WPEFramework (Core/COM), but configure.ac does not validate that the required headers and libraries are present (no PKG_CHECK_MODULES / AC_CHECK_HEADERS / AC_CHECK_LIB for Thunder). Enabling this option will likely fail later during compilation/linking with a less actionable error. Add explicit checks and surface a clear configure-time failure or disable the option when dependencies are missing.
| [AC_DEFINE([USE_WPE_THUNDER_PLUGIN], [1], [Define to 1 to enable Thunder COM-RPC plugin support]) | |
| AC_MSG_NOTICE([Thunder COM-RPC plugin support enabled])], | |
| [PKG_CHECK_MODULES([THUNDER], [WPEFrameworkCore WPEFrameworkCOM], | |
| [AC_DEFINE([USE_WPE_THUNDER_PLUGIN], [1], [Define to 1 to enable Thunder COM-RPC plugin support]) | |
| AC_MSG_NOTICE([Thunder COM-RPC plugin support enabled])], | |
| [AC_MSG_ERROR([Thunder COM-RPC plugin support requested, but WPEFramework Core/COM (pkg-config modules WPEFrameworkCore and WPEFrameworkCOM) were not found. Install the appropriate development packages or re-run configure without --enable-thunder-plugin.])])], |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -66,8 +66,10 @@ cd ${RDK_SOURCE_PATH} | |||||||||||||
| export STANDALONE_BUILD_ENABLED=y | ||||||||||||||
| export DS_MGRS=$WORKDIR | ||||||||||||||
|
|
||||||||||||||
| export USE_WPE_THUNDER_PLUGIN=y | ||||||||||||||
|
||||||||||||||
| export USE_WPE_THUNDER_PLUGIN=y | |
| # Thunder/WPEFramework plugin is disabled by default for Coverity builds to | |
| # avoid introducing unresolved link-time dependencies on WPEFrameworkCore/COM. | |
| # It can still be enabled explicitly by exporting USE_WPE_THUNDER_PLUGIN=y | |
| # before invoking this script, in environments where the libraries are present. | |
| export USE_WPE_THUNDER_PLUGIN=${USE_WPE_THUNDER_PLUGIN-n} |
Copilot
AI
Feb 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error in comment. "Devicesttings" should be "DeviceSettings" (missing 'e' and has extra 't').
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script exports USE_WPE_THUNDER_PLUGIN=y, which will switch builds into Thunder mode, but the script only builds/installs stubs for libIARMBus.so and libWPEFrameworkPowerController.so (not libWPEFrameworkCore/libWPEFrameworkCOM) and doesn’t provide the corresponding headers. This is likely to break the Coverity build in environments without real Thunder libraries. Consider gating this export behind an environment check, or add the needed stubs/deps when enabling Thunder mode here.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,261 @@ | ||||||
| /* | ||||||
| * If not stated otherwise in this file or this component's LICENSE file the | ||||||
|
Check failure on line 2 in ds/include/dsController-com.h
|
||||||
| * following copyright and licenses apply: | ||||||
| * | ||||||
| * Copyright 2016 RDK Management | ||||||
| * | ||||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
| * you may not use this file except in compliance with the License. | ||||||
| * You may obtain a copy of the License at | ||||||
| * | ||||||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||||||
| * | ||||||
| * Unless required by applicable law or agreed to in writing, software | ||||||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||||||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||
| * See the License for the specific language governing permissions and | ||||||
| * limitations under the License. | ||||||
| */ | ||||||
|
|
||||||
| /** | ||||||
| * @file DeviceSettingsController.h | ||||||
|
||||||
| * @file DeviceSettingsController.h | |
| * @file dsController-com.h |
Copilot
AI
Feb 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect units in comment. The comment states "300ms in microseconds" but the value 300000 is actually 300 milliseconds when used with usleep() which expects microseconds. The comment should say "300ms converted to microseconds (300000 µs)" or simply "300000 microseconds (300ms)" to avoid confusion.
| #define DS_CONTROLLER_CONNECT_WAIT_TIME_MS 300000 // 300ms in microseconds | |
| #define DS_CONTROLLER_CONNECT_WAIT_TIME_MS 300000 // 300ms converted to microseconds (300000 µs) |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,8 +21,20 @@ CFLAGS += -g -fPIC -D_REENTRANT -Wall | |||||||||||||
| LIBNAME := dshalcli | ||||||||||||||
| LIBNAMEFULL := lib$(LIBNAME).so | ||||||||||||||
| INSTALL := $(PWD)/install | ||||||||||||||
| OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp)) | ||||||||||||||
| OBJS += $(patsubst %.c,%.o,$(wildcard *.c)) | ||||||||||||||
|
|
||||||||||||||
| # Conditional compilation: Thunder vs IARM | ||||||||||||||
| ifdef USE_WPE_THUNDER_PLUGIN | ||||||||||||||
|
||||||||||||||
| # Thunder mode - use dsFPD-com.cpp and dsController-com.cpp, exclude dsFPD.c | ||||||||||||||
| OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp)) | ||||||||||||||
| OBJS += $(patsubst %.c,%.o,$(filter-out dsFPD.c,$(wildcard *.c))) | ||||||||||||||
| else | ||||||||||||||
| # IARM mode - use dsFPD.c, exclude both dsFPD-com.cpp and dsController-com.cpp | ||||||||||||||
| OBJS := $(patsubst %.cpp,%.o,$(filter-out dsFPD-com.cpp dsController-com.cpp,$(wildcard *.cpp))) | ||||||||||||||
| OBJS += $(patsubst %.c,%.o,$(wildcard *.c)) | ||||||||||||||
| endif | ||||||||||||||
|
Comment on lines
25
to
34
|
||||||||||||||
|
|
||||||||||||||
| #OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp)) | ||||||||||||||
| #OBJS += $(patsubst %.c,%.o,$(wildcard *.c)) | ||||||||||||||
|
Comment on lines
+36
to
+37
|
||||||||||||||
| #OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp)) | |
| #OBJS += $(patsubst %.c,%.o,$(wildcard *.c)) |
Copilot
AI
Feb 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Thunder mode, LDLIBS drops -lIARMBus, but most other rpc/cli sources (e.g., dsAudio.c, dsDisplay.c, dsHost.cpp, dsVideo*.c) still call IARM_Bus_Call and require IARMBus symbols. This will either fail to link or produce a lib with unresolved dependencies. Keep -lIARMBus in Thunder mode as well (and add Thunder libs on top), or conditionally exclude/replace the other IARM-based sources too.
| LDLIBS := -lWPEFrameworkCore -lWPEFrameworkCOM | |
| else | |
| # Thunder mode: still need IARMBus symbols plus Thunder libraries | |
| LDLIBS := -lIARMBus -lWPEFrameworkCore -lWPEFrameworkCOM | |
| else | |
| # IARM-only mode |
Copilot
AI
Feb 17, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Makefile conditionally compiles based on USE_WPE_THUNDER_PLUGIN, but this macro is not added to CFLAGS. The source file dsFPD-com.cpp uses #ifdef USE_WPE_THUNDER_PLUGIN (line 27 in that file) to conditionally compile the Thunder implementation. Without -DUSE_WPE_THUNDER_PLUGIN in CFLAGS, the code in dsFPD-com.cpp will not be compiled even when it's included in the build. Add -DUSE_WPE_THUNDER_PLUGIN to CFLAGS when Thunder mode is enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This target prints
DSApp executable: $(abs_top_builddir)/DSApp, but the underlyingsample/Makefilecurrently builds DSApp to../DSApprelative tosample/, which won’t match$(abs_top_builddir)in out-of-tree builds. Align the build output path and the reported path (ideally output into$(abs_top_builddir)/$(top_builddir)).