Intel Galileo Rev.1 Quickstart on Linux (Fedora 22)
Intel Galileo Rev.1 Quickstart on Fedora 22
Needs
- Intel Galileo (tested on Rev.1 only)
- 5V DC power supply for the Galileo
- micro sd/TF card
- 1x Ethernet cable for PC-Galileo connection
- micro-USB cable
- Java JRE on Linux
Warning: Galileo Rev.1 has a few bugs and is a bit sensitive, be gentle, be careful not to do shorts, do not move around randomly the jumpers!
Step 1: Updating the Intel Galileo and getting the tools
You'll probably need to update your board at first.
Make sure no micro-SD/TF card is inserted in the Galileo.
Plug the AC and the micro-USB cable on the usb client port (the closest to the Ethernet port on the Galileo) on your computer, and check you have a device like /dev/ttyACM* available.
Note: if you try to upload an example code like blink or such, it's quite normal if it doesn't work, do not panic!
Get the Arduino-Intel software (Arduino 1.6.0 for Intel 1.0.4 in our case).
Run it, and try to compile. If it fails with a message like
invalid mode +111
you'll have to patch a few shell scripts (appears specific to Fedora from 15 to at least 22).
Files to patch:
- arduino-1.6.0+Intel/hardware/tools/install_script.sh (l.111, fix the -perm param in executable_files car)
- arduino-1.6.0+Intel/hardware/tools/i586/install_script.sh (l.106, fix the -perm param in executable_files var)
In my case, replacing
-perm -111
by
-perm /u+x,g+x,o+x
does the trick.
And then, re-run the scripts or try to compile again in the Arduino-Intel IDE.
Then, get the Intel Galileo Updater (1.0.4 in our case).
Make sure your user has the rights to access the devices /dev/ttypACM* before running the updater, then follow the update process.
IMPORTANT NOTE: do not interrupt the process, do not touch the board nor the cables, let it work. In my case, it took a few minutes to update the board. If you interrupt this process, you will more likely end up with a bricked device!
You can now try to upload a sketch to the Galileo.
In the IDE, open the Blink example and upload it to the Galileo (check you have the right serial port selected before).
If everything goes right, you should get a led blinking near the center of the Galileo.
Step 2: Preparing the micro-SD card
According to the Intel documentation, your micro-SD must be at least 1GB, up to 32GB.
You will need a Fat32 partition on th micro-SD and the Yocto Linux image from Intel (in our case, 1.0.4).
Just untar the archive contents to your Fat32 partition. You're done!
Step 3: Get a remote connection on the Galileo
The easiest way to get a remote connection to the board is to activate a telnet daemon on it (at first). Make sure the ethernet cable is plugged to the Galileo and the computer.
Just upload to the Galileo with the IDE the following sketch :
void setup() {
system("telnetd -l /bin/sh"); // activate Telnet Daemon
system("ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up"); // let's bring an IP to this board
}
void loop() {}
Set a static IP on your computer in the range 192.168.0.x.
This should allow you to connect with a telnet client to the Galileo on 192.168.0.2.
You now have a shell on the Galileo.
You can also try to the board on 192.168.0.2.
And it's done!
Ressources
- http://www.intel.com/support/galileo/sb/CS-035101.htm (Intel Galileo Downloads page)
Links
- https://communities.intel.com/thread/45455
- https://communities.intel.com/thread/46335
- https://learn.sparkfun.com/tutorials/galileo-getting-started-guide
- http://www.malinov.com/Home/sergey-s-blog/intelgalileo-programminggpiofromlinux