-
-
Save truedat101/655f88730019379548b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INDEX | |
----- | |
- BUILD IT YOURSELF | |
- BUILD THE AUDIO SERVICE | |
- BUILDING FOR ANDROID | |
- INSTALL WITHOUT BUILDING | |
BUILD IT YOURSELF | |
----------------- | |
# make sure you have installed the latest Raspbian OS | |
# similar instructions for Ubuntu are available here: https://allseenalliance.org/docs-and-downloads/documentation/configuring-build-environment-linux-platform | |
sudo apt-get install build-essential | |
sudo apt-get install maven | |
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 | |
mkdir ~/bin | |
echo "export PATH=$PATH:~/bin" >> ~/.bashrc | |
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | |
chmod a+x ~/bin/repo | |
source ~/.bashrc | |
mkdir -p ~/WORKING_DIRECTORY/alljoyn | |
cd ~/WORKING_DIRECTORY/alljoyn | |
git config --global user.name "YOUR_NAME_HERE" | |
git config --global user.email "YOUR_EMAIL_HERE" | |
repo init -u https://git.allseenalliance.org/gerrit/devtools/manifest | |
repo sync | |
export AJ_ROOT=$(pwd) | |
sudo ln -s /usr/bin/g++ /usr/bin/arm-angstrom-linux-gnueabi-g++ | |
sudo ln -s /usr/bin/gcc /usr/bin/arm-angstrom-linux-gnueabi-gcc | |
cd ~/WORKING_DIRECTORY/alljoyn/core/alljoyn | |
scons OS=linux CPU=arm WS=off OE_BASE=/usr BINDINGS=cpp,c,java,js,objc,unity #please check the IMPORTANT comments below before running | |
sudo ln -sf ~/WORKING_DIRECTORY/alljoyn/core/alljoyn/build/linux/arm/debug/dist/cpp/lib/liballjoyn.so /lib/arm-linux-gnueabihf/liballjoyn.so | |
cd ~/WORKING_DIRECTORY/alljoyn/core/alljoyn/build/linux/arm/debug/dist/cpp/bin | |
ldd alljoyn-daemon #daemon not available in latest versions of alljoyn, use BR=on with scons for embedded daemon | |
./alljoyn-daemon --version | |
After executing alljoyn-daemon --version, you should see something like the following: | |
AllJoyn Message Bus Daemon version: v0.0.1 | |
Copyright (c) 2009-2014 AllSeen Alliance. | |
Build: AllJoyn Library v0.0.1 (Built Fri Aug 22 05:36:57 UTC 2014 by pi - Git: alljoyn branch: '(no branch)' tag: 'v14.06' (+146 changes) commit ref: d611c623c14fb4d404253f39a4641bee518708b9) | |
IMPORTANT: | |
In the line: | |
scons OS=linux CPU=arm WS=off OE_BASE=/usr BINDINGS=cpp,c,java,js,objc,unity | |
the BINDINGS determine which platforms you build for (options are cpp, c, objc, java js and unity). | |
CPP, C: For running the deamon you'll only need to build for cpp but maybe you also want the other platforms. | |
JAVA: don't use OpenJDK, set Java to oracle-java7-jdk as explained below: | |
sudo apt-get install oracle-java7-jdk | |
export JAVA_HOME="/usr/lib/jvm/jdk-7-oracle-armhf" | |
echo "export PATH=$PATH:$JAVA_HOME/bin" >> ~/.bashrc | |
JS: If you also want to compile for js you need to add js to the bindings but you'll have to download xulrunner from here: | |
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/1.9.2/sdk/xulrunner-1.9.2.en-US.mac-i386.sdk.tar.bz2 | |
and set the GECKO_HOME variable to point to that uncompressed directory (only the headers are used). | |
UNITY: to compile for Unity you'll have to install the Mono runtime and gcms: | |
sudo apt-get install mono-runtime | |
sudo apt-get install mono-gmcs | |
GTEST: If you want to build all the unit tests please follow the section googletest in this document: | |
https://allseenalliance.org/sites/default/files/resources/config_build_environment_linux.pdf | |
and export GTEST_DIR with your path to the uncompressed file | |
BULLSEYE: References to missing variable BULLSEYE_BIN can be safely ignored. | |
Bullseye is code coverage analysis tool used by the alljoyn team but unfortunately it's not free or open source so I couldn't download it: http://www.bullseye.com | |
SERVICES: you can specify which alljoyn services to build as a scons parameter ( eg. SERVICES=about,audio ) | |
Thanks to Mike Young whose initial setup description helped create this updated guide: | |
http://wildernessvoice.com/2014/07/building-allseen-alliances-alljoyn-core-on-raspberry-pi/ | |
BUILD THE AUDIO SERVICE | |
----------------------- | |
Once you're all set up with the previous section you can also build AllJoyn audio service (enables audio streaming): | |
cd ~/WORKING_DIRECTORY/alljoyn/core/alljoyn/services/audio | |
scons OS=linux CPU=arm WS=off SERVICES=about,audio BUILD_SERVICES_SAMPLES=off BINDINGS=core,cpp OE_BASE=/usr | |
If you get a compilation error in the AudioMixerThread method (in file src/posix/ALSADevice.cc) locate the line with the error and remove the 3rd parameter (false) in the source code (leave the first 2 parameters only). | |
BUILDING FOR ANDROID | |
-------------------- | |
Please follow the instructions here: | |
https://allseenalliance.org/developers/develop/building/android/build-source | |
and apply this patch if you need Android 5 support: | |
https://jira.allseenalliance.org/browse/ASACORE-1208 | |
INSTALL WITHOUT BUILDING | |
------------------------ | |
This is how you install the js version of AllJoyn without building it yourself (thx to oskarhane http://oskarhane.com/raspberry-pi-install-node-js-and-npm/ for the original instructions): | |
#!/bin/bash | |
#Make a new dir where you'll put the binary | |
sudo mkdir /opt/node | |
#Get it | |
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28-linux-arm-pi.tar.gz | |
#unpack | |
tar xvzf node-v0.10.28-linux-arm-pi.tar.gz | |
#Copy to the dir you made as the first step | |
sudo cp -r node-v0.10.28-linux-arm-pi/* /opt/node | |
#Add node to your path so you can call it with just "node" | |
cd ~ | |
nano .bashrc | |
#Add these lines to the file you opened | |
PATH=$PATH:/opt/node/bin | |
export PATH | |
#Save and exit | |
#Install npm package of AllJoyn contributed by octoblu https://github.com/octoblu/alljoyn https://www.youtube.com/watch?v=OpjVzKeLpEQ | |
npm install -g alljoyn | |
#Warning: only discovery, messaging and notifications supported as of this writing | |
Important: | |
If node is not found even after adding it to the path maybe you're sudoing and the environment variables are not being passed. Try adding the path /opt/node/bin to the /etc/sudoers file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment