Alternate Boot Methods for OMAP-L137/DA830
From Texas Instruments Embedded Processors Wiki
Contents |
Purpose
This page will discuss how to boot the OMAP-L137/DA830 board using various methods. This includes how to load the Linux kernel image into DDR and where the root file system is mounted from. You should set your environment variables for one of the kernel boot methods and also one of the file system methods in order to boot Linux.
Loading Kernel into DDR
Once the DSP AIS image, the ARM UBL and uBoot are burned into the SPI Flash the system will load itself into uBoot and provide a prompt. At this point there are many options for loading the Linux kernel into DDR, but these are the three on which we will focus.
From SPI Flash
In order to boot from SPI flash the bootcmd environment variable in U-Boot must be set to initialize the flash, read the kernel image from flash into DDR, and then boot the kernel in DDR memory. To do this you should set the bootcmd environment variable to:
- EVM # setenv bootcmd 'sf probe 0; sf read 0xc0700000 0x1E0000 0x220000; bootm 0xc0700000'
NOTE: The above command assumes that the kernel was written to 0x1E0000 in SPI Flash as descibed in the Updating Kernel Image in SPI Flash section. If you have written the kernel to another address the above command will need to be modified.
From TFTP
In order to boot with the Linux kernel obtained from TFTP you will need to configure the following U-Boot environment variables depending on how your network is setup:
NOTE: In the below commands it is assumed that the Linux kernel image is name uImage and that it resides in the root of the tftp server directory. If you have given it a different name or placed it somewhere other than root please modify the bootfile variable appropriately.
Using DHCP
- EVM # setenv serverip <tftp server ip address>
- EVM # setenv bootfile 'uImage'
- EVM # setenv bootcmd 'dhcp;bootm'
Using Static IP
- EVM # setenv serverip <tftp server ip address>
- EVM # setenv ipaddr <static ip address>
- EVM # setenv bootfile 'uImage'
- EVM # setenv bootcmd 'tftp 0xc0700000;bootm'
From USB storage
In order to boot from USB storage the bootcmd environment variable in U-Boot must be set to initialize the USB device, read the kernel image from the USB device into DDR, and then boot the kernel in DDR memory. To do this you should set the bootcmd environment variable to:
- EVM # setenv bootcmd 'usb start; fatload usb 0:1 0xC0700000 uImage; bootm 0xc0700000'
NOTE: The command usb start sometimes hangs on the message "scanning bus for storage devices...". If this happens to you, stop the macro from executing, reset the board and reload the script file.
Mounting Root File System
This section will cover how to set the U-Boot environment variables to mount the root file system from various storage media.
From NFS
In order to boot Linux with the file system mounted from NFS you will need to have first exported an NFS target file system. For more information on how to do this please see the page here. This section also assumes that you are using DHCP to obtain the ip address for the board. If you are using static IP you will need to modify the bootargs to set the ipaddr variable appropriately.
- EVM # setenv nfshost <ip address on nfs host>
- EVM # setenv rootpath <directory to mount>
- EVM # setenv bootargs console=ttyS2,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=${nfshost}:${rootpath},nolock mem=32M
From USB Storage
In order to boot Linux with the root file system mounted from a USB storage device you will need to set the following bootargs. For more information on configuring a USB storage device with a root file system please see Creating file systems on removable media
- EVM # setenv bootargs console=ttyS2,115200n8 noinitrd rw ip=dhcp root=/dev/sda2 rootfstype=ext2 mem=32M
From SD/MMC
In order to boot Linux with the root file system mounted from a USB storage device you will need to set the following bootargs. For more information on configuring a USB storage device with a root file system please see Creating file systems on removable media
- EVM # setenv bootargs console=ttyS2,115200n8 noinitrd rw ip=dhcp root=/dev/mmcblk0p1 rootfstype=ext2 mem=32M
