MontaVista Linux PSP for OMAP-L137

From Texas Instruments Wiki
Jump to: navigation, search

Template:Db-bio

PSP Overview

The PSP package supports the OMAP-L137 EVM. This PSP package includes the following components:

  • Demonstration version of MontaVista (MV) Linux Pro 5.0 (Kernel Version 2.6.18) ported for OMAP-L137 EVM. The kernel is compiled with MV Pro 5.0 ToolChain based on GCC 4.2.0.
  • U-Boot version 1.3.3 ported for OMAP-L137 EVM. The U-Boot is compiled with MV Pro 5.0 ToolChain based on GCC 4.2.0.
  • User Boot Loader (UBL). This is the primary boot software which copies U-Boot to SDRAM and starts it. This software requires CCStudio 3.3 for building.
  • SPI and NAND flash writers. These are Code Composer Studio(CCStudio) based utilities. CCStudio v3.3 is supported on the OMAP-L137 EVM. (See important note on NAND flash here)

Note: NAND and NOR Flash are not present on OMAP-L137 DSP Starter Kit board. OMAP-L137 SoC however supports interfacing with NAND and NOR Flash..

Downloading the Release

You can get the latest PSP release from the PSP download page at https://www-a.ti.com/downloads/sds_support/targetcontent/psp/mv_lsp_2_20/index.html or from http://www.ti.com/myregisteredsoftware as a part of the OMAP-L137 SDK product. It does not matter which of these locations you use to download the PSP package as long as the version number remains the same.


Host platform Requirements

The complete installation of all PSP components requires both a Windows and a Linux machine.

The Windows machine is required for running CCStudio 3.3. CCStudio is required for building the User Boot Loader (UBL) and Flash writers. CCStudio is also used to burn the boot images (UBL, U-Boot) into the flash using the flash writers provided.

Microsoft Windows XP Service Pack 2 is supported.

Linux host is required

  • for compiling the U-Boot and Linux kernel.
  • to host the TFTP server required for downloading kernel and file system images using U-Boot.
  • to host the NFS server to boot the EVM with NFS as root filesystem

The Linux version supported is RedHat Enterprise Linux WS release 4

You can use a Microsoft Windows or a Linux host for running the terminal emulation program for connecting to the EVM using serial port. Preferred terminal emulation programs are HyperTerminal and Tera term Pro on Microsoft Windows and Minicom on Linux.


Host Software Requirements

The Microsoft Windows and Linux hosts need the following software:

  • CCstudio 3.3.38 running on Microsoft Windows.
  • MontaVista Pro 5.0 for ARM v5t on Linux
  • Serial console terminal application on Microsoft Windows or Linux.
  • TFTP and NFS servers.


Target Hardware Requirements

The target board required is OMAP-L137 EVM. The EVM comes with on-board emulation so no separate emulator hardware is required. The EVM ships with other peripheral hardware like power supply, USB, ethernet and serial cables.


Running the Installation

As outlined in Host Platform Requirements, the PSP package consists of components that need a Microsoft Windows host as well as components that need a Linux host. The recommended installation procedure is to install the PSP package on a Linux host and then copy portions used with a Microsoft Windows host (such as CCStudio projects for building the UBL and flash writers) to a Microsoft Windows host.

Alternately, you can install the PSP package in a disk partition that can be accessed both from a Microsoft Windows and Linux host.

To install the PSP package, extract the release package with the following command (replace ## with the release version number of your release package):

tar -xzf  REL_LSP_02_20_##_##.tgz

The following files and directories are extracted:


   REL_LSP_02_20_##_##
   | 
   +------ mvl_5_0_0_demo_lsp_setuplinux_02_20_##_##.bin
   |
   +------ PSP_02_20_##_##
          |
          +------ examples
          |
          +------ docs
          |
          +------ board_utilities
          |       |
          |       +------ armubl
          |       |
          |       +------ dspubl
          |       |
          |       +------ u-boot-1.3.3.tar.gz
          |       |
          |       +------ flash_writers
          |       |
          |       +------ spi_flash_writer
          |       |
          |       +------ nand_flash_writer
          |       
          +------ bin
          |
          +------ release notes/license agreement/software manifest

Getting Started Quickly

To help you get started quickly, pre-built binaries for the UBL, U-Boot, Linux kernel, and flash writers are provided in the PSP_02_20_##_##/bin directory.

The following list is an overview of the steps you should follow to set up and begin using the OMAP-L137 Evaluation Module (EVM) with the Linux Platform Support Product (PSP) package.

  • Understand how to use the OMAP-L137 EVM hardware by reading the EVM technical reference that accompanies the EVM shipment or by obtaining it online from http://support.spectrumdigital.com/boards/evmomapl137.
  • Set up the EVM to boot from the SPI flash on the OMAP-L137 DSP Starter Kit board.
  • Install the serial terminal software described in Host Platform Requirements and connect the serial cable provided with the EVM shipment to the COM port of the host system.
  • Set up the serial console software on the PC to connect to that serial port with the following characteristics:
    • Baud: 115200
    • Data Bits: 8
    • Parity: None
    • Stop Bits: 1
    • Flow Control: None
  • Power on the board using the power supply that accompanies the board.
  • If your EVM is pre-flashed with U-Boot and Linux kernel, when you power on the EVM, you should see U-Boot and Linux boot sequence messages on the serial console.

Note: If you do not see U-Boot and Linux boot sequence messages, the EVM is not pre-flashed with boot software. You need to flash the EVM with boot software. The pre-built binaries required for booting the EVM are provided in PSP_02_20_##_##/bin folder of PSP installation directory. Skip to "Running PSP Components" to learn how to use them.

  • At the Linux prompt, you can use existing Linux commands to test various features and use examples from the PSP_02_20_##_##/examples folder of the PSP installation directory.
  • While Linux is booting, you can press any key to interrupt the automatic boot of the Linux kernel. This will leave you in U-Boot, where you can type commands in the U-Boot command shell. On this page, commands to be typed in the U-Boot shell are indicated by the U-Boot> prompt.
  • In order to create your own applications running on Linux on the OMAP-L137 EVM or to rebuild U-Boot or the Linux kernel provided with the PSP package, you will need to install the demonstration version of the MontaVista tools that come with the SDK package. To understand how to install and use the MontaVista tools, refer to the instructions at Installing the Software for OMAP-L137. If you are a licensed MontaVista customer, you can obtain MontaVista tools from directly from MontaVista at http://support.mvista.com.
  • If you need to re-build any of the software provided with the PSP installation, skip to "Building PSP Components". Note that building some PSP components requires that you have CCStudio v3.3 running on a Microsoft Windows host. Building other components requires that you have the MontaVista tools running on a Linux host.

Running PSP Components

Pre-built binaries for UBL, U-Boot, Linux kernel, and flash writers are provided in the PSP_02_20_##_##/bin directory in the PSP installation.

On the OMAP-L137 SoC, the DSP boots first. On boot-up, the DSP runs the DSP AIS binary, whose purpose is to load the ARM UBL into internal RAM, set the ARM reset vector correctly, and get the ARM out of reset.

The DSP AIS is written such that there should not be a need to change its contents for a custom board. You should be able to use the DSP AIS binary that ships with the PSP package for your custom designs.

The ARM UBL initializes the PLLs, SDRAM, and other hardware. Once done, it copies the U-Boot into SDRAM and starts it.

U-Boot is an open source boot loader and is responsible for booting the Linux kernel.


Booting U-Boot

Flashing Images to SPI Flash

Follow these steps to boot from SPI Flash:

  • Download the DSP and ARM GEL files from http://support.spectrumdigital.com/boards/evmomapl137. Run the CCStudio Setup tool and ensure that the DSP and ARM GEL files are correctly specified. The file evmomapl137_arm.gel is the ARM side GEL file and evmomapl137_dsp.gel is the DSP side GEL file.
  • Put the EVM in emulation debug mode by setting the SW2 switch as follows:


Pin# 7 2 1 0 3
Position 1 1 1 1 0


Note: On EVM revisions A and B, the SW2 switch for Pin #3 is inverted. That is, OFF = 1 and ON = 0. This problem has been corrected from EVM revision C onwards.

  • Start CCStudio and connect to the DSP. After connecting to the DSP, connect to the ARM. When you connect to the DSP, the DSP GEL file wakes up the ARM, enabling CCStudio to connect to the ARM.
  • Load the SPI flasher tool on to the ARM. You can either use the pre-built binary shipped in the PSP_02_20_##_##/bin directory of the PSP installation (spiflash_writer_ccsv3.out), or you can build your own by following the steps in section on building SPI flash writer .
  • Run the SPI flasher program. you will be prompted for the input file type and the file path. For booting from SPI, a DSP AIS image, SPI UBL, and U-Boot are required.
    • To burn a DSP AIS image, type dspais as the image type. When prompted for a file name, provide the path to dsp-spi-ais.bin file.
    • To burn SPI UBL, type armubl as the image type. When prompted for a file name, provide the path to the ubl-spi.bin file.
    • To burn U-Boot, type uboot as the image type. When prompted for a file name, provide the path to the u-boot.bin file.
  • Once the SPI flash has been written with the all the required files, disconnect CCStudio and power off the EVM.


Booting from SPI Flash

In order to boot from SPI flash, which has been written with the boot images, follow these steps:

  • Set the SW2 switch on the DSK board as follows. (X indicates the setting is 'don't care')


Pin# 7 2 1 0 3
Position 0 1 0 1 X


  • Connect a serial cable from the serial port on the EVM to the COM port on the host machine. Set up the serial terminal software as described in Getting Started Quickly.
  • Power up the board again. The board should boot from SPI flash, and the U-Boot prompt should appear on the serial terminal running on the host.


Booting Linux kernel using U-Boot

Booting the kernel requires a valid kernel image (uImage) and a target filesystem. A pre-built kernel image is included in the PSP_02_20_##_##/bin directory of the PSP installation. File systems of various kinds are supported by Linux kernel. A pre-built RAM Disk image can be found in your MontaVista tools installation at <installation root>/pro/devkit/arm/v5t_le/images/ramdisk.gz. A target filesystem hierarchy suitable for export through NFS is found at <installation root>/pro/devkit/arm/v5t_le/target/

Various methods to boot Linux kernel using U-Boot are detailed here

Loading Linux Kernel Modules

Many of the kernel features can be built as run-time loadable modules so that they are not part of the kernel image, but can be inserted into the kernel at run-time to increase the running kernel’s functionality.

To understand how to configure some features as modules and how to build them, refer to Building a New Linux Kernel

Pre-built binaries for features configured by default as kernel modules are included in the PSP package in the PSP_02_20_##_##/bin/kernel_modules/lib directory. To use these modules, copy the contents of this directory to the /lib directory of your root file system.

On the target Linux command prompt use command modinfo to get information on the module. Use modprobe command to load the module. rmmod command can be used to remove the module. Below is an example of loading the USB file storage gadget module. Similar steps can be followed for any driver module.


Loading USB 2.0

Loading File backed storage module

  • Issue command modinfo g_file_storage at the DUT prompt
# modinfo g_file_storage
filename:       /lib/modules/2.6.18_pro500/kernel/drivers/usb/gadget/g_file_stor
age.ko
license:        Dual BSD/GPL
author:         Alan Stern
description:    File-backed Storage Gadget
depends:        musb_hdrc
vermagic:       2.6.18_pro500 preempt mod_unload ARMv5 gcc-4.2
parm:           file:names of backing files or devices (array of charp)
parm:           ro:true to force read-only (array of bool)
parm:           luns:number of LUNs (uint)
parm:           removable:true to simulate removable media (bool)
parm:           stall:false to prevent bulk stalls (bool) 
  • Insert the g_file_storage.ko module with the following command where /dev/blockdevX is the storage device acting as the actual storage space. Replace it with the path to the actual block device name acting as physical storage, such as a MMC/SD card.
# modprobe g_file_storage file=/dev/blockdevX 
  • Remove the module by using rmmod g_file_storage

Building PSP Components

Building U-Boot

Follow these steps to rebuild U-Boot:

  • Building U-Boot requires that the MontaVista tools have been installed on your Linux host. Make sure that the steps on installing and using the MontaVista tools described at Installing the Software for OMAP-L137 have been completed before starting the U-Boot build.
  • If you have not already extracted the source files for building U-Boot, use your Linux host to extract source files from the PSP_02_20_##_##/board_utilities/u-boot-1.3.3.tar.gz tarball, which you obtained when you installed the PSP package in Running the Installation. Use the tar command to extract the sources.
  • Go to the u-boot-1.3.3 directory created when you extracted the files.
  • Run the following commands on your Linux host to build U-Boot:
make distclean
make da830_omapl137_config
make

The compiled u-boot.bin file will be created in the same directory. The U-Boot build options are specified in the include file include/configs/da8xx_evm.h, which is in the U-Boot source tree. To change build options, edit this file and re-build the U-Boot binary. You can modify the following build options:

  • Choice of flash supported:
    • CFG_USE_SPIFLASH If this flag is defined, U-Boot supports the SPI flash on the OMAP-L137 EVM DSK board. The environment variables are stored on the SPI flash. This option is switched on by default.
    • CFG_USE_NAND If this flag is defined, U-Boot supports U-Boot NAND flash access using the OMAP-L137 SoC. Environment variables are also stored on the NAND flash.
    • CFG_USE_NOR If this flag is defined, U-Boot supports U-Boot NOR flash access using the OMAP-L137 SoC. Environment variables are stored on NOR flash.

See important note on NAND and NOR flash here

Note: Only one of these three options should be defined at a time. Defining more than one option results in a compilation error when you build U-Boot.

  • CFG_ENV_SIZE Configures the environment variable size.
  • CFG_ENV_OFFSET Configures the environment variable offset.


Building a New Linux Kernel

  • Building the target Linux kernel requires that the MontaVista tools have been installed on your Linux host. Make sure that the steps for installing and using the MontaVista tools described at Installing the Software for OMAP-L137 have been completed before starting the the kernel build.
  • If you have not already installed the source files for building the target Linux kernel, use your Linux host to run the mvl_5_0_0_demo_lsp_setuplinux_02_20_##_##.bin file, which you obtained when you installed the PSP package in Running the Installation.
  • When you run this file, you are asked to agree to the MontaVista End User License Agreement (EULA). Accepting this agreement copies the LSP_02_20_##_##.tar.gz tarball, which contains kernel sources, to your Linux host. Extract the kernel sources from this file using the tar command.
  • Change directory (cd command) to the top-level directory of the Linux source obtained in the previous installation step.
  • Run the following commands. The first command cleans the build, and the second one configures the kernel according to the default configuration provided.
make distclean ARCH=arm CROSS_COMPILE=arm_v5t_le-
make da830_omapl137_defconfig ARCH=arm CROSS_COMPILE=arm_v5t_le- 
  • Some of the kernel features and available drivers may not be enabled in the default configuration. #Driver_configuration_in_Linux_kernel describe some useful menus and configuration settings. To enable these features and drivers, the kernel needs to be reconfigured. To begin configuring the Linux kernel, run the following command:
make menuconfig ARCH=arm CROSS_COMPILE=arm_v5t_le-

In the menu that appears, to select or deselect a feature, press the Space key after moving your cursor over the selection box. An asterisk (*) in the selection box means that feature is currently selected for building statically into the kernel. An empty selection box means that feature is de-selected. To configure a particular feature as a runtime loadable kernel module, press the Space key until an "M" appears in the selection box.

  • Run the following command to build the kernel image:
make uImage ARCH=arm CROSS_COMPILE=arm_v5t_le-

The compiled uImage is copied into the arch/arm/boot directory under the kernel tree.

  • To build all features configured as modules (M), issue the following command:
make modules ARCH=arm CROSS_COMPILE=arm_v5t_le-
  • To install the compiled modules into the target root file system, issue the following command:
make modules modules_install INSTALL_MOD_PATH=<root fs path>  ARCH=arm CROSS_COMPILE=arm_v5t_le-

where the <root fs path> is the path of your target root file system on the host machine.

See #Loading_Linux_Kernel_Modules for more information on using kernel modules.


Driver configuration in Linux kernel

This section describes the procedure to configure the kernel to support various drivers.

For configuring the Linux kernel, run the following commands:

make da830_omapl137_defconfig ARCH=arm CROSS_COMPILE=arm_v5t_le-
make menuconfig ARCH=arm CROSS_COMPILE=arm_v5t_le-

For selecting/de-selecting a feature, press 'space' after bringing cursor over selection box. When '*' appears in selection box, the feature is selected, when the selection box is empty, the feature is de-selected.

For configuring a particular feature as module, press 'space' until an 'M' appears in the selection box.

Note that some of the menu options which are required to be deselected here (selection box empty) may not appear at all because the internal checks which render the option invalid. In this case, it is safe to assume that the options have been automatically disabled.


USB 2.0

Configuring for Host

Device Drivers --->

    USB support --->
        <*> Support for Host-side USB
        --- Miscellaneous USB options
        [*] USB device filesystem
        --- USB Host Controller Drivers
        <*> Inventra USB Highspeed Dual Role Controller Support
        --- DA830/OMAP-L137 USB support
            Driver Mode (USB Host) --->
                (X) USB Host

(please see Inventra HDRC USB Controller for more details on the underlying driver) When required to support ISO devices (audio etc), choose the following

        <*> Reserve ISO Endpoint

When required to support MSC devices (pen drive etc), choose the following

        --- USB Device Class drivers
        <*> USB Mass Storage support

When required to support HID devices (mouse, keyboard etc), choose the following

        --- USB Input Devices
        <*> USB Human Interface Device(full HID) support
        [*] HID input layer support
        USB Gadget Support  --->
            < > Support for USB Gadgets 

When required to support MSC devices (pen drive etc), choose the following

    SCSI device support --->
    --- SCSI device support
    [*] legacy /proc/scsi/support
    --- SCSI support type (disk, tape, CD-ROM)
    <*> SCSI disk support

Configuring for Gadget

Device Drivers --->
    USB support --->
        < > Support for Host-side USB
        <*> Inventra Highspeed Dual Role Controller (TI, ...) 
        USB Gadget Support  ---> 
        <*> Support for USB Gadgets 

When required to support Ethernet gadget choose the following

        <*> USB Gadget Drivers (Ethernet Gadget (with CDC Ethernet support)) 
            [*]     RNDIS support (EXPERIMENTAL)

When required to support File backed storage gadget, choose the following

        <M> USB Gadget Drivers
            <M>   File-backed Storage Gadget


USB 1.1

Device Drivers --->

    USB support --->
        <*> Support for Host-side USB
        --- Miscellaneous USB options
        [*] USB device filesystem
        --- USB Host Controller Drivers
        <*>   OHCI HCD support

When required to support MSC devices (pen drive etc), choose the following

        --- USB Device Class drivers
        <*> USB Mass Storage support

When required to support HID devices (mouse, keyboard etc), choose the following

        --- USB Input Devices
        <*> USB Human Interface Device(full HID) support
        [*] HID input layer support
        USB Gadget Support  --->
            < > Support for USB Gadgets 

When required to support MSC devices (pen drive etc), choose the following

    SCSI device support --->
    --- SCSI device support
    [*] legacy /proc/scsi/support
    --- SCSI support type (disk, tape, CD-ROM)
    <*> SCSI disk support


Audio

Device Drivers --->
    Sound --->
        <*> Sound card support
            Advanced Linux Sound Architecture --->
                <*> Advanced Linux Sound Architecture 
                System on Chip audio support  ---> 
                    <*> ALSA for SoC audio support
                    <*> SoC Audio support for DA830/OMAP-L137 EVM
                    [ ] DA830/OMAP-L137 McASP0 control by ARM
                    [*] DA830/OMAP-L137 McASP1 control by ARM
                    [ ] DA830/OMAP-L137 McASP2 control by ARM
                    DA830/OMAP-L137 CODEC (Using the TLV3106 CODEC)  ---> 
                        (X) Using the TLV3106 CODEC 


Graphical LCD

Note: Graphical LCD part is not present on OMAP-L137 DSP Starter Kit board. OMAP-L137 SoC however supports interfacing with Graphical LCD through LCD controller.

System Type  --->
    [*] DA830/OMAP-L137 UI (User Interface) board support
        Select DA830/OMAP-L137 UI board peripheral --->
            (X) LCD      

Device Drivers --->
    Character devices  ---> 
        < > DA830/OMAP-L137 Character LCD Support
    Graphics support  --->
        <*> Support for frame buffer devices
        <*> DA830/OMAP-L137 Framebuffer support
        [*]   Use SHARP LQ035Q3DG01 LCD Display 


Character LCD

Note: Character LCD part is not present on OMAP-L137 DSP Starter Kit board. OMAP-L137 SoC however supports interfacing with Character LCD through LCD controller.

System Type  --->
    [*] DA830/OMAP-L137 UI (User Interface) board support
        Select DA830/OMAP-L137 UI board peripheral --->
            (X) LCD      

Device Drivers --->
    Graphics support  --->
        < > Support for frame buffer devices
        < > DA830/OMAP-L137 Framebuffer support
    Character devices  ---> 
        <*> DA830/OMAP-L137 Character LCD Support 


NAND

See important note on NAND flash here

System Type  --->
    [*] DA830/OMAP-L137 UI (User Interface) board support
        Select DA830/OMAP-L137 UI board peripheral --->
            (X) NAND flash

Device Drivers --->

    Character devices  ---> 
        < > DA830/OMAP-L137 Character LCD Support

    Graphics support  --->
        < > Support for frame buffer devices

    Memory Technology Devices (MTD)  --->
    [*]     Command line partition table parsing
        NAND Flash Device Drivers  ---> 
            <*> NAND Device Support 
            <*> NAND Flash device on DaVinci SoC 


NOR Flash

See important note on NOR flash here

System Type  --->
    [*] DA830/OMAP-L137 UI (User Interface) board support
        Select DA830/OMAP-L137 UI board peripheral --->
            (X) NOR flash

Device Drivers --->

    Character devices  ---> 
        < > DA830/OMAP-L137 Character LCD Support

    Graphics support  --->
        < > Support for frame buffer devices

    Memory Technology Devices (MTD)  --->
        RAM/ROM/Flash chip drivers  --->
            <*> Detect flash chips by Common Flash Interface (CFI) probe  
            <*> Support for AMD/Fujitsu flash chips
        Mapping drivers for chip access  ---> 
            [*] Support non-linear mappings of flash chips
            <*> Latch-assisted Flash Chip Support 


MMC/SD

Device Drivers --->

    MMC/SD Card support  ---> 
        <*> MMC support 
        <*>   MMC block device driver
        <*>   TI DAVINCI Multimedia Card Interface support 


eQEP

Note: Rotary encoder is not present on OMAP-L137 DSP Starter Kit board. OMAP-L137 SoC however supports interfacing with rotary encoders through eQEP peripheral.

System Type  ---> 
   [*] DA830/OMAP-L137 UI (User Interface) board support 

Device Drivers --->

   SPI support  --->
      [ ] SPI support  

   Input device support  --->
      [*]  Miscellaneous devices  --->
         <*>   TI enhanced Quadrature Encoder Pulse (eQEP) support  


SPI

Device Drivers --->

   SPI support  --->
      [*] SPI support  
      --- SPI Master Controller Drivers   
      <*> SPI controller driver for DaVinci SoC
      [*]   Set DaVinci SPI to DMA mode 


Building the User Boot Loader

The following steps build the ARM side User Boot Loader (ARM UBL) using CCStudiov3.3:

  • Start CCStudio v3.3. From the menus, choose Project->Open. Browse to the REL_LSP_02_20_##_##/PSP_02_20_##_##/board_utilities/armubl directory in PSP installation and open the ubl.pjt project.
  • From the menus, choose Project->Build. The project build places the ubl-spi.bin image in the armubl directory.


Building Flash writers

A flash writer is used to flash the DSP AIS binary, ARM UBL and UBoot images to flash. The flash writer supports flashing a given image at a chosen offset.

Use the following steps to build Flash writers using CCStudio v3.3:

  • Start CCStudio v3.3. From the menus, choose Project->Open.
  • Browse to the REL_LSP_02_20_##_##/PSP_02_20_##_##/board_utilities/flash_writers/spi_flash_writer/ccsv3.3 directory in PSP installation, and open the spiflash_writer.pjt project.
  • From the menus, choose Project->Build.
  • The spiflash_writer.out build image is placed in the spiflash_writer/ccsv3.3/Debug directory.


Building DSP AIS Binary

Building the DSP AIS binary requires CCStudio v3.3 and the AIS generation tool. Typically you should not need to rebuild the DSP AIS binary. In most cases, you can use the binary provided in the REL_LSP_02_20_##_##/PSP_02_20_##_##/bin directory in PSP installation.

In case you require to rebuild, follow these steps:

  • Start CCStudio v3.3.
  • From the menus, choose Project->Open. Browse to the REL_LSP_02_20_##_##/PSP_02_20_##_##/board_utilities/dspubl directory in PSP installation and open the ubl.pjt project.
  • From the menus, choose Project->Build. The project build places the ubl-spi.out image in the dspubl/spi directory .
  • Download and install the AISgen tool on a Windows PC by following the instructions in Section 5 of Using the D800K001 Bootloader guide (SPRAB04).
  • Open an MS-DOS command window and change to the AIS Generation tool installation directory.
  • Execute the following command:
hexgen -romid D800K001 -seqread -crc 1 -spiclk 0 -appln <PATH to ubl-spi.out or ubl-nand.out> -output <dsp-spi-ais.bin or dsp-spi-ais.bin>

The resulting output file is the DSP AIS binary.

Additional topics

Linux timer usage

On the OMAP-L137 SoC, there are two 64-bit timers. Currently the usage if the timers in the kernel is as follows:

  • Timer 0 TIM12 (bottom 32-bit timer) used as system timer and freerun timer.
  • Timer 1 used for watchdog.

Note that watchdog can only be supported on Timer 1. Linux used the additinal comparator support to use a single 32-bit timer both as a system timer and as the freerun timer required for HRT support. Since the additional comparators are only available on bottom 32-bit timers, the system/freerun timer can only be shifted to Timer 1 bottom. Here is a patch which does this. Note that by using this patch, the watchdog timer cannot be used since it requires a full 64-bit timer.

diff -urN a/arch/arm/configs/da830_omapl137_defconfig b/arch/arm/configs/da830_omapl137_defconfig
--- a/arch/arm/configs/da830_omapl137_defconfig	2009-02-20 08:06:07.000000000 +0530
+++ b/arch/arm/configs/da830_omapl137_defconfig	2009-03-09 20:40:44.000000000 +0530
@@ -712,14 +712,12 @@
 #
 # Watchdog Cards
 #
-CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 
 #
 # Watchdog Device Drivers
 #
 # CONFIG_SOFT_WATCHDOG is not set
-CONFIG_DAVINCI_WATCHDOG=y
 
 #
 # USB-based Watchdog Cards
diff -urN a/arch/arm/mach-da8xx/time.c b/arch/arm/mach-da8xx/time.c
--- a/arch/arm/mach-da8xx/time.c	2009-02-20 06:30:29.000000000 +0530
+++ b/arch/arm/mach-da8xx/time.c	2009-03-09 20:16:59.000000000 +0530
@@ -24,6 +24,9 @@
 /* Compare registers are only available to the bottom timer 0 */
 static	int da8xx_cmp_irqs[NUM_TIMERS] = {
 	IRQ_DA8XX_T12CMPINT0_0,
+    0,
+    IRQ_DA8XX_T12CMPINT0_1,
+    0
 };
 
 static u32 da8xx_bases[] = { DA8XX_TIMER64P0_BASE, DA8XX_TIMER64P1_BASE };
@@ -39,7 +42,7 @@
 	 * T1_BOT: Timer 1: used as watchdog timer.
 	 */
 	davinci_common_timer_init(da8xx_bases, 2, da8xx_timer_irqs,
-				  da8xx_cmp_irqs, T0_BOT, T0_BOT);
+				  da8xx_cmp_irqs, T1_BOT, T1_BOT);
 }
 
 struct sys_timer davinci_timer = {