Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9868 Discussions

ubilinux (Debian) now available from Emutex Labs

DHunt5
Valued Contributor I
18,648 Views

Hi all,

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)

Wifi

Arduino IDE compatibility with sketch download daemon

C and C++ compiler

Python

Node.JS

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

--START EDIT--

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.

--END EDIT--

--START EDIT--

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

--END EDIT--

Message was edited by: David Hunt

168 Replies
DHunt5
Valued Contributor I
1,162 Views

Oh, I forgot to mention it's based on Debian Wheezy (stable).

LMont14
New Contributor I
1,016 Views

Do you know how i can install FTDI drivers???

http://www.ftdichip.com/Drivers/VCP.htm Virtual COM Port Drivers

MMoy
New Contributor II
1,162 Views

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:

$ echo "src intel-iotdk http://iotdk.intel.com/repos/1.1/iotdk http://iotdk.intel.com/repos/1.1/iotdk" > /etc/opkg/intel-iotdk.conf

$ echo "src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/mraa-upm.conf

opkg update

opkg upgrade

DHunt5
Valued Contributor I
1,162 Views

Mike,

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

cd mraa-0.4..4c

mkdir build

cd build

cmake .. -DBUILDSWIGNODE=OFF

make

make install

You should then have libmraa in /usr/local/lib

Rgds,

Dave.

DHunt5
Valued Contributor I
1,162 Views

Oh, and I didn't build against the library that I just compiled, I only ran some of the examples, and blink_onboard and cycle_pwm3 ran fine so I assume it's working OK.

Rgds,

Dave.

Brendan_L_Intel
Employee
1,162 Views

You probably want to add this to cmake so make install places everything in /usr correctly.

-DCMAKE_INSTALL_PREFIX:PATH=/usr

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.

DHunt5
Valued Contributor I
1,162 Views

Thanks arfoll, that makes it a lot easier, pulling directly from git.

apt-get install git cmake swig ntp

git clone https://github.com/intel-iot-devkit/mraa.git https://github.com/intel-iot-devkit/mraa.git

cd mraa

mkdir build

cd build

cmake .. -DBUILDSWIGNODE=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr

make

make install

Rgds,

Dave.

Matthias_H_Intel
Employee
1,031 Views

The version you took is pretty old! You should rather take libmraa/UPM from github.

DHunt5
Valued Contributor I
1,031 Views

Agreed, I gave updated instructions a few posts later. Github is definitely the way to go with libmraa...

Matthias_H_Intel
Employee
1,031 Views

the issues with long threads: you see the beginning and possibly the end and miss the important parts in between

Found it after I replied but don't find a way to remove posts ...

GSwan
Novice
1,041 Views

Arfoll,

I have been trying to get mraa installed but have run into an error during the cmake process

Any help would be greatly appreciated.

Thanks,

Glen

BWebb2
New Contributor III
1,041 Views

I think you need to install the python-dev package (or something similar).

GSwan
Novice
1,041 Views

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?

Thanks,

Glen

BWebb2
New Contributor III
1,041 Views

I believe it should have installed a site-packages directory. You need to set PYTHONPATH to point to that directory.

GSwan
Novice
1,041 Views

Thanks faceplant. That solved this issue although I get a segmentation fault with the blink example.

GSwan
Novice
1,041 Views

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

FOrto
New Contributor I
1,095 Views

hi guys,

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

import mraa

ImportError: No module named mraa

root@ubilinux:/usr/share/mraa/examples/python#

 

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/javascript

-- Installing: /usr/share/mraa/examples/javascript/GPIO_DigitalRead.js

-- Installing: /usr/share/mraa/examples/javascript/AioA0.js

-- Installing: /usr/share/mraa/examples/javascript/Blink-IO.js

-- Installing: /usr/share/mraa/examples/javascript/rgblcd.js

-- Installing: /usr/share/mraa/examples/javascript/GPIO_DigitalWrite.js

-- 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...

Matthias_H_Intel
Employee
1,095 Views

Orto

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?

 

AT9
Honored Contributor II
1,024 Views

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

RDrag
New Contributor I
1,162 Views

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!

Reply