Skip to content

Commit 5533444

Browse files
committed
RDKEMW:2436: hg-bringup branch move to rdkcentral
Reason for change: hg-bringup branch move to rdkcentral Test Procedure: None Risks: Low Priority: P1 Signed-off-by:[email protected]
1 parent baa545b commit 5533444

38 files changed

+1125
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
SRCREV:pn-commonutilities = "5687b0851cf0c7e93ddd708c068ee812dd0daff4"
2+
SRCREV:pn-rdk-logger = "3accfb141546bc35f25e64d9156c8cbfbf53ba39"
3+
SRCREV:systemtimemgrifc = "f632673f122f84b74abfca32b67c503ab4037c5f"
4+
SRCREV:systemtimemgrfactory="f632673f122f84b74abfca32b67c503ab4037c5f"
5+
SRCREV:systemtimemgr = "f632673f122f84b74abfca32b67c503ab4037c5f"
6+
7+
SRCREV_systemtimemgrifc = "f632673f122f84b74abfca32b67c503ab4037c5f"
8+
SRCREV_systemtimemgrfactory="f632673f122f84b74abfca32b67c503ab4037c5f"
9+
SRCREV_systemtimemgr = "f632673f122f84b74abfca32b67c503ab4037c5f"
10+
11+
SRCREV_devicesettings = "2a32343a876ee2a1c09a6f7334492ef22031243a"
12+
SRCREV:pn-tvsettings = "8196da319700168772362750527a7d16e088cd03"

conf/include/sky-override.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SKY_ASSYSTEMSERVICE_TAG = "3425133d59bb060a1fdbc73193c754b648f65b56"
2+
SKY_ASPLAYER_TAG = "7825b74efa998598ae4fbbd904c885a4fead5793"
3+

conf/layer.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ LAYERSERIES_COMPAT_middleware-generic-support = "dunfell kirkstone"
1717
require include/generic-srcrev.inc
1818
require include/generic-pkgrev.inc
1919
require include/generic-middleware.inc
20+
21+
#TODO Remove this work around once compile time waringing turned errors are solved
22+
SECURITY_CFLAGS:remove = " -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wno-error=format-security -Wno-error=unused-result"
23+
24+
require include/generic-srcrev-override.inc
25+
require include/sky-override.inc
26+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
SUMMARY = "Packagegroup for middleware layer"
2+
3+
#Generic components
4+
RDEPENDS:${PN}:remove += " \
5+
sky-nrdplugin \
6+
airplay-application \
7+
airplay-daemon \
8+
netflix \
9+
\
10+
libloader-app \
11+
cobaltwidget \
12+
starboard-nplb-widget \
13+
\
14+
ctrlm-irdb-uei \
15+
"
16+
17+
DEPENDS:remove += " sky-nrdplugin airplay-application airplay-daemon cobaltwidget"
18+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
SRC_URI:remove = "git://${RDK_GIT}/rdk/yocto_oe/layers/iarmmgrs-hal-sample;protocol=${RDK_GIT_PROTOCOL};branch=${RDK_GIT_BRANCH}"
3+
SRC_URI = "git://${RDK_GIT}/rdk/yocto_oe/layers/iarmmgrs-hal-sample;protocol=${RDK_GIT_PROTOCOL};nobranch=1"
4+
5+
6+
#Bring in code changes with power hal removed from noop
7+
SRCREV = "239d8c6549f06ccd39ed9872f0429ebc8a7c5f81"
8+
9+
DEPENDS += " deepsleep-manager-headers power-manager-headers "
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
#disable auto start
3+
do_install:append() {
4+
sed -i 's/"autostart":true/"autostart":false/g' ${D}/etc/WPEFramework/plugins/TVMgr.json
5+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
SUMMARY = "Middleware reference image"
2+
LICENSE = "MIT"
3+
4+
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
5+
6+
#inherit core-image custom-rootfs-creation
7+
inherit core-image image-packaging
8+
9+
DISTRO_FEATURES:append = " early-bringup"
10+
11+
IMAGE_INSTALL = " \
12+
packagegroup-vendor-layer \
13+
packagegroup-middleware-bringup \
14+
systemd \
15+
rdkshell \
16+
dnsmasq \
17+
rdk-fonts \
18+
"
19+
20+
IMAGE_FEATURES:append = " tools-debug"
21+
22+
IMAGE_ROOTFS_SIZE ?= "8192"
23+
IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "" ,d)}"
24+
25+
LAYER_NAME = "EARLY-BRINGUP"
26+
27+
IMAGE_FSTYPES += "squashfs"
28+
29+
create_init_link() {
30+
if [ ! -e ${IMAGE_ROOTFS}/sbin/init ]; then
31+
echo "create_init_link : Creating link to /sbin/init"
32+
ln -sf /lib/systemd/systemd ${IMAGE_ROOTFS}/sbin/init
33+
fi
34+
35+
if [ ! -e ${IMAGE_ROOTFS}/init ]; then
36+
echo "create_init_link : Creating link to /init"
37+
ln -sf /lib/systemd/systemd ${IMAGE_ROOTFS}/init
38+
fi
39+
}
40+
41+
ROOTFS_POSTPROCESS_COMMAND += "create_init_link; "
42+
43+
ROOTFS_POSTPROCESS_COMMAND += "create_init_link; "
44+
45+
# Binding to 0.0.0.0 should be allowed only for VBN images
46+
wpeframework_binding_patch(){
47+
if [ -f "${IMAGE_ROOTFS}/etc/WPEFramework/config.json" ]; then
48+
sed -i "s/127.0.0.1/0.0.0.0/g" ${IMAGE_ROOTFS}/etc/WPEFramework/config.json
49+
fi
50+
}
51+
ROOTFS_POSTPROCESS_COMMAND += "wpeframework_binding_patch; "
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Index: git/RDKShell/RDKShell.cpp
2+
===================================================================
3+
--- git.orig/RDKShell/RDKShell.cpp
4+
+++ git/RDKShell/RDKShell.cpp
5+
@@ -5589,7 +5589,14 @@ namespace WPEFramework {
6+
JsonObject launchRequest, configuration;
7+
launchRequest["callsign"] = "factoryapp";
8+
launchRequest["type"] = "ResidentApp";
9+
- launchRequest["uri"] = std::string(factoryAppUrl);
10+
+ if (NULL != factoryAppUrl)
11+
+ {
12+
+ launchRequest["uri"] = std::string(factoryAppUrl);
13+
+ }
14+
+ else
15+
+ {
16+
+ launchRequest["uri"] = std::string("http://localhost:50050/factoryui/index.html?cfg=Hisense");
17+
+ }
18+
configuration["uri"] = launchRequest["uri"];
19+
launchRequest["focused"] = true;
20+
launchRequest["configuration"] = configuration;
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Index: git/Source/core/Services.h
2+
===================================================================
3+
--- git.orig/Source/core/Services.h
4+
+++ git/Source/core/Services.h
5+
@@ -97,7 +97,9 @@ namespace Core {
6+
7+
public:
8+
Library LoadLibrary(const TCHAR libraryName[]) {
9+
+ printf("###############Debug: Acquring lock to load library");
10+
Core::SafeSyncType<Core::CriticalSection> lock(_adminLock);
11+
+ printf("###############Debug: Acquired lock");
12+
return (Library(libraryName));
13+
}
14+
// There is *NO* locking around the _callback pointer. SO this callback
15+
Index: git/Source/WPEFramework/PluginServer.h
16+
===================================================================
17+
--- git.orig/Source/WPEFramework/PluginServer.h
18+
+++ git/Source/WPEFramework/PluginServer.h
19+
@@ -1850,12 +1850,16 @@ namespace PluginHost {
20+
std::vector<string> all_paths = GetLibrarySearchPaths(name);
21+
std::vector<string>::const_iterator iter = std::begin(all_paths);
22+
23+
+ printf("###############Debug: Going to load library %s", name);
24+
while ( (iter != std::end(all_paths)) && (progressedState <= 2) ) {
25+
Core::File libraryToLoad(*iter);
26+
27+
+ printf("###############Debug: progressedState %d", progressedState);
28+
if (libraryToLoad.Exists() == true) {
29+
+ printf("###############Debug: Library exists to load");
30+
if (progressedState == 0) {
31+
progressedState = 1;
32+
+ printf("###############Debug: progressedState %d", progressedState);
33+
}
34+
35+
// Loading a library, in the static initializers, might register Service::MetaData structures. As
36+
@@ -1863,17 +1867,23 @@ namespace PluginHost {
37+
// ServiceAdministrator, is already taken before entering the dlopen. This can only be achieved
38+
// by forwarding this call to the ServiceAdministrator, so please so...
39+
Core::Library newLib = Core::ServiceAdministrator::Instance().LoadLibrary(iter->c_str());
40+
+ printf("###############Debug: LoadLibrary call done");
41+
42+
if (newLib.IsLoaded() == true) {
43+
+ printf("###############Debug: Library is loaded");
44+
if (progressedState == 1) {
45+
progressedState = 2;
46+
+ printf("###############Debug: progressedState %d", progressedState);
47+
}
48+
49+
Core::System::ModuleBuildRefImpl moduleBuildRef = reinterpret_cast<Core::System::ModuleBuildRefImpl>(newLib.LoadFunction(_T("ModuleBuildRef")));
50+
Core::System::ModuleServiceMetadataImpl moduleServiceMetadata = reinterpret_cast<Core::System::ModuleServiceMetadataImpl>(newLib.LoadFunction(_T("ModuleServiceMetadata")));
51+
+ printf("###############Debug: progressedState %d", progressedState);
52+
+
53+
if ((moduleBuildRef != nullptr) && (moduleServiceMetadata != nullptr)) {
54+
result = newLib;
55+
progressedState = 3;
56+
+ printf("###############Debug: progressedState %d", progressedState);
57+
if (_metadata.IsValid() == false) {
58+
_metadata = moduleServiceMetadata();
59+
if (_metadata.IsValid() == true) {
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Index: git/Source/WPEFramework/PluginServer.cpp
2+
===================================================================
3+
--- git.orig/Source/WPEFramework/PluginServer.cpp
4+
+++ git/Source/WPEFramework/PluginServer.cpp
5+
@@ -282,21 +282,26 @@ namespace PluginHost
6+
{
7+
void* result = nullptr;
8+
if (id == Core::IUnknown::ID) {
9+
+ TRACE_L1("id is Unknown");
10+
AddRef();
11+
result = static_cast<IUnknown*>(this);
12+
}
13+
else if (id == PluginHost::IShell::ID) {
14+
+ TRACE_L1("id is from IShell");
15+
AddRef();
16+
result = static_cast<PluginHost::IShell*>(this);
17+
}
18+
else {
19+
+ TRACE_L1("id is neither unknown nor from IShell");
20+
21+
_pluginHandling.Lock();
22+
23+
if (_handler != nullptr) {
24+
25+
result = _handler->QueryInterface(id);
26+
- }
27+
+ } else {
28+
+ TRACE_L1("_handler is NULL");
29+
+ }
30+
31+
_pluginHandling.Unlock();
32+
}
33+
@@ -306,6 +311,7 @@ namespace PluginHost
34+
35+
/* virtual */ void* Server::Service::QueryInterfaceByCallsign(const uint32_t id, const string& name)
36+
{
37+
+ TRACE_L1("id : %d, name : %s", id, name);
38+
return (_administrator.QueryInterfaceByCallsign(id, name));
39+
}
40+

0 commit comments

Comments
 (0)