Skip to content

Preparing a flash station

Robin Edwards edited this page Jan 6, 2016 · 7 revisions

Follow these instructions to set up a Mac or Debian Linux computer as a "flash station" that can "flash" the Buendia software onto an Intel Edison, turning the Edison into a functioning Buendia server. The flash station automates this process so that you only need to issue one command and — about 45 minutes later — everything will be installed and configured on the Edison.

Setting up a Mac as a flash station

Note: OSX El Capitan can't be used as a flash station at the moment because HoRNDIS (see below) doesn't support El Capitan yet. See https://github.com/jwise/HoRNDIS/issues/42 for details. In the meantime, you may be better off setting up a VM as a flash station.

  1. Get dfu-util. You can get it by downloading Openmoko Flasher and copying the binary located at Openmoko Flasher.app/Contents/MacOS/dfu-util to a directory on your PATH; or you can get it using Homebrew with the following steps:
a. Install the latest Xcode from Apple.

b. Install [Homebrew](http://brew.sh/).

c. In a terminal, run `brew install dfu-util coreutils gnu-getopt gnu-tar`

   * If you get an error like "Warning: gnu-tar-1.28 already installed, it's just not linked" then try `brew link gnu-tar`

   * If you get an error like "Error: Could not symlink bin/gtar /usr/local/bin is not writable" then do `sudo chown -R $USER:admin /usr/local`
  1. Enable Ethernet over USB:
a. Download and install [HoRNDIS](http://joshuawise.com/horndis#available_versions).

b. Connect your Edison using a data USB cable.

c. Open Network preferences on the Mac.

d. In the list of devices, find the new device with a yellow status dot (usually named "Multifunction Gadget").  Next to "Configure IPv4" select "Manually" and then next to "IP Address" type `192.168.2.2`.  Click "Apply".  You should then see the status dot turn green.

Setting up a Debian Linux machine as a flash station

Get dfu-util by running apt-get install dfu-util and you should be good.

Setting up a Raspberry Pi as a flash station

Flashing the Edison from a Raspberry Pi 2 running Raspbian (Jessie) is possible, and potentially useful as a backup arrangement. First install dfu-util as per Debian above.

The Pi needs an SD card big enough to hold the Buendia flash files - probably min 16 GB. But if you don't have one you can get by with a smaller SD card and a USB stick (probably min 8 GB). Plug in the USB and take the following steps:

mkdir ~/USB
ls /dev/sd*           # identify the USB 
mount /dev/sdb ~/USB  # 'sdb' as example

You also need to shift the /tmp folder to USB, as the flash process stores flash files there.

mkdir ~/USB/tmp
rm /tmp
ln -s ~/USB /tmp      # move tmp to USB and symlink back

Now when you install the buendia directory to begin flashing, do it to the USB..

cd ~/USB
git clone https://github.com/projectbuendia/buendia
cd buendia
# etc...
Clone this wiki locally