build_linux_secured $1 $2
build_linux_unsecured_with_ra $1 $2
build_linux_secured_with_ra $1 $2
+ build_linux_unsecured_with_rm $1 $2
fi
build_android $1 $2
scons RELEASE=$1 $2
}
+function build_linux_unsecured_with_rm()
+{
+ echo "*********** Build for linux with RoutingManager************"
+ scons ROUTING=GW RELEASE=$1 $2
+}
+
function build_linux_secured()
{
echo "*********** Build for linux with Security *************"
# and windows android-ndk-r10(64bit target version) support these features.
build_android_x86 $1 $2
+ build_android_x86_with_rm $1 $2
build_android_armeabi $1 $2
+ build_android_armeabi_with_rm $1 $2
}
function build_android_x86()
scons TARGET_OS=android TARGET_ARCH=x86 RELEASE=$1 TARGET_TRANSPORT=BLE $2
}
+function build_android_x86_with_rm()
+{
+ echo "*********** Build for android x86 with Routing Manager *************"
+ scons TARGET_OS=android TARGET_ARCH=x86 ROUTING=GW RELEASE=$1 TARGET_TRANSPORT=IP $2
+ scons TARGET_OS=android TARGET_ARCH=x86 ROUTING=GW RELEASE=$1 TARGET_TRANSPORT=BT $2
+ scons TARGET_OS=android TARGET_ARCH=x86 ROUTING=GW RELEASE=$1 TARGET_TRANSPORT=BLE $2
+}
+
function build_android_armeabi()
{
echo "*********** Build for android armeabi *************"
scons TARGET_OS=android TARGET_ARCH=armeabi RELEASE=$1 TARGET_TRANSPORT=BLE $2
}
+function build_android_armeabi_with_rm()
+{
+ echo "*********** Build for android armeabi with Routing Manager*************"
+ scons TARGET_OS=android TARGET_ARCH=armeabi ROUTING=GW RELEASE=$1 TARGET_TRANSPORT=IP $2
+ scons TARGET_OS=android TARGET_ARCH=armeabi ROUTING=GW RELEASE=$1 TARGET_TRANSPORT=BT $2
+ scons TARGET_OS=android TARGET_ARCH=armeabi ROUTING=GW RELEASE=$1 TARGET_TRANSPORT=BLE $2
+}
+
function build_arduino()
{
echo "*********** Build for arduino avr *************"
echo "*********** Build for Tizen CA lib and sample with Security *************"
scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true SECURED=1 RELEASE=$1 $2
+
+ echo "*********** Build for Tizen octbstack lib and sample *************"
+ scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true RELEASE=$1 $2
+
+ echo "*********** Build for Tizen octbstack lib and sample with Routing Manager*************"
+ scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true ROUTING=GW RELEASE=$1 $2
}
function build_darwin() # Mac OSx and iOS
then
build_linux_unsecured true
build_linux_unsecured false
+ build_linux_unsecured_with_rm true
+ build_linux_unsecured_with_rm false
elif [ $1 = 'linux_secured' ]
then
build_linux_secured true
then
build_android_x86 true
build_android_x86 false
+ build_android_x86_with_rm true
+ build_android_x86_with_rm false
elif [ $1 = 'android_armeabi' ]
then
build_android_armeabi true
build_android_armeabi false
+ build_android_armeabi_with_rm true
+ build_android_armeabi_with_rm false
elif [ $1 = 'arduino' ]
then
build_arduino true
--- /dev/null
+Build Procedure
+===============
+
+1) If you are building first time, then delete GBS-ROOT-RI folder from home directory.
+ Note: Default build server URL for Tizen is set in gbs configuration file @ iotivity/tools/tizen/.gbs.conf.
+ If needed, same can be modified as per appropriate target.
+2) Go to "iotivity/" folder.
+3) Execute following command(s) to start build based on transport selection required :
+ -> Building for all transports :
+ $ scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_OS=tizen TARGET_TRANSPORT=ALL
+
+ -> Building for a specific transport :
+ $ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP
+
+ -> Building for multiple transports :
+ $ scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP,BT,BLE
+
+4) By default, above command will build csdk samples also.
+
+Note :- Upon successful execution of above command(s) RI library and sample applications will be
+ generated at path "~/GBS-ROOT-RI/local/repos/<target>/armv7l/RPMS".
+
+Procedure to Execute Sample App:
+================================
+ 1) Copy the generated rpms(com-oic-ri-0.1-1.armv7l.rpm, com-oic-ri-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 the rpms using the following commands:
+ a) rpm -Uvh com-oic-ri-0.1-1.armv7l.rpm --force --nodeps
+ b) rpm -Uvh com-oic-ri-sample-0.1-1.armv7l.rpm --force --nodeps
+ 7) For IP transport, apply net-config smack rules using below command:
+ a) chsmack -a "net-config" /usr/apps/com.oic.ri.sample/bin/*
+ b) chsmack -e "net-config" /usr/apps/com.oic.ri.sample/bin/*
+ 7) RPM will be installed in "/usr/apps/"
+ Execute the sample app by below commands
+ i) cd /usr/apps/com.oic.ri.sample/bin
+ a) ./ocserver -o0 [For Server sample]
+ b) ./occlient -t2 [For client sample]
+ c) ./ocrouting [For Gateway sample]
\ No newline at end of file
echo `pwd`
+rm -rf ./tmp
mkdir ./tmp
mkdir ./tmp/extlibs/
mkdir ./tmp/packaging
-cp -R ./extlibs/tinycbor $sourcedir/tmp/extlibs
+cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
+rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
cp -R ./extlibs/timer $sourcedir/tmp/extlibs
cp -R ./resource $sourcedir/tmp/
cp -R ./build_common/external_libs.scons $sourcedir/tmp/
+# copy dependency RPMs and conf files for tizen build
+cp ./tools/tizen/*.rpm $sourcedir/tmp
+cp ./tools/tizen/*.rpm $sourcedir/tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
+cp ./tools/tizen/.gbs.conf ./tmp
+cp ./tools/tizen/.gbs.conf ./tmp/resource/csdk/stack/samples/tizen/SimpleClientServer
+
cd $sourcedir
cd ./resource/csdk/stack/samples/tizen/build/
fi
echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --repository ./"
+gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
echo $gbscommand
if eval $gbscommand; then
echo "Core build is successful"
else
- echo "Core build failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
+ echo "Core build failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
cd $sourcedir
rm -rf $sourcedir/tmp
- exit
+ exit 1
fi
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 -B ~/GBS-ROOT-RI --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --repository ./"
+ gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
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"
+ echo "Sample build is failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
+ exit 1
fi
else
echo "Sample build is not enabled"
fi
-
cd $sourcedir
rm -rf $sourcedir/tmp
+exit 0