-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcov_build.sh
More file actions
90 lines (76 loc) · 3.38 KB
/
cov_build.sh
File metadata and controls
90 lines (76 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
##########################################################################
# If not stated otherwise in this file or this component's LICENSE
# file the following copyright and licenses apply:
#
# Copyright 2018 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.
##########################################################################
WORKDIR=`pwd`
# Build and install critical dependency
export ROOT=/usr
export INSTALL_DIR=/usr/local
mkdir -p $INSTALL_DIR
# Build tr181api from rfc source code
cd ${ROOT}
# Clone all dependencies if not present already
if [ ! -d rfc ]; then
git clone https://github.com/rdkcentral/rfc.git
fi
if [ ! -d iarmmgrs ]; then
git clone https://github.com/rdkcentral/iarmmgrs.git
fi
if [ ! -d iarmbus ]; then
git clone https://github.com/rdkcentral/iarmbus.git
fi
if [ ! -d tr69hostif ]; then
git clone https://github.com/rdkcentral/tr69hostif.git
fi
git clone https://github.com/rdkcentral/dcm-agent.git -b develop
cd dcm-agent
sh cov_build.sh
autoreconf -i
./configure
make && make install
cp uploadstblogs/include/*.h /usr/local/include
cd -
cd rfc
autoreconf -i
./configure --enable-rfctool=yes --enable-tr181set=yes
cd rfcapi
make librfcapi_la_CPPFLAGS="-I/usr/include/cjson -I/usr/rfc/rfcMgr/gtest/mocks"
make install
cd /usr/rfc/tr181api
g++ -fPIC -shared -o libtr181api.so tr181api.cpp -I/usr/local/include/wdmp-c
mv ./libtr181api.so /usr/local/lib
cp ./tr181api.h /usr/local/include
# Install header files alone from armmgrs repositories
cd $ROOT
cp /usr/iarmmgrs/rdmmgr/include/rdmMgr.h /usr/local/include
# Install header files alone from iarmbus repositories
cp /usr/iarmbus/core/include/libIBusDaemon.h /usr/local/include
cp /usr/iarmbus/core/include/libIBus.h /usr/local/include
cp /usr/iarmbus/core/libIARMCore.h /usr/local/include
# Build and install stubs from tr69hostif
cd tr69hostif
cd ./src/unittest/stubs
g++ -fPIC -shared -o libIARMBus.so iarm_stubs.cpp -I/usr/tr69hostif/src/hostif/parodusClient/pal -I/usr/tr69hostif/src/unittest/stubs -I/usr/tr69hostif/src/hostif/parodusClient/waldb -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/tr69hostif/src/hostif/include -I/usr/tr69hostif/src/hostif/profiles/DeviceInfo -I/usr/tr69hostif/src/hostif/parodusClient/pal -fpermissive
cp libIARMBus.so /usr/local/lib
cp libIBus.h /usr/local/include
cp libIARM.h /usr/local/include
cd $WORKDIR
autoreconf -i
autoupdate
./configure --prefix=${INSTALL_DIR} --enable-iarmbusSupport=yes
make remotedebugger_CFLAGS="-I/usr/include/cjson -I/usr/local/include/wdmp-c -I/usr/local/include/rbus -I/usr/local/include -I./unittest/mocks -I/usr/local/include/trower-base64 -DIARMBUS_SUPPORT -DUSECOV -DUSE_L2_SUPPORT" remotedebugger_LDFLAGS="-L/usr/local/lib -lrdkloggers -lcjson -lrfcapi -lrbus -lmsgpackc -lsecure_wrapper -lwebconfig_framework -lIARMBus -ltr181api -L/usr/local/lib/x86_64-linux-gnu -ltrower-base64 -L/usr/lib/x86_64-linux-gnu"
make install