This is a follow-up post to my previous entry here. Continuing on from last time, the next task was to get an OS up and running on the Edison board.
As things stand, there a few choices: the Yocto distribution, which is the officially-adopted distro, Brillo (Google’s new IoT-targeted OS) and Debian. Yocto is fairly new (a couple of years old now) and has a few notable differences from more common distributions (for example, it uses the opkg package manager as opposed to the more familiar apt or yum) and seems to have a less diverse package feed base. I’ve no experience with Brillo at this time. I’m much more familiar with Debian and its derivatives, so I decided to go ahead and use that.
A company named Emutex Ltd offer a Debian Wheezy-based distribution called Ubilinux which is prebuilt and pretty straightforward to use. Sadly, they stopped supporting and developing it a few months ago. Being somewhat particular about these things, I searched out alternative means of getting Debian running on the Edison.
It turned out that building a Debian image could be done without much difficulty – the necessary scripts were already available in the Edison BSP (board support package) source! I’m not entirely sure why I haven’t come across any prebuilt images put together in this way.
Fundamentally, this page covers the steps in detail. Along the way I discovered one or two slight changes to be made, but ultimately ended up with what was supposedly a functional Debian image. The full commentary can be found here, if you intend to replicate the process.
The image was built on an Azure Virtual Machine running Ubuntu 14.04 x64. Note that (at this time) building the image on another OS won’t work. When the build process completed (after several hours on one of the basic hardware configurations available), I zipped the resulting “toFlash” folder and transferred it to my local machine over SCP. That folder (“toFlash”) contained the image files themselves (e.g edison-image-edison.ext4, edison-image-edison.hddimg, edison_dnx_fwr.bin, etc), which will be used in flashing the Edison’s eMMC storage.
To actually flash the Edison, the drivers for the board must be installed (I’m running Windows – instructions for other OSes will likely vary). Steps to do that can be found here. Once that was done, a copy of the dfu-util utility was required. It can be gotten from here. At the time of this writing, the latest version was 0.9.
Once that was obtained, the actual dfu-util binary (dfu-util.exe) and libusb library (libusb-1.0.dll) were placed in the same folder as the image contents, as per the official flashing instructions. That is, the dfu-util.exe and libusb-1.0.dll files were copied into the toFlash folder. Next, I opened a Command Prompt (I opened one with Administrator privileges just to be on the safe side), and navigated to the toFlash folder.
At this point, the Edison should not be powered nor plugged into the PC.
Once there, the flashall.bat script was executed by typing flashall.bat at the command prompt. A few messages will appear and ask that the board be rebooted and then plugged in.
I was powering the Edison using the USB slave port (the micro USB port immediately below the full-sized host port), so at this point I simply plugged the board in. The script automatically detected the board and went ahead to flash it. Here’s a photo of what I got.
And after about six or eight minutes, I arrived here:
Once this was done, as per prompt above, I left the board plugged into the PC for a short while (about six minutes just to be safe). Next, I plugged in the serial cable (into the other micro USB port, below the power/debug/slave microUSB port). Normally I’d have needed to install the FTDI drivers to get a serial port when I plugged the cable in, but I had already installed the FTDI drivers (at some point in the past, for one of my Arduino boards). The takeaway here is that on plugging the serial cable in, a new serial port should be available on your computer. On Windows, it’d typically be called USB Serial Port (COMxx), where xx is the port number. Noting the port number, I pulled up PuTTY (any other terminal emulator will most likely serve also) and opened a connection using that port at 115200 baud (I don’t think it makes a particular difference really). I had to hit the Enter key once before I got a login prompt.
The default user name is ‘user’ (without the quotes…) and the default password is ‘edison’ (also without the quotes).
I got a shell prompt, which was certainly comforting.
My next post will talk about exploring the Debian experience on the board, configuring WiFi and getting relevant packages installed.
Hope to see you next time!
Ps: My prebuilt image can be found here, for anyone interested in giving it a whirl.