There's now a flash-installable version of Debian available for Edison. It's called ubilinux, and is a follow-on from the previous work done on the ubilinux distribution for Galileo and Galileo Gen2.
ubilinux page http://www.emutexlabs.com/ubilinux here
Functionality available out of the box:
Mutli-function gadget (Storage, Network, Serial)
Arduino IDE compatibility with sketch download daemon
C and C++ compiler
wpa-supplicant and HostAPD
If there's something missing that you need, just use 'apt-get install' to get it from the pre-selected Debian repositories.
We've chosen the "flashall.sh -b" method to install onto the Edison, as we've increased the size of the root partition to a size that's larger than the max size allowed by the OTA upgrades. This is to give users more space for installing packages. You need a linux platform or a Linux live-boot platform to use the flashall.sh script. See the Installation Instructions here: http://www.emutexlabs.com/ubilinux/29-ubilinux/218-ubilinux-installation-instructions-for-intel-edis... Installation instructions
Note: It's probably good if the first thing you do once you get your board connected to the internet is do an "apt-get install ntp" which will automatically set the system clock. Otherwise it's set to a date in the year 2000.
xFSTK (as mentioned below) is no longer needed if you tweak the flashall.sh script as described in this post:
/message/257617# 257617 https://communities.intel.com/message/257617# 257617
Message was edited by: David Hunt
Thank you for doing this! I will give it a try as soon as it's done downloading.
One question though. How can we use mraa with this, or is there another way to deal with the I/O for SPI and I2C?
Do we do the same thing on debian as we did on Yocto which is:
No, libmraa is not installed, and opkg is not the package managed for Debian. It uses apt-get . Also, there is no libmraa package in Debian (yet), so I had a go at building from source. I got the mraa_0.4.4c.tar.gz from the edison source package,
First get your internet connection going by editing /etc/network/interfaces and entering your essid/passphrase, and then 'ifup wlan0'
tar xvfz mraa_0.4.4c.tar.gz
apt-get install cmake swig ntp
cmake .. -DBUILDSWIGNODE=OFF
You should then have libmraa in /usr/local/lib
You probably want to add this to cmake so make install places everything in /usr correctly.
Also use the latest libmraa 0.5.1 from git and your miniboard will work too. 0.4.4c is a weird build...
If you want the nodejs module you'll have to upgrade to swig 3.0.2.
Thanks arfoll, that makes it a lot easier, pulling directly from git.
apt-get install git cmake swig ntp
cmake .. -DBUILDSWIGNODE=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr
Faceplant... install the python-dev package allowed me to complete the install process. The next thing that has come up is when I try to run any of the python examples, I get an error that it cannot find the mraa module. Do I need to set a path to it or something and if so, where?
BTW here is a great link to a script that makes setting PYTHONPATH a snap
http://blog.streamitive.com/2011/12/01/export-pythonpathpythonpath/ export PYTHONPATH=$PYTHONPATH… | blog.streamitive
I've installed UbiLinux, then I updated Python, then I followed the instructions above from David on how to install MRAA on Ubilinux and everything got compilied, built, etc etc... it all worked.
Then when I tried to execute one simple script within the mraa/examples/python which call the mraa module, I get the following error:
root@ubilinux:/usr/share/mraa/examples/python# python blink-io8.py
Traceback (most recent call last):
File "blink-io8.py", line 25, in
ImportError: No module named mraa
here is my console output for when I compiled and installed mraa module:
-- Install configuration: ""
-- Installing: /usr/include/mraa.h
-- Installing: /usr/include/mraa.hpp
-- Installing: /usr/include/mraa
-- Installing: /usr/include/mraa/pwm.hpp
-- Installing: /usr/include/mraa/common.h
-- Installing: /usr/include/mraa/aio.h
-- Installing: /usr/include/mraa/gpio.h
-- Installing: /usr/include/mraa/uart.h
-- Installing: /usr/include/mraa/uart.hpp
-- Installing: /usr/include/mraa/common.hpp
-- Installing: /usr/include/mraa/i2c.hpp
-- Installing: /usr/include/mraa/aio.hpp
-- Installing: /usr/include/mraa/spi.h
-- Installing: /usr/include/mraa/i2c.h
-- Installing: /usr/include/mraa/pwm.h
-- Installing: /usr/include/mraa/gpio.hpp
-- Installing: /usr/include/mraa/spi.hpp
-- Installing: /usr/include/mraa/types.h
-- Installing: /usr/lib/pkgconfig/mraa.pc
-- Installing: /usr/lib/libmraa.so.0.5.2
-- Installing: /usr/lib/libmraa.so.0
-- Installing: /usr/lib/libmraa.so
-- Installing: /usr/lib/python2.7/site-packages/_mraa.so
-- Installing: /usr/lib/python2.7/site-packages/mraa.py
-- Installing: /usr/share/mraa/examples
-- Installing: /usr/share/mraa/examples/hellomraa.c
-- Installing: /usr/share/mraa/examples/python
-- Installing: /usr/share/mraa/examples/python/rgblcd.py
-- Installing: /usr/share/mraa/examples/python/cycle-pwm3.py
-- Installing: /usr/share/mraa/examples/python/blink-io8.py
-- Installing: /usr/share/mraa/examples/python/i2c_HMC5883.py
-- Installing: /usr/share/mraa/examples/python/hello_isr.py
-- Installing: /usr/share/mraa/examples/python/hello_gpio.py
-- Installing: /usr/share/mraa/examples/python/aio.py
-- Installing: /usr/share/mraa/examples/blink_onboard.c
-- Installing: /usr/share/mraa/examples/gpio_read6.c
-- Installing: /usr/share/mraa/examples/i2c_HMC5883L.c
-- Installing: /usr/share/mraa/examples/analogin_a0.c
-- Installing: /usr/share/mraa/examples/cycle-pwm3.c
-- Installing: /usr/share/mraa/examples/spi_mcp4261.c
-- Installing: /usr/share/mraa/examples/CMakeLists.txt
-- Installing: /usr/share/mraa/examples/mmap-io2.c
-- Installing: /usr/share/mraa/examples/c++
-- Installing: /usr/share/mraa/examples/c++/Pwm3-cycle.cpp
-- Installing: /usr/share/mraa/examples/c++/Spi-pot.cpp
-- Installing: /usr/share/mraa/examples/c++/CMakeLists.txt
-- Installing: /usr/share/mraa/examples/c++/A...
I don't know how Ubilinux is configured. Seems to be a generic Python configuration question.
Check where your Python libraries are installed - seems not in /usr/lib/python2.7/site-packages as /usr/lib/python2.7/site-packages/mraa.py isn't picked up
Maybe you can put a symbolic link from your Python install dir to /usr/lib/python2.7/site-packages?
Yeah, that looks pretty much like that. Orto either try linking @mhahn has suggested, or you can add the fulpath to that directory into PYTHONPATH variable.
You can find tons of advice on getting this configured, here's for example one that describes various details you can try: http://www.stereoplex.com/blog/understanding-imports-and-pythonpath http://www.stereoplex.com/blog/understanding-imports-and-pythonpath
Works great for me! It was my first time using "flashall.sh -b" (on Linux, couldn't make it work on Windows). That was a bit painful, lots of dependencies for xfstk and dfu-util insists on loading the entire rootfs in RAM (this was an old laptop with 1GB of RAM and kept saying everything was ok when in fact dfu-util was failing at the rootfs stage when it was trying to allocate 1.6GB of RAM - I added swap and it worked, but it took 1 hour or so to complete the rootfs flash).
Anyway, after flashing it works fine, I'm really excited! You might want to activate NTP, my Edison booted up with a time sometime in 2000 and apt-get update failed because the deb.nodesource.com certificate is newer than that (it has been created after 2000). Once I added NTP and set the time, I was able to do apt-get update.
I'll play with it some more, great work!