Last active
November 24, 2015 06:22
-
-
Save AMStrix/627c59284793f08146ae to your computer and use it in GitHub Desktop.
Installation and setup of an Intel Edison with Ubilinux + MRAA + UMP + Java (November 2015)
This file contains 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
The MRAA/UMP Java libs come prebuilt with the default distro that Intel provides. | |
But if you wanna do ubilinux, the following may work. | |
1) Download Ubilinux and flash to Edison (2 decent guides below) | |
https://learn.sparkfun.com/tutorials/loading-debian-ubilinux-on-the-edison | |
http://www.emutexlabs.com/ubilinux/29-ubilinux/218-ubilinux-installation-instructions-for-intel-edison | |
* Once you have the image loaded with wifi and ssh working, go to step 2 * | |
2) Manually install Java | |
a) http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
b) grab jdk-8xxx-linux-i586 (xxx being latest stable version) | |
c) move it to the edison | |
using sftp: | |
sftp root@192.168.0.[edisonip] | |
cd /root | |
put jdk-8xxx-linux-i586.gz | |
exit | |
using sdcard (this was using sparkfun microsd shield) | |
put downloaded java archive on sdcard | |
reboot edison with sdcard inserted | |
ssh root@192.168.0.[edisonip] | |
mount /dev/mmcblk1p1 /mnt | |
mv /mnt/jdk-8xxx-linux-i586.gz /root/jdk-8xxx-linux-i586.gz | |
d) extract goodies | |
ssh root@192.168.0.[edisonip] | |
cd /root | |
umask 0 | |
tar xvf jdk-8xxx-linux-i586.gz | |
e) move goodies to standard place | |
mv jdk1.8.0_xx /usr/lib/jvm/oracle_jdk8 | |
f) create environment vars | |
vi /etc/profile.d/oraclejdk.sh | |
(add the following) | |
export J2REDIR=/usr/lib/jvm/oracle_jdk8/jre | |
export PATH=$PATH:/usr/lib/jvm/oracle_jdk8/bin:/usr/lib/jvm/oracle_jdk8/db/bin:/usr/lib/jvm/oracle_jdk8/jre/bin | |
export JAVA_HOME=/usr/lib/jvm/oracle_jdk8 | |
export DERBY_HOME=/usr/lib/jvm/oracle_jdk8/db | |
(exit vi :wq<enter>) | |
source /etc/profile.d/oraclejdk.sh | |
g) test java | |
java -version | |
3) Install/Build MRAA/UMP | |
a) install reqs | |
apt-get install git (and any other prereqs, swig was pre-installed on lates ubilinux) | |
apt-get install cmake-data=2.8.11.1-1~bpo70+1 (ump requires this specific version) | |
apt-get install cmake=2.8.11.1-1~bpo70+1 | |
c) install MRAA (board lib) | |
cd /root | |
git clone https://github.com/intel-iot-devkit/mraa.git | |
mkdir mraa/build | |
cd mraa/build | |
cmake -DBUILDSWIGNODE=OFF -DBUILDSWIGJAVA=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr .. | |
make | |
make install | |
d) install UMP (sensor libs) | |
cd /root | |
git clone https://github.com/intel-iot-devkit/upm.git | |
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig | |
export CPLUS_INCLUDE_PATH=/usr/include | |
export LIBRARY_PATH=/usr/lib | |
apt-get install cmake-data=2.8.11.1-1~bpo70+1 | |
apt-get install cmake=2.8.11.1-1~bpo70+1 | |
cmake -DBUILDSWIGNODE=OFF -DBUILDSWIGJAVA=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr .. | |
make (this takes ~1hr) | |
e) test MRAA | |
export LD_LIBRARY_PATH=/usr/lib/java | |
cd /usr/share/mraa/examples/java | |
javac -cp /usr/lib/java/mraa.jar:. Example.java | |
java -cp /usr/lib/java/mraa.jar:. Example | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment