GSG: AM35x EVM Additional Procedures

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

^ Up to main AM35x EVM Getting Started Guide Table of Contents

Contents


Updating/Restoring the Flash Image

This section describes how to install software images onto the flash memory on the EVM. This procedure can be used to install an updated version of the software from TI, to install a customized version built by the customer or to restore the flash image if it is destroyed or damaged. This procedure will work even if the flash is completely erased.

Requirements

Preparing to Install

If the EVM has an active u-boot, please disable it from booting the kernel by following the steps given below.

  1. Ensure that the host PC is connected to the board via UART
  2. Power On the board. Once you power on the board, the following will be printed on the hyperterminal or teraterm.
    Texas Instruments X-Loader 1.44 (Dec  2 2009 - 19:07:00)
    Starting OS Bootloader...
     
    
    U-Boot 2009.08-00047-gd5ef5fe (Dec 02 2009 - 18:59:06)
    
    AM35xx-GP ES1.0, L3-165MHz
    am3517evm board + LPDDR/NAND
    I2C:   ready
    DRAM:  256 MB
    NAND:  512 MiB
    In:    serial
    Out:   serial
    Err:   serial
    HECC U20: port before = 00000047
    HECC U20: programmed CAN_STB low
    HECC U20: port after = 00000007
    Die ID #0c4000000000000001543b210600a01a
    Net:   davinci_emac_initialize
    Ethernet PHY: GENERIC @ 0x00
    DaVinci EMAC
    Hit any key to stop autoboot:  0
    
  3. Stop the boot process by pressing the Enter key on the development PC keyboard. The u-boot prompt will appear.
  4. Disable the u-boot from booting the kernel by using the following commands at the u-boot prompt.
    AM3517_EVM # setenv bootcmd echo no boot command configured
    AM3517_EVM # setenv bootdelay 99
    AM3517_EVM # saveenv
    

Updating U-boot via MMC/SD boot

NOTE: Though AM35x supports multiple peripheral boot modes(like ethernet,uart,usb), only MMC/Nand boot modes are supported as part of the AM35x SDK.

In the event that the NAND flash images are corrupted or if would like to upgrade the existing x-loader/u-boot images on the flash,the MMC/SD boot mode can be used.

Follow steps mentioned in AM35x_EVM_Boot_from_SD/MMC_card to boot from MMC/SD card. After bootup from MMC/SD, erase the NAND using the following command (u-boot prompt)

AM3517_EVM# nand erase

Follow steps mentioned below, to update the images in the flash.

Using U-boot to Update the Flash Memory

Now that U-boot is running on the target, you can use it to update any or all of the software in flash. The steps provided here will use the Ethernet connection(directly connected to your Host PC using cross cable or connected through a Hub/Switch) with the TFTP protocol to transfer the files.

Setup the TFTP Server

This section will describe setting up the TFTP server using a Windows host. You may also use a Linux TFTP server but that process is not described here.

Download a TFTP server of your choice. For illustration, we will assume that PumpKIN TFTP server is being used on the Windows Host.


To setup PumpKIN follow these steps:

  1. Start the PumpKIN executable. The first time it is started it should show a Window. Subsequent starts may only show in the system tray. You may open the window from the right click menu of the system tray icon.
  2. Hit the Options button and configure the path to the base of the SDK directory structure.
  3. Select “Allow Access to sub-directories” and “Give all files”
  4. Hit OK
OMAP3530 EVM GSG Additional information 03.JPG
OMAP3530 EVM GSG Additional information 04.JPG
OMAP3530 EVM GSG Additional information 05.JPG

NOTE: The re-flash scripts assume relative paths for the images. If you are using a different TFTP server, ensure that the SDK installation folder is set as the base folder for TFTP exports

Running the Re-flash Procedure

  1. Ensure that the terminal program is configured with ~ 200 ms of delay after sending each line as described in Section Setup Terminal Program
  2. Ensure the environment is set as appropriate for your EVM and network setup
    AM3517_EVM # setenv ethaddr   00:50:c2:XX:XX:XX	(see sticker on EVM)
    AM3517_EVM # setenv ipaddr    192.168.1.10		(as appropriate)
    AM3517_EVM # setenv serverip  192.168.1.100		(TFTP server PC’s addr)
    AM3517_EVM # setenv netmask   255.255.255.0		(as appropriate)
    AM3517_EVM # setenv gatewayip 192.168.1.1		(if needed)
    AM3517_EVM # saveenv
  3. The windows IP address can be obtained using the following steps
    1. Go to Start->Run
    2. Type cmd to open the command window
    3. Type ipconfig on command prompt to get the IP address of the Windows host PC
  4. Check the IP settings
    AM3517_EVM # ping ${serverip}				(expect “x.x.x.x is alive”)
  5. Use the terminal program to send the text file reflash-micron.txt file to the EVM
    1. path: AM35x-OMAP35x-PSP-SDK-##.##.##.##/scripts/
      • reflash-micron.txt (for Micron memory boards)
      Note:The scripts are saved in Unix format.If you want to run from windows please convert it to dos format using unix2dos command in the scripts directory.Usage as given below:
      unix2dos *
    2. If you need to re-flash the target file systems (or your own target file system), refer section Flashing the Pre-built/rebuilt NAND Flash File System
    3. For HyperTerm use Transfer / Send Text File …
    4. For TeraTerm use File / Send file …
    5. For minicom use the paste file command (Ctrl-A Y)
  6. Run the reflash command sequence
    AM3517_EVM # run rf_all_fs (for jffs file-system)
    AM3517_EVM # run rf_all_rd (for ramdisk)

    (Individual components can be reflashed by using commands like rf_ub, rf_kn, etc)

    Note: Using JFFS2 filesystem can result in very long boot times.

  7. Reset the board Note: The current U-boot only allows 40 environment variables. Do not saveenv after the reflash script has been submitted. Instead complete the reflash and reboot before making env changes.
  8. Use the terminal program to send the text file initenv-micron.txt to the EVM
    1. path: AM35x-OMAP35x-PSP-SDK-##.##.##.##/scripts/…
    • initenv-micron.txt (for Micron memory boards)
  9. Save the environment
    AM3517_EVM # saveenv
    
  10. Reset the board and it should boot into the kernel and file-system

Using Telnet

The initialization file (/etc/init.d/rcS) starts a telnet server. If your development host is in the same sub-net as the EVM, you can telnet to it using the IP address assigned in the U-boot environment.

$ telnet 192.168.1.10

You will be prompted for a user name and password. The user name should be root and the password should be left blank (just hit Enter).

Booting the New Linux Kernel

After building the new kernel, in order to use it to boot the AM35x EVM, you must transfer it to the board via TFTP. Once you transfer the kernel image to the board via TFTP, you could either perform a TFTP kernel boot or flash the kernel image to the NAND and subsequently use the NAND boot. It is assumed you have completed the steps under Rebuilding the Linux Kernel, and the boot file, uImage has been copied to /tftpboot (or some other site-specific TFTP accessible location).

Checking the TFTP server setup in the Linux development PC

You can check to see if a TFTP server is set up with this command

# rpm -q tftp-server
    If it is not set up, you can follow these steps:
  1. To install TFTP, use this command, where -#.#-# is the version number portion of the filename :
    # rpm -ivh /path-to-rpm/tftp-server-#.#-#.rpm
  2. Confirm that TFTP is installed with this command:
    # /sbin/chkconfig --list | grep tftp

    You should see the following output:

    tftp: off

    If you need to turn on the TFTP server, use this command:

    # /sbin/chkconfig tftp on

    The default root location for servicing TFTP files is /tftpboot.

Using TFTP to boot the New Linux Kernel

  1. Power on the EVM board, and abort the automatic boot sequence by pressing the “Enter key” in the console window.
  2. Set the following environment variables to ensure that you are starting from a default, clean U-Boot environment.
    AM3517_EVM # setenv serverip <tftp server ip address>
    AM3517_EVM # setenv bootfile uImage

    Set bootargs as given below

    AM3517_EVM # setenv bootargs mem=256M console=ttyS2,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 omapfb.rotate=1 
    omapfb.vrfb=y omap_vout.vid1_static_vrfb_alloc=y
    AM3517_EVM # setenv bootcmd ‘tftpboot 0x80000000 uImage;bootm’

    This configuration boots a new Linux kernel via TFTP with a NAND flash based file system

  3. In case of use of ramdisk file system use the following commands:
    AM3517_EVM # setenv bootargs mem=256M console=ttyS2,115200n8 root=/dev/ram0 initrd=0x81600000,40M  ramdisk_size=40960 
    omapfb.rotate=1 omapfb.vrfb=y omap_vout.vid1_static_vrfb_alloc=y
     AM3517_EVM # setenv bootcmd ‘tftpboot 0x81600000 ramdisk.gz;tftpboot 0x80000000 uImage;bootm’

    You could use TFTP to transfer the ramdisk image from the development PC or flash it on the NAND flash. Refer section "Running the Re-flash Procedure" for more details on flashing the file systems on the target

    In case of use of NFS, use the following commands:

    AM3517_EVM # setenv bootargs    mem=256M console=ttyS2,115200n8 noinitrd ip=dhcp rw root=/dev/nfs  
    nfsroot=<nfsserver_ip>:/home/<useracct>/workdir/filesys,nolock omapfb.rotate=1 omapfb.vrfb=y 
    omap_vout.vid1_static_vrfb_alloc=y

Flashing the New Linux Kernel

The Linux kernel can also be flashed on the NAND and then could be used for the boot. Perform the following steps for flashing the new or rebuilt Linux Kernel

  1. Make sure that the environment variables are properly set
    AM3517_EVM # setenv serverip <tftp server ip address>
    AM3517_EVM # setenv bootfile uImage
    
  2. Flash the Kernel Image onto the Micron NAND flash using the following commands.
    AM3517_EVM # mw.b 0x81600000 0xff 0x1400000
    AM3517_EVM # nand erase 280000 300000
    AM3517_EVM # tftpboot 0x81600000 uImage
    AM3517_EVM # nandecc sw
    AM3517_EVM # nand write.i 0x81600000 280000 300000
    
  3. Once the image is flashed, refer to Booting From Flash using Board’s NAND Flash File System or Booting from Flash Using NFS File System for booting using the kernel image in NAND flash.

Flashing the Pre-built/rebuilt NAND Flash File System

Perform the following steps to program the flash for pre-built or a rebuilt NAND flash file system. Copy the rootfs.jffs2 image to the default location for servicing the tftp files on the host PC. (refer to section TFTP server setup on Linux PC or section Setup the TFTP Server)

  1. Make sure that the environment variables are properly set
    AM3517_EVM # setenv serverip <tftp server ip address>
    AM3517_EVM # setenv bootfile uImage
    
  2. Flash the NAND flash file system Image onto the Micron NAND flash using the following commands.
    AM3517_EVM # mw.b 0x81600000 0xff 0x6000000
    AM3517_EVM # nand erase 780000 6000000
    AM3517_EVM # tftpboot 0x81600000 rootfs.jffs2
    AM3517_EVM # nandecc sw
    AM3517_EVM # nand write.i 0x81600000 780000 6000000
    

    Once the image is flashed, refer to section Booting From Flash using Board’s NAND Flash File System or section Booting via TFTP Using Board’s NAND Flash File System for booting using the NAND flash file system

Changing Options in U-boot

If you use the environment provided by the initenv-micron.txt script you have several choices for boot options. Most of the boilerplate has been provided; you just need to set your choices.


Kernel choices:

AM3517_EVM # setenv get_kernel run nand_kernel	(get kernel from flash)
AM3517_EVM # setenv get_kernel run tftp_kernel	(get custom kernel from TFTP)

Initrd choices:

AM3517_EVM # setenv get_initrd run nand_initrd	(get kernel from flash)
AM3517_EVM # setenv get_initrd run tftp_initrd	(get custom image from TFTP)

File-system choices:

AM3517_EVM # setenv bootcmd    run bootargs_rd          (use an initrd ramdisk)
AM3517_EVM # setenv bootcmd    run bootargs_fs          (use a JFFS file-system in flash)
AM3517_EVM # setenv bootcmd    run bootargs_nfs         (use NFS root directory)

Save your choices:

AM3517_EVM# saveenv					(save to flash)

To run a JFFS file-system or a ramdisk image from flash you need to make sure the appropriate image is in flash. You can use the reflash-micron.txt script to load the appropriate image.

Re-flash choices:

AM3517_EVM # run rf_all_rd				(update all using full ramdisk)
AM3517_EVM # run rf_all_min_rd				(update all using minimal ramdisk)
AM3517_EVM # run rf_all_fs				(update all using JFFS image)
AM3517_EVM # run rf_rd					(update just the full ramdisk)
AM3517_EVM # run rf_min_rd				(update just the full ramdisk)
AM3517_EVM # run rf_fs					(update just the JFFS image)

Note 1: The two ramdisk images and JFFS are all mutually exclusive in Flash as they occupy the same partition. (Running ramdisk from tftp does not require flash space).

Note 2: The current U-boot only allows 40 environment variables. Do not saveenv after the reflash script has been submitted. Instead complete the reflash and reboot before making env changes.


Alternate Boot Methods

Booting From Flash using Board’s NAND Flash File System

This is the default, out-of-the-box boot configuration Make sure that the kernel image and the JFFS2 root file system is flashed To boot in this mode, set the following parameters after you abort the automatic boot sequence:

For Micron NAND EVM:

 AM3517_EVM # setenv nand_kernel nand read.i 0x80000000 280000 300000 

Set the following environment variables:

AM3517_EVM # setenv get_kernel run nand_kernel
AM3517_EVM # setenv bootcmd ‘run get_kernel;bootm 0x80000000’
AM3517_EVM # setenv bootargs mem=256M console=ttyS2,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 
                           omapfb.rotate=1 omapfb.vrfb=y omap_vout.vid1_static_vrfb_alloc=y
AM3517_EVM # boot

NOTE: All setenv commands should be entered on a single line. They are shown on multiple lines here for ease of reading.

Booting from Flash Using NFS File System

Make sure that the kernel image is flashed. To boot in this mode, set the following parameters after you abort the automatic boot sequence:

For Micron NAND EVM:

 AM3517_EVM # setenv nand_kernel nand read.i 0x80000000 280000 300000 

Set the following environment variables:

AM3517_EVM # setenv get_kernel      run nand_kernel
AM3517_EVM # setenv bootcmd ‘run get_kernel;bootm 0x80000000’
AM3517_EVM # setenv bootargs console=ttyS2,115200n8 noinitrd rw ip=dhcp  root=/dev/nfs nfsroot=<nfshost>:<rootpath>,nolock 
                           mem=256M omapfb.rotate=1 omapfb.vrfb=y omap_vout.vid1_static_vrfb_alloc=y
AM3517_EVM # boot

NOTE: All setenv commands should be entered on a single line. They are shown on multiple lines here for ease of reading.

The <nfshost> shall be set to the ip address of the NFS host machine. The <rootpath> must match the filesystem that you set up on your workstation. For example, /home/<useracct>/workdir/filesys

Booting via TFTP Using Board’s NAND Flash File System

To boot in this mode, set the following parameters after you abort the automatic boot sequence:

NOTE: You can find a pre-built kernel image (uImage) in the AM35x-OMAP35x-PSP-SDK-##.##.##.##/images/kernel directory.

Make sure to check the tftp server setup on the Linux development host (Refer Checking the TFTP server setup in the Linux development PC)

AM3517_EVM # setenv serverip <tftp server ip address>
AM3517_EVM # setenv bootfile  <kernel image>
AM3517_EVM # setenv bootcmd ‘tftpboot 0x80000000 uImage;bootm 0x80000000’ 
AM3517_EVM # setenv bootargs   mem=256M console=ttyS2,115200n8 noinitrd ip=dhcp root=/dev/mtdblock4 rw rootfstype=jffs2 
                             omapfb.rotate=1 omapfb.vrfb=y omap_vout.vid1_static_vrfb_alloc=y
AM3517_EVM # boot

NOTE: All setenv commands should be entered on a single line. They are shown on multiple lines here for ease of reading.

Booting via TFTP using NFS file system

To boot in this mode, set the following parameters after you abort the automatic boot sequence:

NOTE: You can find a pre-build kernel image (uImage) in the AM35x-OMAP35x-PSP-SDK-##.##.##.##/images/kernel directory.

AM3517_EVM # setenv bootcmd 'dhcp;bootm'
AM3517_EVM # setenv serverip <ip addr of tftp server>
AM3517_EVM # setenv bootfile <name of kernel image>
AM3517_EVM # setenv rootpath <root directory to mount>
AM3517_EVM # setenv nfshost <ip addr of nfs host>
AM3517_EVM # setenv bootargs console=ttyS2,115200n8 noinitrd rw ip=dhcp  root=/dev/nfs 
nfsroot=$(nfshost):$(rootpath),nolock mem=256M omapfb.rotate=1 omapfb.vrfb=y omap_vout.vid1_static_vrfb_alloc=y
AM3517_EVM # boot

NOTE: All setenv commands should be entered on a single line. They are shown on multiple lines here for ease of reading.

The <root directory to mount> must match the file system that you set up on your workstation. For example, /home/<useracct>/workdir/filesys.

Changing the Output Display to DVI

The output display is set by default as LCD.You can change it to DVI either through Boot Mode Argument for the kernel or command line arguments once the kernel has booted.

Boot Mode Arguments for DVI

Please add the following commands to the bootargs 'omapdss.def_disp="dvi" omapfb.mode=dvi:1280x720@60'


Command Line Arguments

Once the EVM is booted, you can change the output display from LCD to DVI from the Linux shell in a terminal window connected to the EVM board’s serial port.

Issue following commands to switch output device from LCD to DVI

target $ echo 0 > /sys/devices/platform/omapdss/display0/enabled
target $ echo "" > /sys/devices/platform/omapdss/manager0/display
/* Set the Frame buffer parameters like xres, xres_virtual, y_res, yres_virtualagain before running below command. For example for 720P as DVI resolution setxres=1280 yres=720 xres_virtual=1280 yres_virtual=1440.*/
target $ fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
target $ echo "dvi" > /sys/devices/platform/omapdss/manager0/display
target $ echo 1 > /sys/devices/platform/omapdss/display2/enabled
E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article GSG: AM35x EVM Additional Procedures here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment

Comments

Comments on GSG: AM35x EVM Additional Procedures


Dbaughman said ...

The AM3517 EVM has an HDMI output not DVI...will the section above titled "Changing output to DVI still apply?"

--Dbaughman 10:08, 10 June 2010 (CDT)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox