Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

Intel Galileo setup

Joseph Jackson edited this page Feb 25, 2017 · 10 revisions

Intel Galileo setup

Create a Galileo boot image

Directions are available for setting up a microSD card. This page is for Mac OS X, but it contains links to the similar pages for Windows or Linux. Only complete the first step, creating the boot image.

On the Mac, the above documentation boils down to just the few steps shown below. If they aren't familiar to you, see the complete directions above.

  • Download the Latest Yocto Poky Image from: https://software.intel.com/galileo-image/latest
  • Insert a microSD card into an adapter and insert it into the SD card slot of your Mac
  • From the Utilities folder in your Applications folder, open Terminal and issue these commands:
    • cd ~/Downloads
    • unzip iot-devkit-prof-dev-image-galileo-20160606.zip
    • diskutil list
      • Find the "/dev/disk[NUMBER]" entry that corresponds to the microSD card
      • Do NOT get this wrong or you will overwrite the data on your Mac!
    • diskutil unmountDisk /dev/disk[NUMBER]
      • If this fails, make sure you entered the correct disk number
    • dd bs=8m if=iot-devkit-prof-dev-image-galileo-20160606.direct of=/dev/disk[NUMBER]
      • This prompts for your password and takes around 5 minutes to complete
      • When finished, you will get a dialog about an unrecognized disk. Click "Ignore".
    • diskutil eject /dev/disk[NUMBER]

Boot the Galileo

The instructions from Intel get very complicated at this stage, but everything past step 1 can be skipped. In particular, there is no need to attach a FTDI serial cable in order to establish an initial connection. The boot image is configured to allow incoming SSH connections right out of the box, so we'll use that instead.

  • Plug an Ethernet cable into the Galileo and your computer
  • Log in as the root user using an SSH connection to galileo.local
    • On the Mac, enter this command in a Terminal window: ssh root@galileo.local
    • On Windows, install Putty or the equivalent to log in
    • If it fails to connect, be sure to quit out of any VPN software
    • If you see a warning about an invalid fingerprint and this isn't the first time you've connected to a Galileo, it's okay to accept the new key. On some platforms, you may need to remove the old key with ssh-keygen -R galileo.local.
  • You are NOT prompted for a root password, so the first step is to set one:
    • passwd root
  • Optionally, set your local timezone
    • rm /etc/localtime
    • ln -s ../usr/share/zoneinfo/America/New_York /etc/localtime
    • echo America/New_York > /etc/timezone
    • (If you're not in the US-Eastern timezone, find your timezone with ls /usr/share/zoneinfo* and replace the America/New_York part of the commands)

Install the mjpg_streamer command

The mjpg_streamer utility will turn your Galileo into an IP camera, capturing video from a USB webcam and publishing it as an MJPEG stream on the network. MJPEG is the same format as supported by the Axis cameras recommended by FIRST, so GRIP has good support for it. This utility will be very useful during initial configuration and troubleshooting.

  • Download the pre-compiled version from SourceForge
  • Copy the file to the Galileo
    • On the Mac, open a new Terminal window and issue the command scp Downloads/mjpg-streamer_r94-1_i386.deb root@galileo.local:
    • On Windows, use Putty or the "PSCP" command
  • Back in the Galileo root session you started in the last section, install the utility
    • opkg install --force-depends --add-arch i386:30 ./mjpg-streamer_r94-1_i386.deb
    • Notice there there is a warning about a dependency on some version of libjpeg (libjpeg62 in my case)
    • Find the latest version of libjpeg that you have installed with ls -l /usr/lib/libjpeg.so*
    • Create a symbolic link from what you have installed to the version needed by mjpg-stream with ln -s /usr/lib/libjpeg.so.8.0.2 /usr/lib/libjpeg.so.62

Create and test startup script for mjpg_streamer

The mjpg_streamer utility is very flexible. As a result, it requires a long command line to start it. Let's create a convenience script so we don't have to enter all the details each time.

  • In the Galileo root session, run these commands to create the script in the home directory
    • echo '#!/bin/sh' > ~/start_mjpg_streamer.sh
    • echo 'mjpg_streamer -i "input_uvc.so -r 320x240" -o "output_http.so -p 1811 -w /usr/www"' >> ~/start_mjpg_streamer.sh
    • chmod +x ~/start_mjpg_streamer.sh
  • Test it out by running the script
    • ~/start_mjpg_streamer.sh
    • After viewing the stream, you can press Control-C stop it and return to the shell prompt
  • Back on your computer, access the stream with a browser (any will do)
    • http://galileo.local:1811/stream.html
    • If you stop and restart mjpg_streamer, you'll probably need to reload the page your browser
  • If you want just the MJPEG stream without the menu interface around it (needed for GRIP input), the URL is:
    • http://galileo.local:1811/?action=stream

Clone this wiki locally