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.
How to run the setup script
The Setup Script (setup.sh) is located in the Processor SDK Linux AM69 installation directory. By default, this directory has a name that has the form ti-processor-sdk-linux-j784s4-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. Ubuntu version 22.04 is currently supported.
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-j784s4-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/ttyUSB2 ]
For the SK board, the default /dev/ttyUSB2 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.
uboot Setup
This section will create the necessary u-boot commands to boot up your board.
The script will detect your ip address and display it. You can override the detected value by entering an alternate value.
This step will set up the u-boot variables for booting the EVM.
Autodetected the following ip address of your host, correct it if necessary
[ xxx.xxx.xxx.xxx ]
Next, you will be prompted where you prefer your kernel and file system to be located.
Kernel location
TFTP - located on your Host in your designated /tftpboot directory
SD card - located in the 1st partition named “boot” of your SD card
Filesystem location
NFS - located on your Host. The location is where the file system was extracted in an earlier step.
SD card - located on the 2nd partition named “rootfs” of your SD card.
Next if you have selected TFTP, you will be prompted which uImage you want to boot using TFTP. You will be given a list of existing uImages and you can type one in from the list or hit <Enter> to select the default option. The default option will be the uImage corresponding to the SDK installation. This will be used in the next step to create the necessary u-boot options to boot up your device.
Load uboot Script
This section creates a minicom script which will be used by u-boot to provide the necessary commands to boot up in the preferred configuration as specified in previous commands. The created minicom script is stored at the file bin/setupBoard.minicom in the SDK. Use below minicom command and then power on the board to boot through the specified configuration
minicom -S bin/setupBoard.minicom