Installation Guide

Step 1) Setting up a Linux host for development

This SDK requires a Linux host. This guide assumes that you are running Ubuntu 10.4. For a list of support Linux hosts please go here. For a guide on setting up a Linux host from scratch, go to <here>. To download Ubuntu for desktop computers, go here.

Step 2) Download the SDK

The evaluation SDK contains everything you need to build Linux for the S6-OMAP CoProcessing kit. It includes the kernel source, the toolchain, and a number of applications already ported to the OMAP-L138. Go here for a complete list of SDK features. You will need to dowload an evaluation SDK from the download center. You will fill out a form. Once you have submitted the form, you will be emailed instructions on how to download the SDK. You can put the downloaded SDK installer anywhere on your filesystem.

Step 3) Installing the SDK

The SDK comes in the form of a binary installer (.bin file). You will first need to make the file excutable using the following command:

chmod +x s6omapSDK-beta-Linux-x86-Install.bin

The installer must be able to write to the /opt directory in order to install the toolchain. You can allow it to do this in one of two ways. The first way is to run the installer as root using the sudo command or the su (switch user) command. The other way to do this is to change the ownership of /opt such that you as a user and write to it.

$ sudo chown $USER /opt

Then you will be able to run the installer:

$ ./s6omapSDK-beta-Linux-x86-Install.bin

After accepting a license agreement, the installer will ask for for a default location at which to install the SDK. If you are running the installer as a user, the default location is in /home/$USER/s6omapsdk. You can change this to any directory to which you have write permission. You will also be prompted to select if you want a "Typical" or "Custom" install. Select "Typical."

Step 4) Running 'make' for the first time

Now that you have the SDK installed, you can build your Linux system. You do that by using the 'make' command.

$ cd $HOME/s6omapsdk
$ make

Host OS Check: Changing the link from /bin/sh to /bin/bash

The first time that you run make, it will ask you to do a couple of things in order to proceed. The first thing it might ask of you (particularly if you are running an Ubuntu host), is to change the shell that is run when scripts run /bin/sh. You should see this message.

By default on Ubuntu systems, /bin/sh is linked to /bin/dash and that causes problems with certain build scripts. It should be linked to /bin/bash. Run the following commands to fix this problem:

$ sudo rm /bin/sh
$ sudo ln -s /bin/bash /bin/sh

Once you do this, you will need to run make again.

Host OS Check: Installing required host packages

This time, it will exit because it might find a number of packages that you need to install on your host in order for it to run. Below is a complete list of the required host packages. Your host system might or might not need all of them and the SDK will tell you which ones are missing. You can install them by running the following command (assumes your host has a valid connection to the internet):

First build: Top level configation menu

After you've installed the missing packages, you will run make again. This time, it should present you with the top-level configuration menu.

This menu is the main way for you to customize your Linux system. You can make modifications to the kernel configuration, select user applications, change the type of filesystem to build, and so on.

Since you are just getting started, just take the default settings by selecting "Exit" with the cursor key and hit the enter key. The menu will exit and it the SDK will be built automatically. This can take a while, depending on the performance of your host system.

First build: Installation of TI packages

The first time you build the SDK, it will automatically attempt to download, install, and build various packages from TI. These include DSP/BIOS, DSPlink, Codec Engine, Code Generation Tools, and XDCtools. Each of these takes some time to download and each comes with its own click-through license agreement that you will need to accept.

By default, the TI packages are all downloaded and installed into the s6omapsdk/downloads directory. Make sure to keep this default installation location. Once you have installed all of the necessary TI packages, the SDK build will complete.

First build: Location of build kernel and filesystem

When the SDK build is complete, you will have a kernel and filesystem (and many other things as well, but we won't go into that in this guide). The kernel and filesystem are located at:

$DEVDIR/images/kernel.uImage (uboot loadable binary image)

$DEVIDR/fs/fs (NFS-mountable filesystem directory by default)

You should now be ready to use these on your board.

Step 5) Booting your board with the new kernel and NFS filesystem

In order to configure your board, load the board with the kernel, and use the NFS filesystem, you will need to do some basic host setup.

Here is a diagram showing the data connections between the board and the host computer.

Setting up serial access to the Linux console

You use a serial port with a terminal emulator to control u-boot and Linux. The S6-OMAP CoProcessing Kit makes use of Silicon Labs CP2102 USB-UART bridge chips to provide serial ports. Driver support for these chips is already included in Linux. Simply connect the USB port J16 (labeled "OMAP UART") to your host computer. The serial device should appear in /dev/ttyUSBn, where n is chosen by your particular machine (usually 0).

Sometimes it is a little tricky to discover which device this is. Here is a useful command that will tell you. Before you plug in the USB cable, run this command in a terminal:

$ watch "dmesg | tail 5"

This will show you the last 5 lines in the kernel message log (as reported by the 'dmesg' command). When you connect the USB cable, you should see something like this:

Reset the board and access the U-boot prompt

Once you have your terminal emulator configured and running, reset the OMAP-L138 by pressing SW8 (pushbutton switch labeled "OMAP_RST"). You should see the following text appear in the terminal emulator. Be sure to stop the autoboot process by hitting any key.

Configuring U-boot

In order to use the kernel and filesystem that you just built, you will need to configure U-boot on your board.

By default, the board is configured to boot Linux out of the box by loading the kernel from the on-board SPI flash and to use the filesytem on the SD card. You will need to configure U-boot to load the kenrel into DDR using TFTP from the host TFTP server, and to mount an NFS filesystem. Fortunately, the board comes preprogrammed with some useful macros to greatly assist you. These macros are set as environment settings in U-boot.

To see what environment variables are installed on your system by default, run the 'printenv' command.

To set the board to boot the kernel from TFTP and to use an NFS filesystem, run the following command in U-boot:

AVNET u-boot # setenv bootcmd run tftpnfsboot

This sets the 'bootcmd' environment variable in U-boot to run the macro 'tftpnfsboot.' That way, when your board turns on, by default it will boot from the network. This is very convenient for development.

There are a few other settings that are specific to your network/host computer setup. These include the IP address of the board, the IP address of the TFTP/NFS server, and the path to the NFS root filesystem on the server. You need to set these using the following commands.

Host PC Server Setup

You'll need to make sure you have a TFTP and NFS server running properly on your host computer.

Setting up a TFTP server

Using u-boot, you can speed downloads to the target hardware by using the OMAP Ethernet connection and Trivial File Transfer Protocol (TFTP). Your host PC needs to be configured as a TFTP server for this to work.

Setting up an NFS server

For application development, it is convenient to use root NFS mount file system for the target hardware. This allows you to rebuild your application on the host and immediately run the application on the target hardware with no interveining steps. You host PC needs to be configured as a NFS server for this to work.

Running the FPGA reload test

This driver enables the user to toggle the PROGRAM signal on the FPGA and to check the status of the DONE signal. Toggling the PROGRAM signal causes the FPGA to reset and reload its configuration from SPI flash (a different SPI flash than the one used to boot the OMAP-L138). You can run a simple script to see this in action.

/s6omap_test # ./s6omap_fpga_prog_test.sh
This script will test the ability of the driver
to issue a reset to the FPGA. The driver uses
sysfs to issue the reset pulse and and to check
to see if the FPGA is done with programming.
In 10 seconds, we will issue an FPGA reset using PROG_B
signal. Observe LED D16 go dark. After a few seconds,
it should light back up, indicating that the FPGA has
successfully reread its configuration bitstream
from the SPI flash.
Reset issued, checking DONE bit.
DONE is low. Waiting while FPGA re-reads it's configuration
from SPI flash.
DONE went high. Successful FPGA prog test.

Running the FPGA I2C test

You can also test communication between the OMAP-L138 and the FPGA using I2C. The FPGA comes configured with a slave device on the I2C bus and this used as a simple command and status interface.

Now, run the script. This will do a few things. First it will read the version registers on the FPGA and report the version. Next, it toggles some LEDs (LED1-4), and then it reads the state of the DIP switch SW1 and the user pushbutton switches (SW2-SW5).

/s6omap_test # ./s6omap_i2c_fpga_test.sh
This script tests the i2c connectivity between the
ARM CPU and the FPGA. This requires that the FPGA
be programmed with the i2c slave at i2c address 0x2A.
FPGA ID 0x1, version 1.7
Writing a pattern of 0xFF, 0x00, 0x55, 0xAA to the user LEDs
Done.
Ready to read the DIP switch register. Set bits on SW1 to desired state
and then press enter key when ready.
DIP switch = 0x1
Ready to read the pushbutton switch register. Press a user button
and then press enter key when ready.
Pushbutton switch = 0x8
Test done.
/s6omap_test #

Additional Things to Do

Partitioning an SD card

You can store the file system on an SD card. To do this, you need to have the right partitions setup on the SD card. These steps will create two partitions, the second one is used to hold the target file system.

Checking out the binary images

If you simply want to run the pre-built versions of the Linux kernel using the pre-built file system,, the start by downloading the pre-built images from 're not able to use the SDK you could download the pre-built images.