Allyoyn 14.12 compiled on raspberry pi and ubuntu

copyright (C) 2011-2017 iesensor.com

based on ref in Chinese:  [blog.csdn.net/huangjuegeek/article/details/38515445]

  1. get soruce code


$ sudo tar -zxvf alljoyn-suite-14.06.00_beta-src.tar.gz -C /opt

$ cd /opt

$ sudo mv alljoyn-suite-14.06.00_beta-src alljoyn-14.06

$ sudo chown -R pi:pi alljoyn-14.06/

$ export AJ_ROOT=/opt/alljoyn-14.06

  1. install needed pkg


sudo apt-get install build-essential

sudo apt-get install scons

sudo apt-get install git

sudo apt-get install curl

sudo apt-get install openssl

sudo apt-get install libssl-dev

sudo apt-get install libjson0

sudo apt-get install libjson0-dev

#All future Raspbian images will ship with Oracle Java by default; existing users can install it by typing:

sudo apt-get update && sudo apt-get install oracle-java7-jdk

  1. setup java (optional)

 


sudo cp junit-4.10.jar /usr/share/java/

export JAVA_HOME=/usr/lib/jvm/jdk-7-oracle-armhf

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:JAVA_HOME/lib/tools.jar:/usr/share/java/junit-4.10.jar

export PATH=$JAVA_HOME/bin:$PATH

 

  1. symbol link or export CROSS_COMPILE for rpi


sudo ln -s /usr/bin/gcc /usr/bin/arm-angstrom-linux-gnueabi-gcc

sudo ln -s /usr/bin/g++ /usr/bin/arm-angstrom-linux-gnueabi-g++

instead of doing this soft link, in 14.12, you need (if CROSS_COMPILE is not set):

$export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-

  1. Compile 14.06 and 14.12


cd $AJ_ROOT/core/alljoyn     # 14.06 rpi

scons OS=linux CPU=arm WS=off BINDINGS=cpp,java OE_BASE=/usr

cd $AJ_ROOT/     # 14.12 on Ubuntu

scons OS=linux CPU=x86 WS=off BINDINGS=cpp,java OE_BASE=/usr

 

  1. test it 14.12


#it is different from 14.06, bbdaemon

 

#binary is not installed, but Export PATH and LD_LIB for future recompilation

export AJ_DIST=$AJ_ROOT/build/linux/x86/debug/dist/cpp

#export AJ_DIST=$AJ_ROOT/build/linux/arm/debug/dist/cpp

export PATH=$AJ_DIST/bin:$PATH

export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH”:$AJ_DIST/lib

 

source ~./bashrc

bbdaemon

 

#the compilation obj file is 1.5G total, considering to install and clean the file, if on rpi

 

#mv $AJ_ROOT/build/linux/arm/debug/dist ~/aj_dist

#scons clean #or# rm -rf $AJ_ROOT

export AJ_DIST=$HOME/aj_dist/cpp

export PATH=$AJ_DIST/bin:$PATH

export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH”:$AJ_DIST/lib

 

  1. cross-compilation: just install and set “linaro” CROSS_COMPILE

#for A7 A8 cortex M

 

for rpi, need from

git clone https://github.com/raspberrypi/tools.git

 

  1. wireshark can monitoring this protocal
BSD documentation licensed Free for non-commercial usage only
Author: Qingfeng XIA
copyright (C) 2011-2017
http://www.iesensor.com
please keep the original link in your reference.
http://www.iesensor.com/blog/2014/12/21/allyoyn-14-12-compiled-on-raspberry-pi-and-ubuntu/
This entry was posted in Ineternet of Things. Bookmark the permalink.