Commit 6ed49d45 authored by k.karthick's avatar k.karthick Committed by Erich Keane

Resolved merging issues in tizen connectivity build.

Fixed merging issues in tizen platform connectivity folder build.
Updated readme file for connectivity module building.

Change-Id: Ia0ea1b046b5e848f999046861dd05991219a6d73
Signed-off-by: default avatark.karthick <k.karthick@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1018Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarErich Keane <erich.keane@intel.com>
parent f53494fa
......@@ -10,23 +10,26 @@ Please refer to the following page to install scons:
To build for some OS (Android / Arduino / IOS ...), an IDE/SDK may be required,
please go to the relative page to download and install the required IDE/SDK.
Note: Connectivity module building has been changed. We have to build connectivity
from the iotivity root folder.
Linux Build:
1) Go to "connectivity/" folder.
1) Go to "iotivity/" folder.
2) Execute following command(s) to start build based on transport selection required :
-> Building for all transports :
$ scons TARGET_OS=linux TARGET_TRANSPORT=ALL
$ scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=ALL
-> Building for a specific transport :
$ scons TARGET_OS=linux TARGET_TRANSPORT=WIFI
$ scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=IP
-> Building for multiple transports :
$ scons TARGET_OS=linux TARGET_TRANSPORT=WIFI,ETHERNET
$ scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=IP,BT
-> Clean Build (all transports) :
scons TARGET_OS=linux TARGET_TRANSPORT=ALL -c (for clean)
scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=ALL -c (for clean)
3) The above command will build sample also.
......@@ -34,52 +37,48 @@ Linux Build:
For Enabling Secured server,
* Note: tinydtls library has to copied to "connectivity/lib/tinydtls" for secured build.
Secured Server will be only used for WIFI and ETHERNET transports.
Give command "scons TARGET_OS=linux TARGET_TRANSPORT=WIFI SECURED=1
or (For multiple transports will be mentioned using comma)
Secured Server will be only used for IP transports.
Give command "scons TARGET_OS=linux TARGET_TRANSPORT=WIFI,ETHERNET SECURED=1
Give command "scons resource/csdk/connectivity/samples/linux/ TARGET_OS=linux TARGET_TRANSPORT=IP SECURED=1
Android Build:
1) Go to "connectivity/" folder.
1) Go to "iotivity/" folder.
2) Execute following command(s) to start build based on transport selection required :
-> Building for all transports :
$ scons TARGET_OS=android TARGET_TRANSPORT=ALL TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
$ scons resource/csdk/connectivity/samples/android/ TARGET_OS=android TARGET_TRANSPORT=ALL TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
-> Building for a specific transport :
$ scons TARGET_OS=android TARGET_TRANSPORT=WIFI TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
$ scons resource/csdk/connectivity/samples/android/ TARGET_OS=android TARGET_TRANSPORT=IP TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
-> Building for multiple transports :
$ scons TARGET_OS=android TARGET_TRANSPORT=WIFI,BT TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
$ scons resource/csdk/connectivity/samples/android/ TARGET_OS=android TARGET_TRANSPORT=IP,BT TARGET_ARCH=x86 ANDROID_NDK=your_ndk_path
Note :- Upon successful execution of above command(s) CA library will be generated at path
"~/connectivity/build/out/android/TARGET_ARCH/release or debug".
"iotivity/out/android/TARGET_ARCH/release or debug".
Tizen Build:
1) If you are building first time, then delete GBS-ROOT folder from home directory.
2) Go to "connectivity/" folder.
2) Go to "iotivity/" folder.
3) Execute following command(s) to start build based on transport selection required :
-> Building for all transports :
$ scons TARGET_OS=tizen TARGET_TRANSPORT=ALL
$ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=ALL
-> Building for a specific transport :
$ scons TARGET_OS=tizen TARGET_TRANSPORT=WIFI
$ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP
-> Building for multiple transports :
$ scons TARGET_OS=tizen TARGET_TRANSPORT=WIFI,BT,BLE
$ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP,BT,BLE
4) By default, above command will build sample also.
To disable building sample, add BUILD_SAMPLE=OFF to the build command.
Ex: scons TARGET_OS=tizen TARGET_TRANSPORT=ALL BUILD_SAMPLE=OFF
Ex: scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=ALL BUILD_SAMPLE=OFF
Making this flag ON builds the sample.
Note :- Upon successful execution of above command(s) CA library and sample applications will be
......@@ -91,23 +90,21 @@ Note :- Currently Mega & Due build is supported.
1) Set up Arduino first before building. Refer to "connectivity\build\arduino\Arduino_Setup_README.txt" file for help.
2) Go to "connectivity/" folder.
2) Go to "iotivity/" folder.
3) Execute following command to start build :
For Arduino Mega
$ scons TARGET_OS=arduino TARGET_TRANSPORT=<transport> TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
$ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=<transport> TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
For Arduino Due
$ scons TARGET_OS=arduino TARGET_TRANSPORT=<transport> TARGET_ARCH=arm BOARD=arduino_due_x_dbg ARDUINO_HOME=<path_to_arduino_installation>
$ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=<transport> TARGET_ARCH=arm BOARD=arduino_due_x_dbg ARDUINO_HOME=<path_to_arduino_installation>
NOTE: BOARD=arduino_due_x_dbg|arduino_due_x. Default is arduino_due_x_dbg.
Possible values for <transport> are:
-> ETHERNET :
$ scons TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
-> WIFI :
$ scons TARGET_OS=arduino TARGET_TRANSPORT=WIFI TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
-> IP :
$ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=IP TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
-> BLE :
$ scons TARGET_OS=arduino TARGET_TRANSPORT=BLE TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
$ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=BLE TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation>
Note :- Only single transport can be built at a time for Arduino.
......@@ -115,11 +112,11 @@ For Arduino Due
5) After building sample, script will try to install on "/dev/ttyACM0" port in 'sudo' mode.
To skip installation, set command line argument 'UPLOAD=false'.
"scons TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> UPLOAD=false"
"scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> UPLOAD=false"
6) To set BLE Shield Name, include the option DEVICE_NAME during scons build.
-> $ scons TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> DEVICE_NAME=OIC
-> $ scons resource/csdk/connectivity/samples/arduino/ TARGET_OS=arduino TARGET_TRANSPORT=ETHERNET TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=<path_to_arduino_installation> DEVICE_NAME=OIC
Specified Device name length MUST be less than 10 characters. RBL Library has this limitation.
By Default DEVICE_NAME=OIC-DEVICE, if device name option is not specified
......
##
# This script includes generic build options:
# release/debug, target os, target arch, cross toolchain, build environment etc
# CA build script
##
import os
import platform
# Map of host os and allowed target os (host: allowed target os)
host_target_map = {
'linux': ['linux', 'android', 'arduino', 'yocto', 'tizen'],
'windows': ['windows', 'winrt', 'android', 'arduino', 'tizen'],
'darwin': ['darwin', 'ios', 'android', 'arduino'],
}
SConscript('./resource/csdk/connectivity/build/SConscript')
# Map of os and allowed archs (os: allowed archs)
os_arch_map = {
'linux': ['x86', 'x86_64', 'arm', 'arm64'],
'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'],
'windows': ['x86', 'amd64', 'arm'],
'winrt': ['arm'],
'darwin': ['i386', 'x86_64'],
'ios': ['i386', 'x86_64', 'armv7', 'armv7s', 'arm64'],
'arduino': ['avr', 'arm'],
'yocto': ['x86', 'x86_64'],
'tizen': ['armv7'],
}
Import('env')
host = platform.system().lower()
target_os = env.get('TARGET_OS')
transport = env.get('TARGET_TRANSPORT')
buildsample = env.get('BUILD_SAMPLE')
release_mode = env.get('RELEASE')
secured = env.get('SECURED')
logging = env.get('LOGGING')
if not host_target_map.has_key(host):
print "\nError: Current system (%s) isn't supported\n" % host
Exit(1)
######################################################################
# Get build options (the optins from command line)
######################################################################
target_os = ARGUMENTS.get('TARGET_OS', host).lower() # target os
if target_os not in host_target_map[host]:
print "\nError: Unknown target os: %s (Allow values: %s)\n" % (target_os, host_target_map[host])
Exit(1)
default_arch = platform.machine()
if default_arch not in os_arch_map[target_os]:
default_arch = os_arch_map[target_os][0].lower()
target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch) # target arch
######################################################################
# Common build options (release, target os, target arch)
######################################################################
help_vars = Variables()
help_vars.Add(BoolVariable('RELEASE', 'Build for release?', True)) # set to 'no', 'false' or 0 for debug
help_vars.Add(EnumVariable('TARGET_OS', 'Target platform', host, host_target_map[host]))
help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ALL', ['ALL', 'WIFI', 'ETHERNET', 'BT', 'BLE']))
help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, os_arch_map[target_os]))
help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1')))
help_vars.Add(EnumVariable('BUILD_SAMPLE', 'Build with sample', 'ON', allowed_values=('ON', 'OFF')))
######################################################################
# Platform(build target) specific options: SDK/NDK & toolchain
######################################################################
targets_support_cc = ['linux', 'arduino', 'tizen']
if target_os in targets_support_cc:
# Set cross compile toolchain
help_vars.Add('TC_PREFIX', "Toolchain prefix (Generally only be required for cross-compiling)", os.environ.get('TC_PREFIX'))
help_vars.Add(PathVariable('TC_PATH',
'Toolchain path (Generally only be required for cross-compiling)',
os.environ.get('TC_PATH')))
if target_os in ['android', 'arduino']: # Android/Arduino always uses GNU compiler regardless of the host
env = Environment(variables = help_vars,
tools = ['gnulink', 'gcc', 'g++', 'ar', 'as']
)
else:
env = Environment(variables = help_vars, TARGET_ARCH = target_arch, TARGET_OS = target_os)
Help(help_vars.GenerateHelpText(env))
tc_set_msg = '''
************************************ Warning **********************************
* Enviornment variable TC_PREFIX/TC_PATH is set. It will change the default *
* toolchain, if it isn't what you expect you should unset it, otherwise it may*
* cause inexplicable errors. *
*******************************************************************************
'''
if target_os in targets_support_cc:
prefix = env.get('TC_PREFIX')
tc_path = env.get('TC_PATH')
if prefix:
env.Replace(CC = prefix + 'gcc')
env.Replace(CXX = prefix + 'g++')
env.Replace(AR = prefix + 'ar')
env.Replace(AS = prefix + 'as')
env.Replace(LINK = prefix + 'ld')
env.Replace(RANLIB = prefix + 'ranlib')
if tc_path:
env.PrependENVPath('PATH', tc_path)
sys_root = os.path.abspath(tc_path + '/../')
env.AppendUnique(CCFLAGS = ['--sysroot=' + sys_root])
env.AppendUnique(LINKFLAGS = ['--sysroot=' + sys_root])
if prefix or tc_path:
print tc_set_msg
# Ensure scons be able to change its working directory
env.SConscriptChdir(1)
# Set the source directory and build directory
# Source directory: 'dir'
# Build directory: 'dir'/out/<target_os>/<target_arch>/<release or debug>/
#
# You can get the directory as following:
# env.get('SRC_DIR')
# env.get('BUILD_DIR')
def __set_dir(env, dir):
if not os.path.exists(dir + '/SConstruct'):
print '''
*************************************** Error *********************************
* The directory(%s) seems isn't a source code directory, no SConstruct file is
* found. *
*******************************************************************************
''' % dir
Exit(1)
if env.get('RELEASE'):
build_dir = dir + '/out/' + target_os + '/' + target_arch + '/release/'
else:
build_dir = dir + '/out/' + target_os + '/' + target_arch + '/debug/'
env.VariantDir(build_dir, dir, duplicate=0)
env.Replace(BUILD_DIR = build_dir)
env.Replace(SRC_DIR = dir)
def __src_to_obj(env, src, home = ''):
obj = env.get('BUILD_DIR') + src.replace(home, '')
if env.get('OBJSUFFIX'):
obj += env.get('OBJSUFFIX')
return env.Object(obj, src)
def __install(ienv, targets, name):
i_n = ienv.Install(env.get('BUILD_DIR'), targets)
Alias(name, i_n)
env.AppendUnique(TS = [name])
def __append_target(ienv, target):
env.AppendUnique(TS = [target])
def __print_targets(env):
Help('''
===============================================================================
Targets:\n ''')
for t in env.get('TS'):
Help(t + ' ')
Help('''
\nDefault all targets will be built. You can specify the target to build:
$ scons [options] [target]
===============================================================================
''')
env.AddMethod(__set_dir, 'SetDir')
env.AddMethod(__print_targets, 'PrintTargets')
env.AddMethod(__src_to_obj, 'SrcToObj')
env.AddMethod(__append_target, 'AppendTarget')
env.AddMethod(__install, 'InstallTarget')
env.SetDir(env.GetLaunchDir())
env['ROOT_DIR']=env.GetLaunchDir()
Export('env')
######################################################################
# Link scons to Yocto cross-toolchain ONLY when target_os is yocto
######################################################################
if target_os == "yocto":
'''
This code injects Yocto cross-compilation tools+flags into scons'
build environment in order to invoke the relevant tools while
performing a build.
'''
import os.path
try:
CC = os.environ['CC']
target_prefix = CC.split()[0]
target_prefix = target_prefix[:len(target_prefix)-3]
tools = {"CC" : target_prefix+"gcc",
"CXX" : target_prefix+"g++",
"AS" : target_prefix+"as",
"LD" : target_prefix+"ld",
"GDB" : target_prefix+"gdb",
"STRIP" : target_prefix+"strip",
"RANLIB" : target_prefix+"ranlib",
"OBJCOPY" : target_prefix+"objcopy",
"OBJDUMP" : target_prefix+"objdump",
"AR" : target_prefix+"ar",
"NM" : target_prefix+"nm",
"M4" : "m4",
"STRINGS": target_prefix+"strings"}
PATH = os.environ['PATH'].split(os.pathsep)
for tool in tools:
if tool in os.environ:
for path in PATH:
if os.path.isfile(os.path.join(path, tools[tool])):
env[tool] = os.path.join(path, os.environ[tool])
break
except:
print "ERROR in Yocto cross-toolchain environment"
Exit(1)
'''
Now reset TARGET_OS to linux so that all linux specific build configurations
hereupon apply for the entirety of the build process.
'''
env['TARGET_OS'] = 'linux'
'''
We want to preserve debug symbols to allow BitBake to generate both DEBUG and
RELEASE packages for OIC.
'''
env['CCFLAGS'].append('-g')
Export('env')
else:
'''
If target_os is not Yocto, continue with the regular build process
'''
# Load config of target os
env.SConscript(target_os + '/SConscript')
# Delete the temp files of configuration
if env.GetOption('clean'):
dir = env.get('SRC_DIR')
if os.path.exists(dir + '/config.log'):
Execute(Delete(dir + '/config.log'))
Execute(Delete(dir + '/.sconsign.dblite'))
Execute(Delete(dir + '/.sconf_temp'))
Return('env')
print "Given Transport is %s" % transport
print "Given OS is %s" % target_os
if target_os == 'tizen':
command = "sh resource/csdk/connectivity/build/tizen/gbsbuild.sh %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging)
print "Created Command is %s" % command
gbs_script = env.Command('gbs_build', None, command)
AlwaysBuild ('gbs_script')
\ No newline at end of file
#!/bin/sh
spec=`ls build/tizen/packaging/*.spec`
cur_dir="./resource/csdk/connectivity/"
spec=`ls ./resource/csdk/connectivity/build/tizen/packaging/*.spec`
version=`rpm --query --queryformat '%{version}\n' --specfile $spec`
name=`echo $name|cut -d" " -f 1`
......@@ -12,7 +14,17 @@ echo $1
export TARGET_TRANSPORT=$1
echo $2
export BUILD_SAMPLE=$2
export SECURED=$2
echo $3
export BUILD_SAMPLE=$3
echo $4
export RELEASE=$4
echo $5
export LOGGING=$5
echo $TARGET_TRANSPORT
echo $BUILD_SAMPLE
......@@ -26,23 +38,30 @@ echo `pwd`
mkdir ./tmp
mkdir ./tmp/con/
cp -R ./* $sourcedir/tmp/con
cp -R ./SConscript $sourcedir/tmp/con
cp -R ./src/wifi_adapter/SConscript $sourcedir/tmp/con/src/wifi_adapter/
cp -R ./src/bt_le_adapter/SConscript $sourcedir/tmp/con/src/bt_le_adapter/
cp -R ./src/bt_edr_adapter/SConscript $sourcedir/tmp/con/src/bt_edr_adapter/
cp -R ./common/SConscript $sourcedir/tmp/con/common/
cp -R ./lib/libcoap-4.1.1/SConscript $sourcedir/tmp/con/lib/libcoap-4.1.1/
cp -R ./samples/tizen/ $sourcedir/tmp/con/sample/
cp -R $cur_dir/* $sourcedir/tmp/con
cp -R $cur_dir/SConscript $sourcedir/tmp/con
cp -R $cur_dir/src/ip_adapter/SConscript $sourcedir/tmp/con/src/ip_adapter/
cp -R $cur_dir/src/bt_le_adapter/SConscript $sourcedir/tmp/con/src/bt_le_adapter/
cp -R $cur_dir/src/bt_edr_adapter/SConscript $sourcedir/tmp/con/src/bt_edr_adapter/
cp -R $cur_dir/common/SConscript $sourcedir/tmp/con/common/
cp -R $cur_dir/lib/libcoap-4.1.1/SConscript $sourcedir/tmp/con/lib/libcoap-4.1.1/
cp -R $cur_dir/samples/tizen/ $sourcedir/tmp/con/sample/
mkdir -p $sourcedir/tmp/con/sample/lib/tizen/ble/libs
cp -R ./lib/tizen/ble/libs/* $sourcedir/tmp/con/sample/lib/tizen/ble/libs/
cp -R $cur_dir/lib/tizen/ble/libs/* $sourcedir/tmp/con/sample/lib/tizen/ble/libs/
cd $sourcedir/build/tizen
cd $sourcedir
cd $cur_dir/build/tizen
cp -R ./* $sourcedir/tmp/
cp SConscript $sourcedir/tmp/
rm -f $sourcedir/tmp/SConscript
cp SConstruct $sourcedir/tmp/
cp scons/SConscript $sourcedir/tmp/scons/
mkdir -p $sourcedir/tmp/iotivityconfig
cd $sourcedir/build_common/
cp -R ./iotivityconfig/* $sourcedir/tmp/iotivityconfig/
cp -R ./SConscript $sourcedir/tmp/
cd $sourcedir/tmp
echo `pwd`
......@@ -58,7 +77,7 @@ if [ ! -d .git ]; then
fi
echo "Calling core gbs build command"
gbscommand="gbs build -A armv7l --include-all --define 'TARGET_TRANSPORT $1' --define 'RELEASE $3'"
gbscommand="gbs build -A armv7l --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --repository ./"
echo $gbscommand
if eval $gbscommand; then
echo "Core build is successful"
......@@ -81,13 +100,15 @@ if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
git commit -m "Initial commit"
fi
echo "Calling sample gbs build command"
gbscommand="gbs build -A armv7l --include-all --define 'TARGET_TRANSPORT $1'"
gbscommand="gbs build -A armv7l --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'LOGGING $5' --repository ./"
echo $gbscommand
if eval $gbscommand; then
echo "Sample build is successful"
else
echo "Sample build is failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
fi
else
echo "Sample build is not enabled"
fi
......
......@@ -34,19 +34,18 @@ SLP oicca application
echo %{ROOTDIR}
scons TARGET_OS=tizen -c
scons TARGET_OS=tizen TARGET_TRANSPORT=%{TARGET_TRANSPORT} RELEASE=%{RELEASE}
scons TARGET_OS=tizen TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} LOGGING=%{LOGGING}
%install
mkdir -p %{DEST_INC_DIR}
mkdir -p %{DEST_LIB_DIR}/pkgconfig
cp -f %{ROOTDIR}/con/src/libconnectivity_abstraction.a %{buildroot}/%{_libdir}
cp -f %{ROOTDIR}/con/src/libconnectivity_abstraction.so %{buildroot}/%{_libdir}
cp -f %{ROOTDIR}/con/lib/libcoap-4.1.1/libcoap.a %{buildroot}/%{_libdir}
cp -rf %{ROOTDIR}/con/api/cacommon.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/inc/caadapterinterface.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/common/inc/cathreadpool.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/inc/cawifiadapter.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/inc/caethernetadapter.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/inc/caipadapter.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/inc/caedradapter.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/inc/caleadapter.h* %{DEST_INC_DIR}/
cp -rf %{ROOTDIR}/con/api/cainterface.h* %{DEST_INC_DIR}/
......@@ -56,6 +55,7 @@ cp -rf %{ROOTDIR}/com.oic.ca.pc %{DEST_LIB_DIR}/pkgconfig/
%files
%manifest com.oic.ca.manifest
%defattr(-,root,root,-)
%{_libdir}/lib*.so*
%{_libdir}/lib*.a*
%{_includedir}/OICHeaders/*
%{_libdir}/pkgconfig/*.pc
......
Compiling Sample App FOR TIZEN:
Procedure to Execute Sample App:
================================
1) Copy the generated rpm(com-oic-ca-sample-0.1-1.armv7l.rpm) to Tizen Device
(say /opt/usr/media/xxx/)
2) sdb shell
3) su
4) cd /opt/usr/media/xxx/
5) change-booting-mode.sh --update
6) Install casample(console app). It contains Interface API libs and OIC-CORE Libs
i) rpm -Uvh com-oic-ca-sample-0.1-1.armv7l.rpm --force --nodeps
7) RPM will be installed in "/usr/apps/"
Execute the sample app by below commands
i) cd /usr/apps/com.oic.ca.sample/bin
ii) ./ca_sample (for CA Sample)
Apply smack rule[ONLY for WIFI]
===============================
In "connectivity/samples/tizen" folder, execute following
1) To build Tizen sample for all transports use the command :-
"sh gbsbuild.sh".
1) After installing the RPMs, apply the following smack rule
a) chsmack -a "net-config" /usr/apps/com.oic.ca.sample/bin/ca_sample
b) chsmack -e "net-config" /usr/apps/com.oic.ca.sample/bin/ca_sample
2) To build for a specific transport specify options (WITH_WIFI/WITH_BT/WITH_BLE).
Example:
sh gbsbuild.sh WITH_WIFI (to build sample application only for Wi-Fi Transport.)
sh gbsbuild.sh WITH_BT (to build sample application only for BT Transport.)
sh gbsbuild.sh WITH_BLE (to build sample application only for BLE Transport.)
Note: EDR adapter will give permission issues if these rules are applied.
So to test EDR adapter, delete the "/usr/apps/com.oic.ca.sample" folder
and again install the RPMs.
Install Dependent RPMS(Only for EDR Adapter Testing)
====================================================
1) In su(super user) mode, install Bluetooth related RPMs present in
"connectivity/lib/tizen/edr/rpms" on Tizen v2.3 mobile device
(Currently only SM Z910F Device is supported).
2) Install the Sample as given above in "Procedure to Execute Sample App"
Procedure to Execute Sample App:
=================================
1) Copy the generated rpm(com.oic.ca.sample-0.1-1.armv7l.rpm) to Tizen Device (say /opt/usr/media/xxx/)
2) sdb shell,
3) su
4) cd /opt/usr/media/xxx/
5) change-booting-mode.sh --update
6) Install casample(console app). It contains Interface API libs and OIC-CORE Libs
i) rpm -Uvh com.oic.ca.sample-0.1-1.armv7l.rpm --force --nodeps
7) Execute smack_reload.sh
8) rpm will be installed in "/usr/apps/"
Execute the sample app by below commands
i) cd /usr/apps/com.oic.ca.sample/bin
ii) ./ca_sample (for CA Sample)
iii) ./internal/interface_sample (for adapter interface sample).
Install Dependent RPMS(Only for BLE Adapter Testing)
====================================================
1) Flash the system image present in connectivity/lib/tizen/ble/image/ folder on SM Z910F Tizen v2.3
2) In su(super user) mode, Install Bluetooth related rpms Present in connectivity/lib/tizen/ble/rpms on
Tizen v2.3 mobile device (Currently only SM Z910F Device is supported)
3) Install the Sample as given above in "Procedure to Execute Sample App" [ Till Step 6 ]
4) Open another sdb shell, in su (super user) mode follow the below steps:
(i) cd /var/lib/bluetooth
(ii) Turn off Bluetooth in the device
(iii) rm -rf *
(iv) Run the command ./usr/lib/bluetooth/bluetoothd -ndE &. for OIC Server device and
run the command ./usr/lib/bluetooth/bluetoothd -nd &. for OIC Client device.
(v) Turn on the Bluetooth.
5) Run the sample as given in Step 8 of "Procedure to Execute Sample App"
1) Flash the system image present in connectivity/lib/tizen/ble/image/ folder on SM Z910F Tizen v2.3
2) In su(super user) mode, Install Bluetooth related rpms Present in connectivity/lib/tizen/ble/rpms on
Tizen v2.3 mobile device (Currently only SM Z910F Device is supported)
3) Install the Sample as given above in "Procedure to Execute Sample App" [ Till Step 6 ]
4) Open another sdb shell, in su (super user) mode follow the below steps:
(i) cd /var/lib/bluetooth
(ii) Turn off Bluetooth in the device
(iii) rm -rf *
(iv) Run the command ./usr/lib/bluetooth/bluetoothd -ndE &. for OIC Server device and
run the command ./usr/lib/bluetooth/bluetoothd -nd &. for OIC Client device.
(v) Turn on the Bluetooth.
5) Run the sample as given in Step 8 of "Procedure to Execute Sample App"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment