Intel Galileo boards are adding some unique features to the ever-expanding Arduino hardware universe. On-board connectivity and versatility for certain usage scenarios represent, in my opinion, key aspects of these boards. This article focuses on how to install a Debian Linux distribution on the Intel Galileo Gen 2, as well as an analysis of the board’s performance as a mini computer stacked up against a Raspberry Pi 2 used for reference.
These boards are built around Intel Quark x86 MCUs which does not necessarily mean that they are better but rather different types of Arduino boards which can do more than that. In fact the Arduino subsystem is merely a software layer running over Linux, and depending on the type of setup you choose a Galileo board can offer substantially different feature sets.
The Intel Galileo Gen 2 was introduced in July 2014 and is a revision of its predecessor featuring improved 12-bit PWM, better GPIO, power over Ethernet (PoE) and revised power driver which accepts up to 15V power inputs.
By default Galileo boards come with a pre-loaded Linux firmware image. No microSD card or other hardware is required, the board just needs to be powered up and connected to a computer running the Arduino IDE. This image is a very spartan Yocto distribution which does not integrate drivers for most hardware and there is no Arduino sketch persistence.
The EGLIBC-based SD card image opens up most of what these boards can offer. Also based on Yocto 1.4 Poky it enables persistence of Arduino sketches and includes drivers for mini-PCIe Wi-Fi cards, ALSA and other peripherals. It also includes libraries for easy integration with various IDEs such as Intel XDK and System Studio IoT Edition, Wyliodrin, or Eclipse to name just a few of them, allowing developers to use their favorite programming language and framework.
Custom Debian images provide familiar Linux environments, enabling access to the Debian package repository and software updates. To my knowledge there are two Debian distributions for Galileo, both based on the Linux 3.8.7 kernel. One of them is the Galileo Debian image compiled by Intel community member Stuart Anderson.
For this guide I will be using Emutex Labs’ Ubilinux distribution which is based on the official kernel sources for Intel Quark CPUs and built from a minimal Debian install. It includes drivers for Wi-Fi and other peripherals and enables access to Debian repositories, being part of their Ubiworx IoT framework. The installation process for this image is pretty straightforward and, more importantly, a serial cable normally required for a console login is not necessary.
To get started you’ll need the following items at hand:
- USB stick;
- MicroSD card class 6 or above – I used 16GB class 10 cards;
- Ethernet connection;
- Intel Galileo Gen 2 board with latest firmware.
Download the Ubilinux image for Galileo to your PC.
Also you need to download PuTTY and make sure you have access to your network router or DHCP server configuration to determine the IP address of your board once the installation is complete. You can use nmap for determining your board’s IP as we’ll see later in the guide.
[green_box]For this installation method a Galileo Gen 2-compatible serial cable is not required.[/green_box]
The process is fairly straightforward:
- Format the USB stick from your PC.
- Format the microSD card using SDFormatter.
- Extract the Ubilinux image downloaded earlier onto the USB stick.
- Insert the USB stick into the USB host port on the Galileo Gen 2 and the microSD card in its slot and power the board up.
- Simply wait for a few minutes for the image to automatically install, you will know when the process is over since the board will power off automatically.
- Remove the USB stick.
- Remove and reinsert the power cord into the board and wait about 40 seconds for Debian to boot, and this is it.
Connecting to the Galileo Gen 2
At this point you can connect to the board, but first we need to determine what IP address it has received.
The first method would be to log into your network router and manually associate an IP address of your choosing with the MAC address of the Galileo. This can be found on the board’s Ethernet port sticker.
Save your settings and power cycle the board again. After the boot process is finished fire up PuTTY, enter the IP address chosen earlier, and enter the default Ubilinux credentials at the login prompt:
- user: root
- password: root
As mentioned earlier, an alternative is using nmap, available for Windows, Linux and Mac, to scan your network and look for Galileo’s MAC address and the IP associated with it.
For Windows you can simply insert the subnet you are on into the Target field and hit Scan or, if you know the approximate range of IPs from which an address will be allocated you can do a Ping scan and use the following command which applies on all platforms:
nmap -sn 192.168.0.100-150
Updating system and installing packages
Since we are now running Debian we can use the apt-get package manager to update and install our software.
In order to prevent certain certificate errors first we need to set the current date and time on the Galileo:
date --set="28 APR 2016 21:50:00"
Check that that the change has been committed with
The file system has been already expanded to the entire storage capacity in the installation phase. To check this you can run
df -h which will display storage usage and mount points in a friendly format:
Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p1 15G 971M 13G 7% / udev 10M 0 10M 0% /dev tmpfs 24M 268K 23M 2% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 47M 0 47M 0% /run/shm
Next the repository references and system packages need to be updated — this may take a while to complete:
apt-get update && apt-get dist-upgrade
Let’s check out the name and version of our freshly installed Linux distribution and the kernel version with the following command combination:
cat /etc/*-release && uname -mrs
Which will output:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" Linux 3.8.7-ubilinux-0.9-quark i586
For starters I installed three packages on the Galileo — Sysbench for running a few benchmarks, Iperf for testing network speed and the Samba client for exposing a folder on the board’s file system to the Windows network:
apt-get install sysbench apt-get install iperf apt-get install samba samba-common-bin
As mentioned in the beginning of the article I chose to compare the Galileo Gen 2 with the Raspberry Pi 2 since both are now running Debian Jessie-based images, albeit the Galileo is using an older kernel and may not support certain features. The purpose of this comparison is to add a little perspective regarding the level of performance the board is capable of.
A quick reminder on some relevant specs of the two boards below:
|Galileo Gen 2||Raspberry Pi 2|
|CPU||400MHz Intel Quark X1000 single core||900MHz Broadcom 2836 quad core|
|Architecture||32-bit Pentium class||32-bit ARM v7|
Using sysbench I ran a process which calculates prime numbers up to 20000 utilizing a single core on both the Galileo and the Raspberry Pi 2 clocked at 800MHz:
sysbench --num-threads=1 --test=cpu --cpu-max-prime=20000 run
Results for Pi 2’s CPU set at 900MHz and load distributed on all 4 cores,
--num-treads=4, were added for reference. The following benchmark results were returned:
|Galileo Gen 2||Raspberry Pi 2|
single core @ 800MHz
|Raspberry Pi 2|
all cores @ 900MHz
total time: 906.5652s|
total time: 877.1330s|
total time: 194.1517s|
As we can see the Galileo comes pretty close to the Pi 2 in terms of single core performance thanks to the x86 instruction set which allows for similar processing power at about half the CPU frequency.
Transferring files over the wired connection is close to the nominal 100Mbps on both boards.
|Galileo Gen 2||Raspberry Pi 2||
The Galileo Gen 2 is capable of fairly decent performance as a mini computer. While it may be no match against boards currently sporting multi-core SoCs, it offers better performance than a Raspberry Pi Model B+ board for instance, which should be more than enough for many IoT projects.
The mini-PCIe port on the Galileo2 can be very useful for adding wireless connectivity at a fraction of the price of equivalent Arduino shields. Unfortunately you need to have the right hardware, the Intel Wireless 7260 card I intended to install is only supported in kernel version 3.10 and above.
Hopefully you’ll find this useful, please let me know if you have any suggestions or want to report errors in the article.