NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Omapl137/DA830 linux bootup
This page is intended to describe the OMAPL137/DA830 EVM boot sequence and several additional details required to reflash the built-in SPI Flash memory.
Contents
Booting the OMAP-L137/DA830 EVM[edit]
Boot overview[edit]
- On the OMAP-L137/DA830 SoC, the DSP boots first
- ARM remains disabled at reset.
- The device supports booting from various media.
- On the EVM, booting from SPI flash is supported.
- The DSP User Boot Loader (UBL) comes up first.
- resides at start of SPI flash
- is in Application Image Script (AIS) file format
- loads the ARM UBL to internal RAM, sets up ARM reset vector and enables ARM.
- Typically there should be no need to modify this software
- The ARM UBL comes up next
- resides next to DSP UBL in SPI flash
- is in flat-binary file format
- Sets up PLLs, SDRAM and does other basic initialization
- Copies U-Boot to SDRAM and starts it.
- U-Boot
- De-facto boot loader for ARM Linux
- resides in SPI flash after ARM UBL
- is in flat-binary file format
- Supported version is 1.3.3
Obtaining Software[edit]
- Need:
- Boot Utils (part of PSP package)
- MontaVista tools
- Code Composer Studio v3.3 (Code Composer Studio v4 for the DA830)
- Obtaining Boot Utils - Use either of:
- Standalone PSP package for DA830/OMAP-L137 from https://www-a.ti.com/downloads/sds_support/targetcontent/psp/mv_lsp_2_20/index.html
- PSP package part of OMAP-L137 Software Development Kit obtainable from: http://focus.ti.com/dsp/docs/dspcontent.tsp?contentId=51607&DCMP=OMAP-LxProcessors+Other&HQS=Other+OT+omapl137sksoftwareea
- Obtaining MontaVista tools
- Demonstration version of tools included with the OMAP-L137 starter kit.
- MontaVista tools obtainable from MVZone support.mvista.com
- Obtaining Code Composer Studio
- CCStudio CD included with OMAP-L137 starter kit.
- Visit: www.ti.com/ccstudio
Flashing the EVM[edit]
- Setup CCStudio on Host PC using CCS Config files and GEL files here: http://support.spectrumdigital.com/boards/evmomapl137/revd/
- Setup the EVM in "emulation debug" mode by setting SW2 switch as follows:
Pin # | 7 | 2 | 1 | 0 | 3 |
---|---|---|---|---|---|
Position | 1 | 1 | 1 | 1 | 0 |
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.
- Power-up the EVM and connect the on-board emulation to the PC using the supplied USB cable
- Start CCStudio, connect to DSP, then to ARM
- From the ARM window, load spiflash_writer.out
- When prompted for filetype, enter dspais =armubl= or u-boot.bin depending on whether you are burning the DSP UBL, the ARM UBL, or U-Boot respectively
- All three files need to be burnt to SPI flash for successful boot-up
- Disconnect CCStudio and Power-off EVM, and setup it to boot from SPI0 Flash
Pin # | 7 | 2 | 1 | 0 | 3 |
---|---|---|---|---|---|
Position | 0 | 1 | 0 | 1 | X |
- Connect NULL modem cable from DB9 connector on EVM to COM port on PC
- Setup the serial terminal for 115200 baud, 8 bit data, no parity, 1 stop-bit and no flow control
- Power up the EVM and you should see the U-Boot prompt on the serial console.
Booting Linux[edit]
- Boot from SPI flash
- SPI flash is 4MBytes on EVM board
- Use SPI flash to store kernel, use SDRAM, NFS, MMC/SD etc for storing FS
- Select the serial flash device sf probe 0
- Download uImage and copy it to SPI flash partition
tftp 0xc0700000 uImage sf erase 0x1E0000 0x220000 sf write 0xc0700000 0x1E0000 0x220000
- Download ramdisk.gz to SDRAM. tftp 0xc1180000 ramdisk.gz
- Setup bootargs to boot with this configuration
setenv bootargs 'mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=dhcp' setenv bootcmd 'sf probe 0;sf read 0xc0700000 0x1E0000 0x220000; bootm 0xc0700000'
Compiling Software[edit]
- Optional if using pre-compiled binaries from bin directory of PSP package
- To compile SPI flash writer:
- open board_utils/flash_writers/spi_flash_writer/ccsv3.3/spiflash_writer.pjt in CCStudio v3.3
- Build the Project like any other CCStudio project
- spiflash_writer.out is placed in the Debug directory
- Re-compiling DSP UBL should typically not be needed. If required, refer to "Additional Procedures" section of PSP User's Guide.
- To compile ARM UBL
- open board_utils/armubl/ubl.pjt in CCStudio v3.3
- Build the Project like any other CCStudio project
- ubl-spi.bin file is placed in the board_utils/armubl directory
- To compile U-Boot:
- untar board_utils/u-boot-1.3.3.tar.gz
- Make sure MontaVista tools are in $PATH
- change to u-boot-1.3.3 directory and issue:
make distclean make da830_omapl137_config make
- u-boot.bin in created in top level directory
- To compile Linux:
- install mvl_5_0_0_demo_lsp_setuplinux_02_20_X_X.bin; untar the kernel.
- change to linux-2.6.18_pro500 directory and issue:
make distclean ARCH=arm CROSS_COMPILE=arm_v5t_le make da830_omapl137_defconfig ARCH=arm CROSS_COMPILE=arm_v5t_le make uImage ARCH=arm CROSS_COMPILE=arm_v5t_le-
- uImage in created in arch/arm/boot directory