Before the Getting Started Guide

From Texas Instruments Wiki
Jump to: navigation, search


Objective

In order to properly go through the Getting Started Guide provided with DaVinci and OMAP evaluation modules (EVMs), one first needs a host environment set up in Linux. In this article (and the Getting Started Guide) the DaVinci or OMAP platforms are referred to as the target, while the Linux environment running on a PC is referred to as the host. There are many ways to set up the Linux environment, including the following:

  1. You can have a computer with a Linux operating system installed. Of course, if you don't already have this, it can be impracticle to buy another machine solely for this purpose.
  2. You could set up a current computer to dual boot into a Linux OS, but this can be complicated, and switching between systems is time consuming. Also, this doesn't offer much benefit over the next option if the only purpose of the Linux environment is to serve as a host system.
  3. You can set up a virtual Linux machine that runs within your current Windows operating system. Effectively, this allows you to run two operating systems simultaneously. This provides the flexibility of having a Linux OS while still being able to have access to your native OS.

The first half of this guide will focus on the third option - setting up a virtual machine to run Linux. This will be done using software called VMware. Once you have a working Linux OS, regardless of the method used, the second half of this guide outlines how to configure the host environment as needed by the Getting Started Guide. This includes setting up Samba, NFS, and TFTP to communicate between the host and target systems. Once this is complete, you should have everything set up to successfuly navigate the Getting Started Guide. In addition, if you would like a more thorough overview of the Linux toolchain required to develop for OMAP and DaVinci, more information can be found on the Linux Toolchain wiki, referenced at the end.

Part 1 - Setting Up a Virtual Linux Environment

The process for creating a host system in a virtual environment is outlined here, using VMware. Once you have a Linux system set up, you can move to Part 2 to configure the system to work with the target.

Getting Started with VMware

With VMware Workstation, you can create your own virtual machine, customized to your specifications. VMware offers a free one month trial period, after which you must purchase a license. A completely free alternative is to use VMware Player with a predefined virtual machine available to you. Typically, VMware Player should provide enough functionality to create a host system that will get you through the Getting Started Guide. However, instructions for VMware Workstation are also provided here, if that is a tool you will need.

System Setup
  • VMware Player
    • VMware Player is a free desktop virtualization software application which allows users to run virtual machines on a Windows or Linux PC.
    • VMware Player can also be used to evaluate virtual appliances from the VMware Virtual Appliance Marketplace.
    • Get more information and download VMware Player here.
  • Create Image Using VMware Workstation
    • Vmware Workstation allows users to create and run multiple virtual machines on a desktop or laptop computer.
    • Vmware Workstation is not free as in the case of VMware Player. Pricing information for VMware Workstation for Windows/Linux can be found here.
    • Get more information on the features supported with VMware Workstation from here

Using VMware Player

1. Download VMware Player - http://www.vmware.com/products/player/

2. VMware Player gives you the option to either open an existing virtual machine or download a virtual appliance from VMware Virtual Appliance Marketplace.

  • VMware player can run any image that was created using VMware Workstation. Hence, one license of VMware Wokrstation can supply VMware images to any number of VMware Player.
  • Alternatively, already made images can be obtained from the Virutal Appliance Marketplace here. The page should list popular appliances, which is typically a good list to choose from. This guide is based off of the Fedora operating system. Another popular choice is Ubuntu. A lot of support for either of these operating systems can be found on the web.

Using VMware Workstation

1. Download VMware Workstation - http://www.vmware.com/products/ws/

2. Download a linux Operating System (.iso file). In this gude, we use the Fedora 10 live CD, available from http://fedoraproject.org or http://www.cyberciti.biz/tips/download-fedora-10-cd-dvd-iso.html

If you elect to use the latest version of a Fedora or Ubuntu distro make sure you pre-check that your version of VmWare workstation supports it.

3. Generate a new virtual machine from VMware Workstation

4. Run through the installation procedure for your operating system. In the case of Fedora 10 live CD, double click the install icon on the desktop, and follow the instructions.

Refer to the Visual_Workstation document for visual aid of the installation process. For more specific help on installing the operating system, the links in the references section may be a good place to start.

Part 2 - Configuring the Host Sytem

Now that you have a functioning Linux system, there are some steps to take so that it is easy to communicate with the OMAP or DaVinci target.

Samba

If you have decided to use a virtual machine, it may be convenient to have a Samba server. Samba allows a host to interact with a Microsoft Windows client or server as if it is a windows file and print server. In other words, if you are installing software on a windows machine, you can easily transfer/modify files to the host machine by accessing it (the host machine) through windows.

Samba

Installing a Samba Server

1. Samba can be installed by opening a terminal. (Applications -> System Tools -> Terminal)

2. Switch to root user by typing su and entering the password you set during the install.

3. On Fedora, you can install Samba with the command yum install system-config-samba.

4. Open the Samba GUI (System -> Administration -> Samba).

5. Configure the share

  • Click on "Add Share"
  • Specifiy the directory you want to share. For example, /home/<username>
  • Check both the Writable and Visable boxes
  • On the "Access" tab, select the Allow access to everyone option
  • Select "OK"

6. Set up the workgroup

  • From the toolbar, select Preferences -> Server Settings
  • Specify the "Workgroup" to match the workgroup on your Windows environment
  • Select "OK"

7. Add a user

  • From the toolbar, select Preferences -> Samba Users
  • Click "Add User"
  • From the "Unix Username" dropdown box, select the username you set up
  • In the "Windows Username" and password boxes, enter the Unix Username and password for that user, respectively.
  • Select "OK"

8. Turn off the firewall

  • System -> Administration -> Firewall
  • Select the "Disable" button

9. Enable the Samba and NFS services

  • System -> Administration -> Services
  • Enable the services by browsing through the list on the left and locating nfs and smb. If they are not already enabled, enable them by clicking the "Enable" button.

10. Test the configuration

  • From a terminal on the Linux workstation, type the command /sbin/ifconfig and note the IP address
  • From your Windows machine, go to Start -> Run and type \\<IP_ADDR> replacing <IP_ADDR> with the IP address of the Linux system

TFTP Server

An alternate boot mode of the EVM is TFTP (Trivial File Transfer Protocol) boot with NFS filesystem. You may encounter this boot mode if your host machine (linux machine, vm-workstation) contains the linux kernel and filesystem. For a successful boot, there has to be a way to boot the kernel over a network connection. This can be accomplished using a TFTP server.


Check to see if a TFTP server is set up with the following command:

chkconfig --list tftp

If it is not set up you can follow these steps:

1. TFTP server can be installed by opening a terminal. (Applications -> System Tools -> Terminal)

2. Switch to root user by typing su and entering the password you set during the install.

3. On Fedora, you can install Samba with the command yum install tftp-server

4. Enable the TFTP service

  • System -> Administration -> Services
  • Enable the services by browsing through the list on the left and locating tftp. If it is not already enabled, enable it by clicking the "Enable" button.

5. If you can't tftp to the server, execute the following commands.

  • chkconfig tftp on
  • service xinetd reload

References