Getting Started Guide for the AVNET OMAPL138 EVM

From RidgeRun Developer Connection

(Difference between revisions)
Jump to:navigation, search
m (Download the SDK)
(14 intermediate revisions not shown)
Line 3: Line 3:
== Setting up a Linux host for development  ==
== 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 [[Release Notes for latest evaluation SDK for AVNET OMAPL138 EVM#Supported_Operating_Systems|here]]. For a guide on setting up a Linux host from scratch, go to &lt;here&gt;. To download Ubuntu for desktop computers, go [http://www.ubuntu.com/desktop/get-ubuntu/download here].<br>
+
The Avnet S6 Linux SDK requires a Linux host. This guide assumes that you are running [[Release Notes for latest evaluation SDK for AVNET OMAPL138 EVM#Supported_Operating_Systems | one of the supported host operating systems]], with Ubuntu 10.10 being recommended.  There are [http://www.ubuntu.com/desktop/get-ubuntu/download Ubuntu installation download and instructions] available from the Ubuntu website.
== Download the SDK  ==
== 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 [[AVNET OMAPL138 EVM|here]] for a complete list of SDK features. You will need to dowload an evaluation SDK from the [http://www.ridgerun.com/downloadcenter.shtml 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.  
+
The evaluation SDK includes the bootloader, kernel source, toolchain, and a number of applications already ported to the OMAP-L138. Start by downloading the evaluation SDK from the [http://www.ridgerun.com/downloadinfo.shtml?Product=evals6omapsdk download center]. Once you have completed and submitted a short form, you will be emailed instructions on how to download the SDK. You can put the downloaded SDK installer anywhere on your filesystem.
== Installing the SDK  ==
== 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:  
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:  
-
<pre>chmod +x s6omapSDK-beta-Linux-x86-Install.bin
+
<pre>
 +
chmod +x s6omapSDK-beta-Linux-x86-Install.bin
</pre>  
</pre>  
-
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.  
+
The installer must be able to write to the /opt directory in order to install the toolchain. Although root user can write to the /opt directory, running as root is discouraged. Instead, change the ownership of /opt such that you as a user and write to it.  
-
<pre>$ sudo chown $USER /opt
+
<pre>
 +
sudo chown $USER /opt
</pre>  
</pre>  
-
Then you will be able to run the installer:  
+
Note: The ''sudo'' command causes the command to run as root. You will need to enter your user password on Ubuntu systems. Most other distributions require you to enter the root password. Then you will be able to run the installer:  
-
<pre>$ ./s6omapSDK-beta-Linux-x86-Install.bin
+
<pre>./s6omapSDK-beta-Linux-x86-Install.bin
</pre>  
</pre>  
-
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."<br>
+
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''.
-
== Running 'make' for the first time ==
+
The directory where the SDK is installed is called the development directory, and in the documention is referred to as ''$DEVDIR''.  You can have more than one development directory - simply run the install multiple times. You might want more than one development directory, for example, so one directory contains stable tested code and the other contains new code you are creating.
 +
 
 +
== Building the SDK ==
Now that you have the SDK installed, you can build your Linux system. You do that by using the 'make' command.  
Now that you have the SDK installed, you can build your Linux system. You do that by using the 'make' command.  
-
<pre>$ cd $HOME/s6omapsdk
+
<pre>
-
$ make
+
cd $HOME/s6omapsdk
 +
make
</pre>  
</pre>  
 +
=== Host OS Check  ===
=== Host OS Check  ===
Line 34: Line 40:
==== Changing the link from /bin/sh to /bin/bash  ====
==== 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.<br>  
+
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 used when scripts run /bin/sh. You should see this message.<br>  
-
<pre>$ make
+
<pre>
 +
make
 +
</pre>
 +
With may generate the response:
 +
<pre>
bash is not your default shell.
bash is not your default shell.
Please run:
Please run:
Line 43: Line 53:
</pre>  
</pre>  
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:  
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:  
-
<pre>$ sudo rm /bin/sh
+
<pre>
-
$ sudo ln -s /bin/bash /bin/sh
+
sudo rm /bin/sh
 +
sudo ln -s /bin/bash /bin/sh
</pre>  
</pre>  
Once you do this, you will need to run make again.  
Once you do this, you will need to run make again.  
Line 50: Line 61:
==== Installing required host packages  ====
==== 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):  
+
After the build system verifies an acceptable shell is being used, the SDK checked that all required host packages have been installed.  If any packages need to be installed before the build can continue, the make will provide information on how to install the needed packages. 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 the packages by running the following command (assumes your host has a valid connection to the internet):  
-
<pre>$ sudo apt-get install build-essential libtool libncurses5-dev texinfo minicom quilt subversion curl \
+
<pre>
 +
sudo apt-get install build-essential libtool libncurses5-dev texinfo minicom quilt subversion curl \
git-core libdbus-glib-1-dev libgtk2.0-dev flex bison gperf autoconf automake libusb-dev libexpect-perl \
git-core libdbus-glib-1-dev libgtk2.0-dev flex bison gperf autoconf automake libusb-dev libexpect-perl \
mono-devel
mono-devel
</pre>  
</pre>  
-
=== First build  ===
 
-
During the first build, you'll need to go through the initial menu configuration and the SDK will also download and install some proprietary software packages from TI.
+
=== Top level configation menu ===
-
==== Top level configation menu  ====
+
The SDK includes a unified configuration system that allows you to configure the bootloader, kernel, target file system packages, and the installer.
-
 
+
-
After you've installed the missing packages, you will run make again. This time, it should present you with the top-level configuration menu. <br>
+
[[Image:Rr-sdk-config-screen.png|center|Rr-sdk-config-screen.png]]  
[[Image:Rr-sdk-config-screen.png|center|Rr-sdk-config-screen.png]]  
-
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.<br>
+
This menu is the main way for you to customize your Linux SDK.
-
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.  
+
The default SDK settings are recommended for first time users.  Simply select ''Exit' and press enter. 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.
 +
 
 +
You can get back to the configuration menu by running:
 +
 
 +
<pre>
 +
make config
 +
</pre>
 +
 
 +
In the top level development directory.
==== Installation of TI packages  ====
==== 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.  
+
The first time you build the SDK, it will automatically attempt to download, install, and build various TI software packages. These packages 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. The downloaded packages can be found in the ''/opt/ridgerun/downloads'', if the directory exists, otherwise in the ''$DEVDIR/downloads'' directory.  Once you have installed all of the necessary TI packages, the SDK build will complete.
 +
 
 +
If you plan to have multiple development directory installed, then you can avoid downloading the packages more than once by issuing:
 +
 
 +
<pre>
 +
mkdir -p /opt/ridgerun/downloads
 +
</pre>
-
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.<br>
 
==== Location of kernel and filesystem  ====
==== Location of kernel and filesystem  ====
Line 79: Line 101:
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).  
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).  
-
Kernel location:
+
{| border=2
-
<pre>&lt;Install dir&gt;/images/kernel.uImage (uboot loadable binary image)
+
! Location !! Object
-
</pre>
+
|-
-
Filesystem location:
+
||$DEVDIR/images/kernel.uImage || Linux kernel with uBoot header
-
<pre>&lt;Install dir&gt;/fs/fs (NFS-mountable filesystem directory by default)
+
|-
-
</pre>
+
|| $DEVDIR/fs/fs || NFS-mountable target filesystem directory
-
You should now be ready to use these on your board. &lt;Install dir&gt; is typically going to be /home/&lt;user&gt;/s6omapsdk.  
+
|}
 +
 
 +
You are now be ready to load the SDK images onto your Avnet Avnet Spartan-6/OMAP co-processing kit baseboard.
== Booting your board with the new kernel and NFS filesystem  ==
== Booting your board with the new kernel and NFS filesystem  ==
Line 93: Line 117:
Here is a diagram showing the data connections between the board and the host computer.  
Here is a diagram showing the data connections between the board and the host computer.  
-
[[Image:Setup block diagram.png|border|center|363x273px|Setup block diagram.png]]  
+
[[Image:Setup block diagram.png|center|363x273px|Setup block diagram.png]]  
=== Setting up serial access to the Linux console  ===
=== 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).  
+
You use a serial port with a terminal emulator to control the baseboard u-boot and Linux kernel. The S6-OMAP CoProcessing Kit makes use of Silicon Labs CP2102 USB-UART bridge chip to provide the console serial port. Driver support for these chips is already included your Linux host.  
-
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:  
+
Sometimes it is a little tricky to discover the host computer's name that is assigned to the CP2102 serial port. On the Linux host, run:
-
<pre>$ watch "dmesg | tail 5"
+
 
 +
<pre>
 +
watch "dmesg | tail -5"
</pre>  
</pre>  
-
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:  
+
 
-
<pre>[175280.446497] usb 2-1: new full speed USB device using uhci_hcd and address 6
+
 
 +
Watch will periodically run the command to show what last five line of the Linux host kernel's message log.  Now 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).  
 +
 
 +
When you connect the USB cable, you should see something like this:  
 +
<pre>
 +
[175280.446497] usb 2-1: new full speed USB device using uhci_hcd and address 6
[175280.634470] usb 2-1: configuration #1 chosen from 1 choice
[175280.634470] usb 2-1: configuration #1 chosen from 1 choice
[175280.695555] cp210x 2-1:1.0: cp210x converter detected
[175280.695555] cp210x 2-1:1.0: cp210x converter detected
Line 109: Line 140:
[175281.102604] usb 2-1: cp210x converter now attached to ttyUSB0
[175281.102604] usb 2-1: cp210x converter now attached to ttyUSB0
</pre>  
</pre>  
-
The last line in the dmesg output indicates the serial port device to use, which is /dev/ttyUSB0.  
+
 
 +
The last line in the dmesg output indicates the serial port device to use, which is ''/dev/ttyUSB0'' in this case.  
You need to use a terminal emulator program to use the serial port. The picocom terminal emulator work well for this purpose.  
You need to use a terminal emulator program to use the serial port. The picocom terminal emulator work well for this purpose.  
::[[Setting up Picocom - Ubuntu]]
::[[Setting up Picocom - Ubuntu]]
 +
 +
Note: Avnet uses virtual machines (VM) to run Linux. They have noticed the following error when attempting to run Picocom:
 +
 +
<pre>
 +
    FATAL: cannot open /dev/ttyUSB0: Protocol error
 +
</pre>
 +
 +
Sometimes repeated attempts to open the serial port are successful in getting the port to open. It is believed that this is related to using the virtual machine, rather than a native issue with the CP201x driver.
=== Reset the board and access the U-boot prompt  ===
=== 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.  
+
Once you have your terminal emulator configured and running, reset the OMAP-L138 by pressing SW8 (push button 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.
-
<pre>UBL customized by RidgeRun
+
 
 +
<pre>
 +
UBL customized by RidgeRun
Booting TI User Boot Loader
Booting TI User Boot Loader
         UBL Version: 1.65
         UBL Version: 1.65
Line 140: Line 182:
Hit any key to stop autoboot:  0
Hit any key to stop autoboot:  0
</pre>  
</pre>  
 +
 +
If the board starts booting into Linux before you press a key, simply press SW8 again.
 +
You are now ready to configure U-boot.  
You are now ready to configure U-boot.  
Line 146: Line 191:
In order to use the kernel and filesystem that you just built, you will need to configure U-boot on your board.  
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.  
+
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 kernel into DDR using TFTP from the host TFTP server, and to mount an NFS filesystem. Fortunately, the board comes pre-programmed 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 see what environment variables are installed on your system by default, run the 'printenv' command.  
-
<pre>AVNET u-boot # printenv
+
 
-
AVNET u-boot # pri
+
 
 +
<pre>
 +
AVNET u-boot # printenv
baudrate=115200
baudrate=115200
ethaddr=00:08:ee:03:a4:62
ethaddr=00:08:ee:03:a4:62
Line 178: Line 225:
Environment size: 1227/65532 bytes
Environment size: 1227/65532 bytes
 +
 +
AVNET u-boot #
</pre>  
</pre>  
To set the board to boot the kernel from TFTP and to use an NFS filesystem, run the following command in U-boot:  
To set the board to boot the kernel from TFTP and to use an NFS filesystem, run the following command in U-boot:  
<pre>AVNET u-boot # setenv bootcmd run tftpnfsboot
<pre>AVNET u-boot # setenv bootcmd run tftpnfsboot
</pre>  
</pre>  
-
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.  
+
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.  
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.  
-
<pre>AVNET u-boot # setenv ipaddr &lt;board IP address, usually on the same subnet as the TFTP/NFS server&gt;
+
<pre>AVNET u-boot # setenv serverip &lt;TFTP/NFS server IP address&gt;
-
 
+
</pre>
-
AVNET u-boot # setenv serverip &lt;TFTP/NFS server IP address&gt;
+
Note: You can find the IP address of your host by running the 'ifconfig' command.
-
 
+
<pre>$ ifconfig
-
AVNET u-boot # setenv nfspath &lt;absolute path to NFS filesystem on your host computer (e.g. /home/&lt;user&gt;/s6omapsdk/fs/fs)&gt;
+
eth0      Link encap:Ethernet  HWaddr 00:0c:29:df:bf:1a 
 +
          inet addr:192.168.0.111  Bcast:192.168.0.255  Mask:255.255.255.0
 +
          inet6 addr: fe80::20c:29ff:fedf:bf1a/64 Scope:Link
 +
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 +
...
 +
</pre> <pre>AVNET u-boot # setenv ipaddr &lt;board IP address, usually on the same subnet as the TFTP/NFS server&gt;
 +
</pre> <pre>AVNET u-boot # setenv nfspath &lt;absolute path to NFS filesystem on your host computer (e.g. /home/&lt;user&gt;/s6omapsdk/fs/fs)&gt;
</pre>  
</pre>  
After you have made the network setting changes, you can test them to make sure you have a valid connection between the board and the host computer by running the ping command.  
After you have made the network setting changes, you can test them to make sure you have a valid connection between the board and the host computer by running the ping command.  
<pre>AVNET u-boot # ping $serverip
<pre>AVNET u-boot # ping $serverip
-
host &lt;serverip&gt; is alive
+
host &lt;serverip is alive&gt;
</pre>  
</pre>  
You should be done make changes to the U-boot configuration. Save it to SPI flash using the 'saveenv' command.  
You should be done make changes to the U-boot configuration. Save it to SPI flash using the 'saveenv' command.  
Line 212: Line 267:
==== Setting up an NFS server  ====
==== 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.  
+
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 intervening download steps. You host PC needs to be configured as a NFS server for this to work.  
::[[Setting Up A NFS Service]]
::[[Setting Up A NFS Service]]
Line 307: Line 362:
Congratulations! Your board is now booted and running the software you just built with the SDK. Now, let's see some of the things we can do right out of the box.  
Congratulations! Your board is now booted and running the software you just built with the SDK. Now, let's see some of the things we can do right out of the box.  
-
== Step 6) Running the FPGA tests  ==
+
== Running the FPGA tests  ==
The SDK ships with a few simple tests to show connectivity with the on-board Spartan-6 FPGA. These are located in the /s6omap_test directory.  
The SDK ships with a few simple tests to show connectivity with the on-board Spartan-6 FPGA. These are located in the /s6omap_test directory.  
First, activate the Linux console.  
First, activate the Linux console.  
-
<pre>Please press Enter to activate this console.
+
 
 +
<pre>
 +
Please press Enter to activate this console.
starting pid 609, tty '/dev/ttyS2': '-/bin/sh'
starting pid 609, tty '/dev/ttyS2': '-/bin/sh'
Line 321: Line 378:
/ #
/ #
</pre>  
</pre>  
 +
Change directory to s6omap_test.  
Change directory to s6omap_test.  
-
<pre>cd s6omap_test
+
 
 +
<pre>
 +
cd s6omap_test
/s6omap_test # ls
/s6omap_test # ls
s6omap_fpga_prog.ko      s6omap_i2c.ko
s6omap_fpga_prog.ko      s6omap_i2c.ko
Line 328: Line 388:
/s6omap_test #
/s6omap_test #
</pre>  
</pre>  
 +
=== Running the FPGA reload test  ===
=== Running the FPGA reload test  ===
-
The FPGA can be reset and reloaded from using this test. First, install the driver into the kernel.  
+
The FPGA can be reset and programmed using this test. First, install the driver into the kernel.
-
<pre>/s6omap_test # insmod s6omap_fpga_prog.ko
+
 
 +
<pre>
 +
/s6omap_test # insmod s6omap_fpga_prog.ko
s6omap_fpga_prog_init: entered
s6omap_fpga_prog_init: entered
</pre>  
</pre>  
 +
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.  
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.  
-
<pre>/s6omap_test # ./s6omap_fpga_prog_test.sh
+
 
 +
<pre>
 +
/s6omap_test # ./s6omap_fpga_prog_test.sh
   This script will test the ability of the driver
   This script will test the ability of the driver
Line 352: Line 418:
   from SPI flash.
   from SPI flash.
   DONE went high.  Successful FPGA prog test.
   DONE went high.  Successful FPGA prog test.
-
</pre>  
+
</pre>
 +
=== Running the FPGA I2C 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.  
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.  
-
First, install the driver.
+
First, install the driver:
-
<pre>/s6omap_test # insmod s6omap_i2c.ko
+
 +
<pre>
 +
/s6omap_test # insmod s6omap_i2c.ko
s6omap_i2c_init: entered
s6omap_i2c_init: entered
s6omap_i2c_probe: entered
s6omap_i2c_probe: entered
/s6omap_test #
/s6omap_test #
</pre>  
</pre>  
-
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).  
+
 
-
<pre>/s6omap_test # ./s6omap_i2c_fpga_test.sh
+
Now, run the script. This will do a few things. First the script 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 push button switches (SW2-SW5).
 +
 
 +
<pre>
 +
/s6omap_test # ./s6omap_i2c_fpga_test.sh
   This script tests the i2c connectivity between the
   This script tests the i2c connectivity between the
Line 386: Line 458:
-
   Pushbutton switch = 0x8
+
   Push button switch = 0x8
   Test done.
   Test done.
/s6omap_test #
/s6omap_test #
</pre>  
</pre>  
-
'''''<br>'''''
 
== Additional Things to Do  ==
== Additional Things to Do  ==
Line 397: Line 468:
=== Using an SD card root filesystem  ===
=== Using an SD card root filesystem  ===
-
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.  
+
Using NFS is great for development, but if you want to be able to boot your board without being tethered to your Linux host, 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.  
-
::[[Formatting a new SD card]]
+
::[[Formatting a new SD card]]  
-
::[[Installing the Filesystem to an SD Card]]
+
::[[Installing the Filesystem to an SD Card]]
 +
::[[Configuring the Avnet S6-OMAP board to use an SD Card root filesystem]]
== Checking out the binary images  ==
== 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.
+
If you simply want to run the pre-built versions of the Linux kernel using the pre-built file system, then start by downloading the pre-built images from::
::https://www.ridgerun.com/support/avnet/downloads/
::https://www.ridgerun.com/support/avnet/downloads/
Line 410: Line 482:
== Saving pre-built kernel and file system on target hardware  ==
== Saving pre-built kernel and file system on target hardware  ==
-
Format an SD Card with 2 partitions in the first one use a FAT32 format with 32Mb of size and in the second one format it with EXT3 format and with the rest of the SD Card, as described above.  
+
Format an SD card with 2 partitions in the first one use a FAT32 format with 32Mb of size and in the second one format it with EXT3 format and with the rest of the SD card, as described above.  
On your host computer, copy the image of the file system given in the web site to the second partition:  
On your host computer, copy the image of the file system given in the web site to the second partition:  
-
<pre>sudo tar -C /media/&lt;MOUNT EXT3&gt; -xzvf fs-avnet-evm.tar.gz
+
 
 +
<pre>
 +
sudo tar -C /media/MOUNT EXT3 -xzvf fs-avnet-evm.tar.gz
</pre>  
</pre>  
 +
Plug the SD to the board and power on it. Using your terminal emulator (e.g. picocom), send the following commands to u-boot.  
Plug the SD to the board and power on it. Using your terminal emulator (e.g. picocom), send the following commands to u-boot.  
-
<pre>echo Initialize access to SPI flash
+
 
 +
<pre>
 +
echo Initialize access to SPI flash
sf probe 0
sf probe 0
 +
echo Get IP address and configure networking
echo Get IP address and configure networking
setenv autoload no
setenv autoload no
dhcp
dhcp
-
setenv serverip &lt;SERVER_WERE THE TFTP IS&gt;
+
setenv serverip SERVER_WERE THE TFTP IS
setenv autostart no
setenv autostart no
Line 453: Line 531:
saveenv
saveenv
</pre>  
</pre>  
-
= What's Tested and Supported =
+
 
 +
= Tested and supported hardware features =
:AUDIO [[Audio test Spartan 6 LX45T/OMAP L138]]  
:AUDIO [[Audio test Spartan 6 LX45T/OMAP L138]]  
Line 465: Line 544:
:User LEDs
:User LEDs
-
= What's Tested and not Supported  =
+
= Tested but not supported features =
:Changing the mode with OMAPL138 related pins
:Changing the mode with OMAPL138 related pins
-
= What's not Tested and not currently supported by the SDK  =
+
= Currently unsupported hardware features =
:FPGA Communications Ports  
:FPGA Communications Ports  
Line 476: Line 555:
:FPGA GTP Interfaces  
:FPGA GTP Interfaces  
:installing an updated bootloader using ''make installbootloader''
:installing an updated bootloader using ''make installbootloader''
-
 
-
'''Bold text'''
 
[[Category:BoardDocumentation]] [[Category:OMAPL1x]]
[[Category:BoardDocumentation]] [[Category:OMAPL1x]]

Revision as of 17:13, 16 January 2012

Contents

Installation Guide

Setting up a Linux host for development

The Avnet S6 Linux SDK requires a Linux host. This guide assumes that you are running one of the supported host operating systems, with Ubuntu 10.10 being recommended. There are Ubuntu installation download and instructions available from the Ubuntu website.

Download the SDK

The evaluation SDK includes the bootloader, kernel source, toolchain, and a number of applications already ported to the OMAP-L138. Start by downloading the evaluation SDK from the download center. Once you have completed and submitted a short form, you will be emailed instructions on how to download the SDK. You can put the downloaded SDK installer anywhere on your filesystem.

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. Although root user can write to the /opt directory, running as root is discouraged. Instead, change the ownership of /opt such that you as a user and write to it.

sudo chown $USER /opt

Note: The sudo command causes the command to run as root. You will need to enter your user password on Ubuntu systems. Most other distributions require you to enter the root password. 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.

The directory where the SDK is installed is called the development directory, and in the documention is referred to as $DEVDIR. You can have more than one development directory - simply run the install multiple times. You might want more than one development directory, for example, so one directory contains stable tested code and the other contains new code you are creating.

Building the SDK

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

The SDK first checks to make sure the the host is setup properly and has certain necessary packages installed.

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 used when scripts run /bin/sh. You should see this message.

make

With may generate the response:

bash is not your default shell.
Please run:
  sudo rm /bin/sh
  sudo ln -s /bin/bash /bin/sh
make: *** [.oscheck] Error 255

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.

Installing required host packages

After the build system verifies an acceptable shell is being used, the SDK checked that all required host packages have been installed. If any packages need to be installed before the build can continue, the make will provide information on how to install the needed packages. 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 the packages by running the following command (assumes your host has a valid connection to the internet):

sudo apt-get install build-essential libtool libncurses5-dev texinfo minicom quilt subversion curl \
git-core libdbus-glib-1-dev libgtk2.0-dev flex bison gperf autoconf automake libusb-dev libexpect-perl \
mono-devel

Top level configation menu

The SDK includes a unified configuration system that allows you to configure the bootloader, kernel, target file system packages, and the installer.

Rr-sdk-config-screen.png

This menu is the main way for you to customize your Linux SDK.

The default SDK settings are recommended for first time users. Simply select Exit' and press enter. 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.

You can get back to the configuration menu by running:

make config

In the top level development directory.

Installation of TI packages

The first time you build the SDK, it will automatically attempt to download, install, and build various TI software packages. These packages 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. The downloaded packages can be found in the /opt/ridgerun/downloads, if the directory exists, otherwise in the $DEVDIR/downloads directory. Once you have installed all of the necessary TI packages, the SDK build will complete.

If you plan to have multiple development directory installed, then you can avoid downloading the packages more than once by issuing:

mkdir -p /opt/ridgerun/downloads


Location of 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).

Location Object
$DEVDIR/images/kernel.uImage Linux kernel with uBoot header
$DEVDIR/fs/fs NFS-mountable target filesystem directory

You are now be ready to load the SDK images onto your Avnet Avnet Spartan-6/OMAP co-processing kit baseboard.

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.

Setup block diagram.png

Setting up serial access to the Linux console

You use a serial port with a terminal emulator to control the baseboard u-boot and Linux kernel. The S6-OMAP CoProcessing Kit makes use of Silicon Labs CP2102 USB-UART bridge chip to provide the console serial port. Driver support for these chips is already included your Linux host.

Sometimes it is a little tricky to discover the host computer's name that is assigned to the CP2102 serial port. On the Linux host, run:

watch "dmesg | tail -5"


Watch will periodically run the command to show what last five line of the Linux host kernel's message log. Now 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).

When you connect the USB cable, you should see something like this:

[175280.446497] usb 2-1: new full speed USB device using uhci_hcd and address 6
[175280.634470] usb 2-1: configuration #1 chosen from 1 choice
[175280.695555] cp210x 2-1:1.0: cp210x converter detected
[175280.861447] usb 2-1: reset full speed USB device using uhci_hcd and address 6
[175281.102604] usb 2-1: cp210x converter now attached to ttyUSB0

The last line in the dmesg output indicates the serial port device to use, which is /dev/ttyUSB0 in this case.

You need to use a terminal emulator program to use the serial port. The picocom terminal emulator work well for this purpose.

Setting up Picocom - Ubuntu

Note: Avnet uses virtual machines (VM) to run Linux. They have noticed the following error when attempting to run Picocom:

    FATAL: cannot open /dev/ttyUSB0: Protocol error

Sometimes repeated attempts to open the serial port are successful in getting the port to open. It is believed that this is related to using the virtual machine, rather than a native issue with the CP201x driver.

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 (push button 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.

UBL customized by RidgeRun
Booting TI User Boot Loader
        UBL Version: 1.65
        UBL Flashtype: SPI
Starting SPI Memory Copy...
Valid magicnum, 0x55424CBB, found at offset 0x00010000.
   DONE
Jumping to entry point at 0xC1080000.


U-Boot customized by RidgeRun
U-Boot 2009.01 (Aug 06 2010 - 08:54:23)

DRAM:  64 MB
In:    serial
Out:   serial
Err:   serial
ARM Clock : 300000000 Hz
DDR Clock : 150000000 Hz
Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot:  0

If the board starts booting into Linux before you press a key, simply press SW8 again.

You are now ready to configure U-boot.

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 kernel into DDR using TFTP from the host TFTP server, and to mount an NFS filesystem. Fortunately, the board comes pre-programmed 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.


AVNET u-boot # printenv
baudrate=115200
ethaddr=00:08:ee:03:a4:62
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 2009.01 (Aug 06 2010 - 08:54:23)
bootdelay=3
ipaddr=192.168.0.134
serverip=192.168.0.111
nfspath=/mnt/devel/sdk/trunk/fs/fs
kerneloffset=0x50000
ksize=0x280000
kernelloadaddr=0xC0700000
bootfile=kernel.uImage
update_kernel=tftp ${kernelloadaddr} ${bootfile}; sf probe 0; sf erase ${kerneloffset} ${ksize}; sf write ${kernelloadaddr} ${kerneloffset} ${filesize}
spi_load_kernel=sf probe 0;sf read ${kernelloadaddr} ${kerneloffset} ${ksize}
tftp_load_kernel=tftp ${kernelloadaddr} ${bootfile}
set_bootargs_base=setenv bootargs console=ttyS2,115200n8 mem=34M ip=${ipaddr} ${debugopts}
set_nfsbootargs=run set_bootargs_base; setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${nfspath} rw
set_sdbootargs=run set_bootargs_base; setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootfstype=ext3 rw
spinfsboot=run set_nfsbootargs; run spi_load_kernel; bootm ${kernelloadaddr}
tftpnfsboot=run set_nfsbootargs; run tftp_load_kernel ; bootm ${kernelloadaddr}
tftpsdboot=run set_sdbootargs; run tftp_load_kernel; bootm ${kernelloadaddr}
spisdboot=run set_sdbootargs; run spi_load_kernel; bootm ${kernelloadaddr}
bootcmd=run spisdboot

Environment size: 1227/65532 bytes

AVNET u-boot #

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.

AVNET u-boot # setenv serverip <TFTP/NFS server IP address>

Note: You can find the IP address of your host by running the 'ifconfig' command.

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:df:bf:1a  
          inet addr:192.168.0.111  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fedf:bf1a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
...
AVNET u-boot # setenv ipaddr <board IP address, usually on the same subnet as the TFTP/NFS server>
AVNET u-boot # setenv nfspath <absolute path to NFS filesystem on your host computer (e.g. /home/<user>/s6omapsdk/fs/fs)>

After you have made the network setting changes, you can test them to make sure you have a valid connection between the board and the host computer by running the ping command.

AVNET u-boot # ping $serverip
host <serverip is alive>

You should be done make changes to the U-boot configuration. Save it to SPI flash using the 'saveenv' command.

AVNET u-boot # saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done

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 A Tftp Service

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 intervening download steps. You host PC needs to be configured as a NFS server for this to work.

Setting Up A NFS Service

Boot your board

Once you have the board and host computer setup properly, you should be ready to boot your board.

On the host computer, copy the new kernel image to your tftp server downloads directory. This is typically /tftpboot.

$ cp images/kernel.uImage /tftpboot

Now, using the serial console, at the U-boot prompt, simply type 'boot':

AVNET u-boot # boot
TFTP from server 192.168.0.138; our IP address is 192.168.0.134
Filename 'kernel.uImage'.
Load address: 0xc0700000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################
done
Bytes transferred = 2127616 (207700 hex)
## Booting kernel from Legacy Image at c0700000 ...
   Image Name:   "RR Compressed Linux Kernel"
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2127552 Bytes =  2 MB
   Load Address: c0a00000
   Entry Point:  c0a00000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.33-rc4-ridgerun (training@training-vm) (gcc version 4.2.4) #2 PREEMPT Wed Dec 15 12:50:18 CST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DA850/OMAP-L138/AM18xx EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci da850/omap-l138 variant 0x0
...
...
eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=1:00, id=7c0f1)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
     device=eth0, addr=192.168.0.134, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.0.134, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.0.138, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.138
PHY: 1:00 - Link is Up - 100/Full
Looking up port of RPC 100005/1 on 192.168.0.138
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing init memory: 148K
init started: BusyBox v1.14.2 (2010-12-15 11:43:19 CST)
starting pid 508, tty '': '/etc/rcS'
Starting System
done.
Welcome to
    _____
   /     \          ____   ___       ____  ___     ____   ________  _______ __
  /____   \______  /    \ \   \     /   / /   /\  |    / /  _____/ /__    //_/
 /\    \   \    / /      \ \   \   /   / /   // \ |   / /  /_        /   /
/__\    \___\  / /   /\   \ \   \ /   / /   //   \|  / /  /__/      /   /
    \         / /   //_    \ \   \   / /   /\       / /  /___      /   /
     \_______/ /___/    \___\ \___\\/ /___/  \_____/ /_______/    /___/
                                                     Electronics Marketing
                Customized by RidgeRun Embedded Linux Solutions

For further information see:
http://www.ridgerun.com
http://www.em.avnet.com

Build host: training-vm
Built by: training
Build date: Wed, 15 Dec 2010 12:54:32 -0600
Build tag: avnet
Loading modules...
CMEMK module: built on Dec 15 2010 at 12:09:43
  Reference Linux version 2.6.33
  File /home/training/s6omapsdk/proprietary/dvsdk_2_00_00/OMAP-L138_arm_1_00_00_11/linuxutils_2_25_01_06/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc3000000 of size 0x4de000
cmemk initialized
DSPLINK Module (1.65.00.02) created on Date: Dec 15 2010 Time: 12:11:29
Setting ALSA volume to 100%...
Configuring network interfaces
Starting D-Bus message bus system

Please press Enter to activate this console.

Congratulations! Your board is now booted and running the software you just built with the SDK. Now, let's see some of the things we can do right out of the box.

Running the FPGA tests

The SDK ships with a few simple tests to show connectivity with the on-board Spartan-6 FPGA. These are located in the /s6omap_test directory.

First, activate the Linux console.

Please press Enter to activate this console.
starting pid 609, tty '/dev/ttyS2': '-/bin/sh'


BusyBox v1.14.2 (2010-12-15 11:43:19 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ #

Change directory to s6omap_test.

cd s6omap_test
/s6omap_test # ls
s6omap_fpga_prog.ko       s6omap_i2c.ko
s6omap_fpga_prog_test.sh  s6omap_i2c_fpga_test.sh
/s6omap_test #

Running the FPGA reload test

The FPGA can be reset and programmed using this test. First, install the driver into the kernel.

/s6omap_test # insmod s6omap_fpga_prog.ko
s6omap_fpga_prog_init: entered

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.

First, install the driver:

/s6omap_test # insmod s6omap_i2c.ko
s6omap_i2c_init: entered
s6omap_i2c_probe: entered
/s6omap_test #

Now, run the script. This will do a few things. First the script 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 push button 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.


   Push button switch = 0x8

   Test done.
/s6omap_test #

Additional Things to Do

Using an SD card root filesystem

Using NFS is great for development, but if you want to be able to boot your board without being tethered to your Linux host, 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.

Formatting a new SD card
Installing the Filesystem to an SD Card
Configuring the Avnet S6-OMAP board to use an SD Card root filesystem

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, then start by downloading the pre-built images from::

https://www.ridgerun.com/support/avnet/downloads/

Saving pre-built kernel and file system on target hardware

Format an SD card with 2 partitions in the first one use a FAT32 format with 32Mb of size and in the second one format it with EXT3 format and with the rest of the SD card, as described above.

On your host computer, copy the image of the file system given in the web site to the second partition:

sudo tar -C /media/MOUNT EXT3 -xzvf fs-avnet-evm.tar.gz

Plug the SD to the board and power on it. Using your terminal emulator (e.g. picocom), send the following commands to u-boot.

echo Initialize access to SPI flash
sf probe 0

echo Get IP address and configure networking
setenv autoload no
dhcp
setenv serverip SERVER_WERE THE TFTP IS
setenv autostart no

echo Load kernel image over the network using TFTP
tftp 0xC0700000  kernel.uImage.avnet.evm

echo Erasing SPI flash memory...
sf erase 0x50000 0x280000

echo Saving kernel...
sf write 0xC0700000 50000 24FF88

echo Saving new kernel load address...
setenv kernelloadaddr 0xC0700000

echo Saving new kernel save addresses and offset...
setenv kernelsaveaddr 0x50000
setenv kerneloffset 0x50000

echo Saving new kernel size...
setenv ksize 0x250000

echo Set kernel command line
setenv setenv bootargs 'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootdelay=2 rootfstype=ext3 mem=34M' 

echo Set boot command 
setenv bootcmd 'sf probe 0;sf read ${kernelloadaddr} ${kerneloffset} ${ksize}; bootm ${kernelloadaddr}'
setenv autostart yes

echo Saving u-boot parameter environment
saveenv

Tested and supported hardware features

AUDIO Audio test Spartan 6 LX45T/OMAP L138
USB-RS232 USB-RS232 test Spartan 6 LX45T/OMAP L138
Ethernet Ethernet Test Spartan 6 LX45T/OMAP L138
USB ports USB0 USB1 USB Test Spartan 6 LX45T/OMAP L138
SDCARD SLOT SD Card Test Spartan 6 LX45T/OMAP L138
SATA SATA Test Spartan 6 LX45T/OMAP L138
I2C Test I2C General
USER switches
User LEDs

Tested but not supported features

Changing the mode with OMAPL138 related pins

Currently unsupported hardware features

FPGA Communications Ports
OMAP DEBUG (JTAG Interface)
ALI Interface (AVNET LCD Interface)
FPGA GTP Interfaces
installing an updated bootloader using make installbootloader
Navigation
Toolbox