-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/rdkemw 9659 device settings client library #211
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?
Changes from 4 commits
3324427
b6e760c
fdc4105
034e5db
d220f98
94475ec
402f9bf
70a09eb
3944baf
7e25fcc
8c15bc0
59ccd08
69ef6ab
2823278
29e9c5e
13a8e6d
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -66,8 +66,10 @@ cd ${RDK_SOURCE_PATH} | |||||
| export STANDALONE_BUILD_ENABLED=y | ||||||
| export DS_MGRS=$WORKDIR | ||||||
|
|
||||||
| export USE_WPE_THUNDER_PLUGIN=y | ||||||
|
||||||
|
|
||||||
| find $WORKDIR -iname "*.o" -exec rm -v {} \; | ||||||
| find $WORKDIR -iname "*.so*" -exec rm -v {} \; | ||||||
|
|
||||||
| echo "##### Triggering make" | ||||||
| make CFLAGS+='-fPIC -DDSMGR_LOGGER_ENABLED=ON -DRDK_DSHAL_NAME=\"libdshal.so\" -I${DS_IF_PATH}/include -I${DS_HAL_PATH} -I${DS_MGRS}/stubs -I${IARMBUS_PATH}/core -I${IARMBUS_PATH}/core/include -I${IARM_MGRS}/sysmgr/include -I${DS_MGRS}/ds/include -I${DS_MGRS}/rpc/include -I${POWER_IF_PATH}/include/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I${IARM_MGRS}/mfr/include/ -I${IARM_MGRS}/mfr/common -I${DEEPSLEEP_IF_PATH}/include -I${IARM_MGRS}/hal/include -I${IARM_MGRS}/power -I${IARM_MGRS}/power/include' LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -L/usr/local/include -lglib-2.0 -lIARMBus -lWPEFrameworkPowerController -ldshal" | ||||||
| make CFLAGS+='-fPIC -DDSMGR_LOGGER_ENABLED=ON -DRDK_DSHAL_NAME=\"libdshal.so\" -I${DS_IF_PATH}/include -I${DS_HAL_PATH} -I${DS_MGRS}/stubs -I${IARMBUS_PATH}/core -I${IARMBUS_PATH}/core/include -I${IARM_MGRS}/sysmgr/include -I${DS_MGRS}/ds/include -I${DS_MGRS}/rpc/include -I${POWER_IF_PATH}/include/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I${IARM_MGRS}/mfr/include/ -I${IARM_MGRS}/mfr/common -I${DEEPSLEEP_IF_PATH}/include -I${IARM_MGRS}/hal/include -I${IARM_MGRS}/power -I${IARM_MGRS}/power/include' LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -L/usr/local/include -lglib-2.0 -lIARMBus -lWPEFrameworkPowerController -ldshal" | ||||||
|
||||||
| make CFLAGS+='-fPIC -DDSMGR_LOGGER_ENABLED=ON -DRDK_DSHAL_NAME=\"libdshal.so\" -I${DS_IF_PATH}/include -I${DS_HAL_PATH} -I${DS_MGRS}/stubs -I${IARMBUS_PATH}/core -I${IARMBUS_PATH}/core/include -I${IARM_MGRS}/sysmgr/include -I${DS_MGRS}/ds/include -I${DS_MGRS}/rpc/include -I${POWER_IF_PATH}/include/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I${IARM_MGRS}/mfr/include/ -I${IARM_MGRS}/mfr/common -I${DEEPSLEEP_IF_PATH}/include -I${IARM_MGRS}/hal/include -I${IARM_MGRS}/power -I${IARM_MGRS}/power/include' LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -L/usr/local/include -lglib-2.0 -lIARMBus -lWPEFrameworkPowerController -ldshal" | |
| make CFLAGS+='-fPIC -DDSMGR_LOGGER_ENABLED=ON -DUSE_WPE_THUNDER_PLUGIN -DRDK_DSHAL_NAME=\"libdshal.so\" -I${DS_IF_PATH}/include -I${DS_HAL_PATH} -I${DS_MGRS}/stubs -I${IARMBUS_PATH}/core -I${IARMBUS_PATH}/core/include -I${IARM_MGRS}/sysmgr/include -I${DS_MGRS}/ds/include -I${DS_MGRS}/rpc/include -I${POWER_IF_PATH}/include/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I${IARM_MGRS}/mfr/include/ -I${IARM_MGRS}/mfr/common -I${DEEPSLEEP_IF_PATH}/include -I${IARM_MGRS}/hal/include -I${IARM_MGRS}/power -I${IARM_MGRS}/power/include' LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -L/usr/local/include -lglib-2.0 -lIARMBus -lWPEFrameworkPowerController -ldshal" |
| 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, 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 dsFPD-com.cpp | ||||||||||
| OBJS := $(patsubst %.cpp,%.o,$(filter-out dsFPD-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 5, 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.
These commented-out lines should be removed rather than left as comments. Dead code in makefiles can cause confusion about the actual build logic.
| #OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp)) | |
| #OBJS += $(patsubst %.c,%.o,$(wildcard *.c)) |
Copilot
AI
Feb 4, 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 is set to only -lWPEFrameworkCore/-lWPEFrameworkCOM, but most of the CLI objects (e.g., dsAudio.c/dsDisplay.c/dsHost.cpp) still call IARM_Bus_* APIs. Dropping -lIARMBus can lead to undefined-symbol failures at link/load time. Include -lIARMBus in Thunder mode as well (or gate the other IARM-based sources behind the same feature flag).
| LDLIBS := -lWPEFrameworkCore -lWPEFrameworkCOM | |
| LDLIBS := -lWPEFrameworkCore -lWPEFrameworkCOM -lIARMBus |
Copilot
AI
Feb 5, 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.
When USE_WPE_THUNDER_PLUGIN is set as an environment variable or make variable, the Makefile correctly adjusts OBJS and LDLIBS. However, the C/C++ preprocessor directives in the source code also check for USE_WPE_THUNDER_PLUGIN. The Makefile should add -DUSE_WPE_THUNDER_PLUGIN to CFLAGS when this variable is set, otherwise the source files won't be compiled with the correct preprocessor definition.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,4 +28,15 @@ INCLUDE_FILES = -I=$(includedir)/rdk/halif/ds-hal \ | |
| lib_LTLIBRARIES = libdshalcli.la | ||
| libdshalcli_la_CPPFLAGS = $(INCLUDE_FILES) | ||
| libdshalcli_la_CFLAGS = -g -fPIC -D_REENTRANT -Wall | ||
| libdshalcli_la_SOURCES = dsAudio.c dsclientlogger.c dsDisplay.c dsFPD.c dsHost.cpp dsVideoDevice.c dsVideoPort.c | ||
|
|
||
| # Conditional compilation for Thunder COM-RPC | ||
| if USE_THUNDER_PLUGIN | ||
| FPD_SOURCE = dsFPD-com.cpp | ||
| THUNDER_LIBS = -lWPEFrameworkCore -lWPEFrameworkCOM | ||
| else | ||
| FPD_SOURCE = dsFPD.c | ||
| THUNDER_LIBS = | ||
| endif | ||
|
|
||
| libdshalcli_la_SOURCES = dsAudio.c dsclientlogger.c dsDisplay.c $(FPD_SOURCE) dsHost.cpp dsVideoDevice.c dsVideoPort.c | ||
|
||
| libdshalcli_la_LIBADD = $(THUNDER_LIBS) | ||
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 only AC_DEFINEs USE_WPE_THUNDER_PLUGIN into cfg/config.h, but no source in this repo includes config.h and the build files don’t add -DUSE_WPE_THUNDER_PLUGIN, so the option will not actually enable the Thunder codepaths. Also, enabling this feature doesn’t check for required Thunder headers/libs (WPEFrameworkCore/COM), so configure can succeed and fail later at build/link. Consider adding proper detection (PKG_CHECK_MODULES/AC_CHECK_LIB+AC_CHECK_HEADERS) and exporting the needed CPPFLAGS/LIBS when enabled.