Sunday, April 12, 2009

Setting Up The Development Environment

A part of the SheevaPlug Development Kit is the software development system. This system is used with a Linux Host system to develop applications for the SheevaPlug computer and is contained on a CD which comes with the computer. The CD contains several different files - most are compressed to conserve space (such as the SheevaPlug filesystem):

  1. README file for revision 1.1 of the SheevaPlug Development Kit. This is the first file you would want to view as it contains the instructions to setup the development system and has the descriptions as to the remaining files on the CD. This file also contains information in Appendix sections about different aspects of the development system and it's use in developing applications for the computer.

  2. Documentation Package: This package consists of the documents needed to bring up SheevaPlug development kit platform and SheevaPlug reference design guide.

  3. Schematics and Bill of Materials: This package provides the schematics, layout and BOM necessary to design SheevaPlug development kit reference boards.

  4. U-Boot: This package consists of the files and source codes needed to build U-Boot, initial bring-up of SheevaPlug development kit reference design as well as upgrading the

  5. Linux Support Package: This package provides the files and sources needed to build and configure the Linux kernel with Marvell’s LSP. It also includes a compiled uImage to bring-up SheevaPlug development kit reference design.

  6. File System: This package consists of Ubuntu’s jaunty filesystem.

  7. Host Software Support Package for Windows Host: This package consists of the mini-USB to USB driver that needs to be installed on the Windows host in order to access the debug console for SheevaPlug development kit. Windows does not come with the drivers required.

  8. Host Software Support Package for Linux Host: This package consists of the GCC cross-compiler that needs to be installed on the Linux Host. The package also consists of the basic root filesystem that needs to be installed on the Linux host to initially boot SheevaPlug development board using NFS.

For those of you who are Windows OS oriented only I suspect you will be put off from attempting to setup a software development system for the Plug Computer system - it is built using Linux only (at least at the time of this writing). I have read there is a move to have a Linux system called Ubuntu that is supposed to be able to run in a Windows environment but I have not verified this information yet.

N0w - I use Windows XP on my home development machine and find there are times I need Windows and times I need Linux. I am comfortable working with either, having cut my teeth on CP/M and Microsoft OS on a TRS-80 Model 1 (in other words I have been working with micro-computer systems since before Bill Gates got a speeding ticket in New Mexico!).

I use VMware to setup virtual machines on my home development machine - I find this to be a much better development environment as I can create new virtual machines as needed for different projects then save them for later use. It also makes "creating" a new development environment much simpler as all I have to do to create a new environment is copy an image of an existing VMware machine into a different directory then "import" the new copy into the VMware environment. With just a couple of trivial changes I have a new development environment to work in is a very short period of time. This is the method I used to create the development environment for the plug computer system under Ubuntu 8.04 Desktop. If there is enough interest I may configure a VMware image for doing development work on the SheevaPlug computer - then all you would need to do is download the free VMware Server and install the VMware machine image on your computer. Of course you would need enough resources on your machine to handle the environment (currently you would need at least 1-Gig of RAM and at least 200-Gigs of hard drive space as I create a "100-gig virtual hard drive for my images. I may be able to reduce the size but have not tested this yet). This would reduce development time as the packages would already be configured for you. Let me know if there is some interest in this.

The instructions for configuring a software development system in Linux is contained in the README file on the CD. The basic configuration looks something like this:

  1. Copy the rootfs.tar.bz2 package from ‘Host Software Support Package’ to your Linux host and extract all of its contents to a particular directory. This directory path will act as your rootpath for NFS boot of SheevaPlug development kit.

  2. Copy the LSP package contents to the same folder as above.

  3. Install the GCC cross compiler on the Linux host.

  4. Install the driver using the package ‘CDM 2.04.16_SHEEVA’ from ‘Host Software Support Package’ for the USB debug console on the Windows host.

  5. Follow the instructions in the Appendix A of ‘SheevaPlug - Writing Jaunty Filesystem on the NAND flash-Rev1.0.pdf’ document to flash the U-Boot from the U-Boot package.

  6. See Appendix C in ‘SheevaPlug - Writing Jaunty Filesystem on the NAND flash-rev1.0.pdf’ for boot from NFS.

  7. Follow the instructions of the ‘SheevaPlug - Writing Jaunty Filesystem on the NAND flash-Rev1.0.pdf’ document to flash the filesystem on the NAND of SheevaPlug development kit.

A little description of the above instructions may make things a little more clear as to what is actually being done. Most development kit instructions usually leave "something" to be desired in terms of actually what you are doing as opposed to what the writer assumes you are doing!

The first step above references copying the "rootfs.tar.bz2" package to your Linux host machine then extracting the contents to "a particular directory". The "particular directory" is really just a directory you create to contain the SheevaPlug root filesystem. This is being done to allow NFS (Network File System) access from the SheevaPlug computer system once you have the development system set up. The reason for this configuration is the ease of testing different applications on the SheevaPlug computer system without having to constantly re-writing the application software to the on-board Flash memory to test it.

The second step copies the content of the LSP file to the same directory - the LSP file contains the linux image that is used to run the SheevaPlug computer.

The first and second steps basically setup the linux host machine to allow booting up the SheevaPlug computer over the network using NFS and TFTP/BOOTP as the method to access the filesystem from the network.

Step three installs the GCC compiler needed to compile software for the SheevaPlug computer - this specific compiler is designed to compile software for the ARM computer core as opposed to the Intel i386 computer core. You have to compile applications code to run on the specific microprocessor core and this is what step three is all about.

Step four contains the instructions to install the USB driver needed to "talk" to the SheevaPlug computer through the USB console port. This software is installed on a Windows Host machine. This is one of the reasons I use a virtual machine setup for development work (grin).

Step five contains the instructions for writing the U-Boot image to the SheevaPlug on-board Flash memory. The U-Boot application starts the bootup process on the SheevaPlug machine.

Step six contains the instructions to configure the Flash memory for booting up the system through NFS.

Step seven contains the instructions on how to write the filesystem to the SheevaPlug Development system. This is needed so when you have the filesystem created with the applications you desire you can move it over to the SheevaPlug computer to allow stand-alone operation (IE: bootup directly on the machine instead of across NFS).

In a nutshell - the instructions listed above are the general instructions for development of application on the SheevaPlug computer. I am currently in the process of setting up the development system and will post any "oops" locations as I find them (grin).

Thursday, April 9, 2009

A Marvel of a Marvell

(Note: Clicking the images gives you a better look)

Marvell is the name of a company most people have not heard about - at least non-geek types anyway. Recently (just this first week of April 2009) Marvell, through a company called GlobalScale Enterprise,s released a very interesting computer system. The name of this computer system is a "Plug Computer" for obvious reasons (see picture). Well - the actual name of the computer is "SheevaPlug Development Kit" as the system is designed for applications development - but it still can be used as a computer system! (grin).

Now - the really interesting part - the price:

$99.00 + Shipping (about $12 or so).
It is available here:

You can order from here:

Headless System

Now - there is no keyboard or mouse input, nor is there a video display output - so what good is it you may ask??? The system is designed to run Linux and you access the system using a terminal program by connecting a USB cable (supplied) to the Plug Computer and a PC which is where the terminal program resides. This is CLI (command line interface) stuff and anyone familiar with Linux or Unix is familiar with this interface. Not only is it designed to run linux it also comes with a CD which contains the documentation on the system as well as a development system for use in both Windows and Linux - this allows you to build (actually rebuild) the system with the applications you want on the machine. Given you have 512-megs of Flash you can pack a great deal into this small machine! Heck - you could even install Astrisk (a software PBX system) on this machine and use it for VOIP phones - of course you would need to find a USB interface that will work with telephone lines if you want to use the PBX with normal phone lines but just the fact you can run a VOIP system on this machine is impressive in and of itself!

A Peek Inside the Case:

Inside the case is a lot of compute power for it's size! There is a 1.2-GHz ARM-based processor with 512-Megs of DDR-2 400-MHz (800-MHz by virtue of the method DDR-2 reads memory), 512-Megs of Nand Flash memory, a 1-Gbit Full-Duplex Ethernet interface, a HS USB Version-2 Host interface (host configuration is needed to communicate with devices like external hard drives and such), a SDIO Slot for SD and SDHC cards (micro-SD cards also work with the SD adaptor - same for the micro-SDHC cards), a HS USB Version-2 Console/JTAG Interface which allows access to the machine through a CLI interface and the AC-DC power supply to run all the electronics in the case (whew).

A More Detailed Look:

Now for a little closer look at the actual boards. The Plug Computer contains two distinct boards, the main board contains most of the actual computer system, the Processor, RAM, Flash Memory, Gigabit Ethernet and the USB Host interface. The second board is geared more towards development and testing operations although it also contains the SDIO Interface and the passive heat-sink for the processor (removable so it can stay within the case to serve it's purpose).

Block diagram of the system - The Details

To the right is the block diagram of the system. With the exception of a video display block you have a complete computer system in a small "wall-wart" style case.

What can you do with something like this - glad you asked!!!

There are a number of things people use computers for:

  • File Storage

  • Music Storage

  • Email

  • Web Server

  • Picture Storage

  • Game Server

and the list goes on....

By adding an external USB hard drive you have the makings of a file server that uses very very little power! Most USB external drives draw between 2 - 5 watts of power when they are running (they can be put to "sleep" and only run when needed) and the Plug Computer uses about 5 watts of power total. When you combine the power requirements you end up with a file sharing computer system that uses just a little more power than a night-light! If you are using a wireless setup then you could install a wireless router on the ethernet side of the box and have access from any of your wireless connections.

This only touches on the possiblities of this machine - I plan to post the different projects I am working on for this computer here so check back or RSS the blog to keep track!