Skip to content

Commit 4c3397d

Browse files
authored
Merge pull request #459 from WebPlatformForEmbedded/development/METROL-592
WebPA:CCSP: enable rbus communication path
2 parents 645e390 + a5890b7 commit 4c3397d

File tree

8 files changed

+90
-62
lines changed

8 files changed

+90
-62
lines changed

package/ccspcr/0001-ccspcr-build-support.patch

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,3 @@ index 9320169..a1639ff 100644
4949
+#endif
5050
pthread_exit(NULL);
5151
}
52-
53-
diff --git a/source/Makefile.am b/source/Makefile.am
54-
index 0b60f65..aeb6c09 100644
55-
--- a/source/Makefile.am
56-
+++ b/source/Makefile.am
57-
@@ -44,7 +44,7 @@ CcspCrSsp_SOURCES = \
58-
CCSP_CR/ccsp_cr_profile.c \
59-
CCSP_CR/ccsp_cr_session.c \
60-
CCSP_CR/ccsp_cr_utility.c
61-
-CcspCrSsp_LDFLAGS += -lccsp_common -lsyscfg -ltelemetry_msgsender -lprivilege $(SYSTEMD_LDFLAGS) -lpthread
62-
+CcspCrSsp_LDFLAGS += -lccsp_common -ldbus-1 -ltelemetry_msgsender -lprivilege $(SYSTEMD_LDFLAGS) -lpthread
63-
if RBUS_BUILD_INTEGRATED
64-
CcspCrSsp_SOURCES += CrSsp/ssp_rbus.c
65-
CcspCrSsp_LDFLAGS += -lrbus -lrbus-core -lrtMessage -lxml2

package/ccspcr/S35ccspcr

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
start() {
44
printf "Starting WebPA CcspCR module: "
55

6-
ln -s /usr/ccsp/ccsp_msg.cfg /tmp/ccsp_msg.cfg
6+
ln -sf /usr/ccsp/ccsp_msg.cfg /tmp/ccsp_msg.cfg
77
rm -rf /tmp/syscfg.shmid
88
syscfg_create -f /usr/ccsp/syscfg.db
9-
CcspCrSsp -subsys eRT.
9+
start-stop-daemon -S -q -b --exec /usr/bin/CcspCrSsp -- -subsys eRT. </dev/null >/dev/nul
1010
[ $? == 0 ] && echo "OK" || echo "FAIL"
1111
}
1212

1313
stop() {
1414
printf "Stopping WebPA CcspCR module: "
15-
16-
killall -9 CcspCrSsp
15+
start-stop-daemon -K -q --exec /usr/bin/CcspCrSsp
1716
[ $? == 0 ] && echo "OK" || echo "FAIL"
1817
}
1918

package/ccspcr/ccspcr.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ CCSPCR_CONF_OPTS = \
2323
--docdir=$(STAGING_DIR)/usr/share/doc \
2424
--with-ccsp-platform=bcm \
2525
--with-ccsp-arch=arm \
26+
--with-rbus-build=only \
2627
$(CUSTOM_HOST)
2728

2829
CCSPCR_CPPFLAGS = $(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include/dbus-1.0 -I$(STAGING_DIR)/usr/lib/dbus-1.0/include -I$(STAGING_DIR)/usr/include/ccsp -I$(STAGING_DIR)/usr/include/libxml2 -I$(STAGING_DIR)/usr/include/telemetry -I$(STAGING_DIR)/usr/include/rbus -D_DEBUG

package/dbus/1.12.16/tmpdir.patch.bkp

Lines changed: 0 additions & 44 deletions
This file was deleted.

package/rbus-core/S30rbuscore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
start() {
4+
printf "Starting RBusCore module: "
5+
6+
start-stop-daemon -S -b -m -p /var/run/rbus_session_mgr.pid --exec /usr/bin/rbus_session_mgr </dev/null >/dev/nul
7+
[ $? == 0 ] && echo "OK" || echo "FAIL"
8+
}
9+
10+
stop() {
11+
printf "Stopping RBusCore module: "
12+
13+
start-stop-daemon -K -q -p /var/run/rbus_session_mgr.pid
14+
[ $? == 0 ] && echo "OK" || echo "FAIL"
15+
rm -rf /var/run/rbus_session_mgr.pid
16+
}
17+
18+
restart() {
19+
stop
20+
start
21+
}
22+
23+
case "$1" in
24+
start)
25+
start
26+
;;
27+
stop)
28+
stop
29+
;;
30+
restart|reload)
31+
restart
32+
;;
33+
*)
34+
echo "Usage: $0 {start|stop|restart}"
35+
exit 1
36+
esac
37+
exit $?

package/rbus-core/rbus-core.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ RBUS_CORE_DEPENDENCIES = rtmessage msgpack-c
1313

1414
RBUS_CORE_CONF_OPTS = -DRBUS_ALWAYS_ON=ON
1515

16+
define RBUS_CORE_INSTALL_INIT_SYSV
17+
$(INSTALL) -m 0755 -D $(RBUS_CORE_PKGDIR)S30rbuscore \
18+
$(TARGET_DIR)/etc/init.d/S30rbuscore
19+
endef
20+
1621
$(eval $(cmake-package))

package/rbus/S25rbus

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh
2+
3+
start() {
4+
printf "Starting RBus module: "
5+
6+
touch /nvram/rbus_support
7+
start-stop-daemon -S -q -b -m -p /var/run/rtrouted.pid --exec /usr/bin/rtrouted </dev/null >/dev/nul
8+
[ $? == 0 ] && echo "OK" || echo "FAIL"
9+
}
10+
11+
stop() {
12+
printf "Stopping RBus module: "
13+
14+
start-stop-daemon -K -q -p /var/run/rtrouted.pid
15+
[ $? == 0 ] && echo "OK" || echo "FAIL"
16+
rm -rf /var/run/rtrouted.pid
17+
}
18+
19+
restart() {
20+
stop
21+
start
22+
}
23+
24+
case "$1" in
25+
start)
26+
start
27+
;;
28+
stop)
29+
stop
30+
;;
31+
restart|reload)
32+
restart
33+
;;
34+
*)
35+
echo "Usage: $0 {start|stop|restart}"
36+
exit 1
37+
esac
38+
exit $?

package/rbus/rbus.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,10 @@ RBUS_INSTALL_STAGING = YES
1111
RBUS_AUTORECONF = YES
1212
RBUS_DEPENDENCIES = rbus-core linenoise
1313

14+
define RBUS_INSTALL_INIT_SYSV
15+
mkdir -p $(TARGET_DIR)/nvram
16+
$(INSTALL) -m 0755 -D $(RBUS_PKGDIR)S25rbus \
17+
$(TARGET_DIR)/etc/init.d/S25rbus
18+
endef
19+
1420
$(eval $(cmake-package))

0 commit comments

Comments
 (0)