1.1.2. Run Setup Scripts

Overview

After installation of the SDK on the Linux host, the setup script should be run to prepare the host for software development. Some of the tasks require administrator privileges. The script will prompt you when these administrator privileges are required. The setup script does the following things:

  • Verification that the Linux host is the recommended Ubuntu LTS version
  • Installation of required host packages
  • Target FileSystem installation
  • NFS setup
  • TFTP setup
  • Minicom setup
  • uboot setup
  • Load uboot script

Note

The host setup is common to all TI platforms.

../../_images/Linux_Host_Development_System.png

How to run the setup script

The Setup Script (setup.sh) is located in the Processor SDK Linux AM65xx installation directory.  By default, this directory has a name that has the form ti-processor-sdk-linux-[platformName]-evm-<version>.

Then run the script:

./setup.sh

Note

The Setup Script will first check to see if the user is running the recommended Ubuntu Long Term Support (LTS) distribution, if not it will exit. If the user is running on a different Ubuntu version or another Linux distribution, they are encouraged to modify the environment setup script to match their distribution. See which version of Ubuntu is currently supported here.

Detailed step by step description through the setup script

The following sections describe in more detail how to run the script and what it is doing.

Installation of Required Host Packages

This section will check to make sure you have the proper host support packages to allow you do the following tasks:

  • telnet
  • bring up menuconfig, the kernel configuration tool
  • mounting filesystem via nfs
  • tftp
  • bring up minicom
  • rebuild u-boot

If your host lacks any of the needed packages, they will automatically be installed in this step.

Note

This command requires you to have administrator priviliges (sudo access) on your host.

The command below is an example of what this script is doing. The actual packages may vary for different releases:

sudo apt-get install xinetd tftpd nfs-kernel-server minicom build-essential libncurses5-dev autoconf automake dos2unix screen lrzsz lzop u-boot-tools

Add to Dialout Group

Note

This part requires you to have administrator priviliges (sudo access).

A unique step is required for users using Ubuntu 12.04+. By default the user does not have the proper permissions to access a serial device ( ex ttyS0, ttyUSB0, etc…). A user must be apart of a “dialout” group to access these serial device without root privileges.

During this step the script will check if the current Linux user is apart of the dialout group. If not the current Linux user will automatically be added to the dialout group. The Linux user will still be required to use sudo when accessing the serial device until the user logs out and then logs back in.

Target FileSystem Installation

This step will extract the target filesystem.

Note

This part requires you to have administrator priviliges (sudo access).

The default location is: /home/user/ti-processor-sdk-linux-[platformName]-evm-<version>/targetNFS

In which directory do you want to install the target filesystem?(if this directory does not exist it will be created)
[ /home/user/ti-processor-sdk-linux-[platformName]-x.x.x.x/targetNFS ]

You can override the default location by typing in another location or by hitting <Enter> you can accept the default location. This can take a little time to untar and unzip the filesytem.

If you have run this script more than once and the filesystem already exists, you will be asked to either:

  • rename the filesystem
  • overwrite the filesystem
  • skip filesystem extraction

NFS Setup

This step will allow you to export your filesystem which was extracted in the previous step.

Note

This command requires you to have administrator priviliges (sudo access).

  • This step adds the path to root filesystem from the previous step to the file /etc/exports on your host.
  • The NFS kernel daemon is then stopped and then restarted to make sure the exported file system is recognized.

TFTP Setup

This section will setup tftp access on your host.

Note

This command requires you to have administrator priviliges (sudo access) on your host.

Which directory do you want to be your tftp root directory?(if this directory does not exist it will be created for you)
[ /tftpboot ]

The default location is /tftpboot which is off of the root directory on your linux host and requires administrator privileges. You can hit <Enter> to select the default location or type in another path to override the default. Then the following task occur:

  • A tftp config file is created for you on your host at /etc/xinetd.d/tftp
  • The tftp server is stopped and then restarted to insure the changes are picked up.

If you have run this script more than once or the filename already exists, you will be asked to select one of the following options.

  • rename the filesystem
  • overwrite the filesystem
  • skip filesystem extraction

Repeat this for any additional prompts about /tftpboot files.

Minicom Setup

This step will set up minicom (serial communication application) for SDK development.

Which serial port do you want to use with minicom?
[ /dev/ttyUSB0 ]

For most boards, the default /dev/ttyUSB0 should be selected.

  • A minicom configuration will be saved for you at /home/user/.minirc.dfl
  • The old configuration if there was one will be saved at /home/user/.minirc.dfl.old

The configuration saved to /home/user/.minirc.dfl can be changed, see the Software Development Guide for more information.

Note

If you are using a USB-to-Serial converter, your port should be configured for /dev/ttyUSBx.