1.1. Getting Started Guide - Processor SDK Linux Documentation PDF
1.1. Getting Started Guide - Processor SDK Linux Documentation PDF
Thanks for your interest in learning more about the Linux Software Development Kit (SDK).
The SDK as we a ectionately call it is our attempt to provide a great starting point to
develop an embedded system on a TI Processor running Linux. Given this goal, we wanted
to provide something that is more than just a typical Board Support Package (BSP)
containing a bootloader, Linux kernel, and lesystem. While these are certainly necessary
elements, we feel they are just a starting point, especially for those that aren’t experts in
developing with Linux. So, the SDK also contains tools for developing on TI Processors (a
validated cross-compiling toolchain, for example), pre-built libraries that you can use
without having to rebuild them yourself, and some documentation to help explain how all
of these pieces work together. We package all of this together with a working Linux
Embedded System that has been built with all of the things mentioned above, and it
contains a featured application called “Matrix” (derived from the fact that it is basically a
simple Graphical User’s Interface (GUI) of icon’s arranged in a “matrix”). Matrix is a fairly
simple embedded Linux system that highlights some of the key features of the TI
Processor o ering (LCD display, graphics, networking, etc.).
What it really serves as is a “known good” starting point. One of the big challenges with
starting development on a new platform (not to mention, a new Operating System (OS) for
many), is getting an environment set up where you can build and debug code on
hardware. The SDK attacks this problem with providing everything you need to do
development, and it is validated on standard TI hardware platforms (EVMs) (see here for
more details). It wraps all of this up into one simple installer that helps get everything you
need in the right place to do development. For example, you can start o with simply re-
building the Linux Embedded System that we provide to validate that everything is working
on your system. This simple step gives you con dence that you can move forward from a
good baseline.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 1/53
As you go along your development
11/13/2018
journey and have questions, there is documentation
1.1. Getting Started Guide — Processor SDK Linux Documentation
and support available to you. Make sure to save a pointer to the `Linux SDK Software
Developer’s Guide`_. If you don’t nd what you need, take a look at the active E2E
Processor Support Forum and see if the topic has been covered before. If not, post a new
thread and we’ll do our best to provide some guidance.
As described above, the SDK has a lot to it. Let’s break it down to two pieces to simplify
things a bit:
With these two pieces more clearly de ned, we can now get back to that all important
question, “What would you like to do with the SDK?”. If the answer is clearly “I want to build
something and I’m ready to start developing now!”, then go ahead and skip down to the “I
want to Develop!” (or, `Developing with the Linux SDK`_ section below for instructions on
installing the SDK on a Linux Host System. This is a somewhat involved process focusing
on the second of the two parts of the SDK listed above and may be more than some
people want to start with. However, it provides access to the full spectrum of development
from rebuilding the SDK from sources to fully adapting it with new device drivers and
applications.
Note
For K2H/K2K, K2E, and K2L platforms which are not using SD cards, please also go
ahead and skip down to the “I want to Develop!” (or, `Developing with the Linux SDK`_
section.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 2/53
So, if you’re not quite there yet,1.1.let’s
11/13/2018
discuss some other options. Maybe you’d like to
Getting Started Guide — Processor SDK Linux Documentation
evaluate the SDK a bit to see if it is how you’d like to get started.
If this is not good enough and you really want to get your hands on something, check out
the next section which shares how to play with the embedded Linux system featuring
Matrix, the rst piece of the SDK mentioned earlier. All you’ll need is access to a
Windows/Linux computer, a SD card, a SD card reader, some free, open-source software,
and a supported `Hardware Platform`_.
If you’re a hands on person, reading documentation and looking at presentations gets old
fast. So, if you want to see an example of what you can build with the SDK and actually
hold it in your hands and play with it (or show it to someone else that needs help
understanding what you want to do with it), with minimal e ort, you can simply run the
SDK Embedded Linux System with Matrix on a supported `Hardware platform`_. This will
allow you to poke and prod and interact. It’s a powerful way to get the imagination active
and engaged.
If you’ve recently purchased a TI EVM or Starterkit, it should have came with a SD card with
the SDK on it. If that is the case, simply plug the card in, boot it up, and let your
imagination run wild. However, if you’re like us and the boards you are given never have all
of the stu they came with, or if you purchased a Beaglebone or Beaglebone Black, you
might not have a SD card with the SDK on it. Or, maybe, the SDK on your SD card is simply
a few revisions old and you want the latest and greatest. If that is the case, check out the
`Creating a SD Card with Windows`_ page. Just remember, you won’t be able to build or
change anything, simply evaluate the SDK Embedded Linux System with Matrix as
delivered. But, even this is enough to get the imagination going and all some folks want to
do.
Note
The above is not applicable to K2H/K2K, K2E, and K2L platforms, which are not using SD
card.
OK, you’re all in. Either you’ve known this is what you wanted to do, or you’ve gone
through the above steps and you want to do more. It’s time to develop! Here’s a high level
overview:
Get a Linux host up and running if you don’t already have one
Install the SDK and run some scripts to get everything set up
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 3/53
11/13/2018
Put the SDK Embedded Linux System on a SD card or TFTP/NFS to play with
1.1. Getting Started Guide — Processor SDK Linux Documentation
After completing these steps, you’ll have a known good baseline from which you can start
development.
1. Con gure a Linux Host - If you already have a Linux host machine, go to Step 2.
To do Linux development with the SDK, you’ll need a host PC running Linux. The Linux
host is generally much faster and has a lot more memory (both RAM and hard disk
space) than the typical embedded system. While it is certainly possible to do all
development natively, we feel the advantages of using a host provide a better way to go
and what is supported out of the box with the SDK.
There are many, many ways to get access to a Linux host. We simply can’t validate all
possibilities and iterations, therefore we focus on validating using Ubuntu as the host
Linux distribution, running natively. We validate the Long-term Support (LTS) versions
of Ubuntu at the time of a SDK release (for example, at the time of this writing, Ubuntu
14.04 and Ubuntu 16.04 are the currently supported LTS versions).
Can you use other versions of Ubuntu or even other distributions? Theoretically, yes, as
long as you can get it to work and there may be more “assembly” required. If you can
use the Ubuntu version validated against the SDK, it will be the smoothest path and we
will be able to help you more if you do run into trouble.
Likewise, we would strongly recommend getting a native 64-bit Ubuntu LTS machine
set up for development. For the cost of a little bit of hard drive space, Ubuntu can have
direct access to the host’s hardware. Virtual Machines (VMs) have come a long way over
the years, and many people use them daily without problems. However, when you are
working with a target embedded system (that may be a prototype board), whether it be
a TI board or eventually your own, removing the complexity of a VM from the get go
can avoid a lot of frustration (i.e. wasted time). When using a VM while connecting and
disconnecting hardware components, you have to be very diligent about making sure
what is connected to what. You might prefer using an hour to get more work done than
debugging a perceived problem caused by the fact the virtual host grabbed a USB port
when you weren’t watching.
When you’re ready to proceed, Ubuntu provides a great overview for how to install
natively.
2. Install the SDK - Within your Linux host machine, `Install the Linux SDK`_
Note
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 4/53
11/13/2018
Processor SDK Installer is 1.1.
64-bit, and installs only on 64-bit host machine. Support
Getting Started Guide — Processor SDK Linux Documentation
for 32-bit host is dropped as Linaro toolchain is available only for 64-bit machines
Note
At least 20 GB of free space is required on the host machine for installing Processor
SDK Linux
3. Create a SD Card - using the `SDK Create SD Card Script`_, or One-time Program EVM
for K2H/K2K, K2E, and K2L - following directions for Program EVM User Guide
Note
You will need a >8GB SD Card and the capability to connect that card to your Linux
Host machine (using a USB SD Card reader, for example).
Note
If using a virtual machine as your Linux host, you may need to import the SD Card
reader into your virtual machine (disconnect it from the host and connect it to the
VM so that the Linux VM can see it).
Note
For K2H/K2K, K2E, and K2L platforms which are not using SD card, one-time EVM
programming is needed if u-boot has not been loaded before or the previous u-boot
is somehow corrupted. Please see details at Program EVM User Guide.
There are many ways to connect the host development platform and the target board.
These connections will vary depending on how you like to develop and what you are
trying to do. Here is an example of a common set up with a serial connection for
console and ethernet for networking (TFTP, NFS, etc.):
Note
The recommended setup is to use TFTP for booting the kernel and NFS for hosting
the target root lesystem. Since the SDK provides full cross-compile development
environment for the x86 host, this con guration will simplify the transfer of les to
and from the target platform.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 5/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
5. Use the SD Card to boot the target board properly connected for your development
environment
Note
This is not applicable to K2H/K2K, K2E, and K2L platforms. For those platforms,
power up the EVM and stop at the U-boot prompt as described in Program EVM
User Guide
6. Run the Setup Script - Once the SDK has been installed, `Run the Setup.sh Script`_ on
your host to guide you through the remaining development environment con guration.
Note
If using a virtual machine as your Linux host, you will likely need to import the target
board into the virtual machine as a mass storage device.
7. Rebuild sources using the top-level Make le in the SDK root directory. For example:
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 6/53
11/13/2018
make all rebuilds all components in the SDK
1.1. Getting Started Guide — Processor SDK Linux Documentation
The le system can be rebuilt following the instructions at `Building the SDK`_.
Note
Starting with Processor SDK 3.3, some components such as Jailhouse Hypervisor
needs a newer make (> 3.81) that what comes by default with Ubuntu 14.04.
Please check your make version (make -v) and upgrade to latest using following
instructions. You can make it your default make by pre xing /usr/local/bin to
your $PATH variable in your shell startup le; for instance, in .pro le or .bashrc if
you use the bash shell. Don’t try to install a self-compiled make (or anything else
that doesn’t come from the distribution’s package manager) into /bin or /usr/bin;
doing that will confuse your package manager.
cd /tmp
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
tar xvf make-4.1.tar.gz
cd make-4.1/
./configure
make
sudo make install
cd ..
rm -rf make-4.1.tar.gz make-4.1
Now that you have a solid baseline set up, you can choose what you’d like to do next
based on what you need to do. Here are some of the many possibilities:
Link Summary
AM335X, AM437X, AM57X, 66AK2Ex, 66AK2Gx, 66AK2Hx, 66AK2Lx Download the SDK
`Processor SDK Linux Software Developer’s Guide`_ The SDK’s Homepage, a mus
Processor SDK Linux Training: Hands on with the Linux SDK The next step in learning abo
Debugging Embedded Linux Systems Training Series This series teaches the techn
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 7/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
`Processor SDK Linux How-To Guides`_ The SDK How-To pages. The
1.1.1.1. Overview
The Linux SDK includes a script in the <SDK INSTALL DIR>/bin directory named create-
sdcard.sh. The purpose of this script is to create SD cards for the following high-level use
cases:
1. Create the SD Card using default images from the Processor SDK for Linux
2. Create the SD card using custom images
3. Create the SD card using partition tarballs (This is not common and is used most often
by board vendors)
The script will give you information about each step, but the following sections will go over
the details for the use cases above and walk you through how to use the script as well.
No matter which use case above that you are creating an SD card for the following steps
are the same. |
The create-sdcard.sh script can be run from any location but must be run with root
permissions. This usually means using the sudo command to start execution of the script.
For example:
sudo <SDK INSTALL DIR>/bin/create-sdcard.sh If you fail to execute the script without
root permissions you will receive a message that root permissions are required and the
script will exit.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 8/53
Select the Target Board [AM65x/DRA80xM
11/13/2018
Only]
1.1. Getting Started Guide — Processor SDK Linux Documentation
Due to a limitation in automatically detecting the speci c board, the script for
AM65x/DRA80xM will request this information from the user. The following options are
available:
This information is used to determine which board features are required to be enabled in
the Linux kernel. Therefore, if unsure, unknown is a valid option. The resulting SD card will
be capable of booting Linux, but minimal board support will be available.
The rst step of the script will ask you to select the drive representing the SD card that you
want to format. In most cases your host root le system drive has been masked o to
prevent damage to the host system. When prompted enter the device number
corresponding to the SD card. For example if the output looks like:
NOTE: For most common installations, this script works ne. However, if you are using
more advanced disk slicing and volume management, the presented list of device nodes
are o by one; in the best case (picking the last item) it will ag a range error, and in the
worst case (anything in the middle) the wrong DASD can be destroyed. The problem
originates when it attempts to determine the $ROOTDRIVE to “mask” the volume where “/”
is mounted from the selection list using a “grep -v $ROOTDRIVE” For the naive partitioning
case, its heuristic is ne, yielding something like “sda” — but for LVM, it grabs some chunk
of the device name, e.g. “mapp” (out of “/dev/mapper/kubuntu–vg-root on / type ...”)
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 9/53
Any partitions of the device that
11/13/2018
are already mounted will be un-mounted so that the
1.1. Getting Started Guide — Processor SDK Linux Documentation
If the SD Card already has partition you will see a prompt like the following asking you if
you would like to repartition the card. If the card was not already partitioned then this step
will be skipped and you can move on to the next step.
Options:
y - This will allow you to change the partitioning of the SD card. For example if you
have a 3 partition card and want to create a 2 partition card to give additional
storage space to the root le system you would select y here. NOTE: This operation
WILL ERASE the contents of your SD card
n - If the SD card already has the desired number of partitions then this will leave
the partitioning alone. If you select n here skip on to the Installing SD Card Content
section.
You should now see a prompt like the following which will ask you how many partitions
you want to create for the SD card.
Options:
2 - This is the most common use case and will give the most space to the root le
system.
3 - This case should only be used by board manufacturers making SD cards to go in
the box with the EVM. This requires access to the partition tarballs used for Out-Of-
Box SD cards. This option should be selected if you are going to follow the SD card
using partition tarballs steps below
After the SD card is partitioned, you will be prompted whether you want to continue
installing the le system or safely exit the script.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 10/53
11/13/2018
Options: 1.1. Getting Started Guide — Processor SDK Linux Documentation
y - Selecting yes here will begin the process of installing the SD card contents. This
operation WILL ERASE any existing data on the SD card. Refer to one of the
following sections for additional instructions depending on which use case you are
creating an SD card for
Create the SD card using default images
Create the SD card using custom images
Create the SD card using partition tarballs
n - Selecting no here will allow you to have partitioned your card but will leave the
partitions empty.
The purpose of this section is to cover how to use the create-sdcard.sh script to populate
an SD card that can be used to boot the device using the default images that ship with the
Processor SDK for Linux.
Prerequisites
################################################################################
################################################################################
You should choose option 1 to create an SD card using the pre-built images from the SDK.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 11/53
If you executed this script from1.1.
11/13/2018
within the SDK then the script can determine the SDK path
Getting Started Guide — Processor SDK Linux Documentation
automatically and will start copying the contents to the SD card. Once the les are copied
the script will exit.
If you executed the script from outside of the SDK (i.e. you copied it to some other
directory and executed it there) please see the next section.
NOTE: option 1 will only work with the format of the default SDK directory name, which
makes the Hands on with the SDK training easiest. If you have to change the directory
name, use option 2 to enter the custom le paths.
################################################################################
################################################################################
1:tisdk-server-extra-rootfs-image-k2g-evm.tar.gz
2:tisdk-server-rootfs-image-k2g-evm.tar.gz
Choose option 1 to create an SD card using the complete lesystem image from the
SDK. Option 2 provides the base lesystem image of smaller size, and it can be used
when the SD card does not have su cient space.
Enter SDK Path
In the case that the script was invoked from a directory without the SDK installation in the
path, i.e. the script was copied to your home directory and executed there, you may see a
prompt like
Enter the path to the SDK installation directory here. For example if the SDK was installed
into the home directory of the sitara user the path to enter would be /home/sitara/ti-
processor-sdk-linux-<machine>-<version>. You will be prompted to con rm the
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 12/53
installation directory. The SD card
11/13/2018
will then be created using the default images and the
1.1. Getting Started Guide — Processor SDK Linux Documentation
Often times you will use TFTP and NFS during development to transfer you kernel images
and boot your root le systems respectively. Once you are done with your development
you may want place these images onto an SD card so that they can be used stand-along
without requiring a network connection to a server.
Prerequisites
################################################################################
################################################################################
You will now be prompted to provide a path to the location of the boot partition les. The
prompt will explain the requirements of the les to be placed at the path, but the basic
options are:
1. Point to a tarball containing all of the les you want placed on the boot partition. This
would include the boot loaders and the kernel image as well as any optional les like
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 13/53
11/13/2018
uEnv.txt 1.1. Getting Started Guide — Processor SDK Linux Documentation
2. Point to a directory containing the les for the boot partition like those in the rst
option.
The script is intelligent enough to recognize whether you provided a tarball or a directory
path and will copy the les accordingly. You will be given a list of the les that are going to
be copied and given the option to change the path if the list of les is not correct.
You will now be prompted to provide a path to the location of the root le sysetm partition
les. The prompt will explain the requirements of the les to be placed at the path, but the
basic options are:
The script is intelligent enough to recognize whether you provided a tarball or a directory
path and will copy the les accordingly. You will be given a list of the les that are going to
be copied and given the option to change the path if the list of les is not correct.
This option is meant for board vendors to create SD cards to go in the box with the EVM. It
requires access to the three tarballs representing the the partitions of the SD card shipped
with the EVM.
Prerequisites
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 14/53
Point to the directory containing
11/13/2018
the following tarball les:
1.1. Getting Started Guide — Processor SDK Linux Documentation
boot_partition.tar.gz
rootfs_partition.tar.gz
start_here_partition.tar.gz
The script will show you the contents of the directory given and ask you to verify that the
tarballs are present in that directory. The SD card will then be populated with the contents
of the tarballs and be ready for inclusion in the box with the EVM.
For OMAP-L138 LCDK, boot loader needs to be updated after the SD card is created as
above. The pre-built u-boot-omapl138-lcdk.ais needs to be written to the SD card using the
dd command. /dev/sd<N> below corresponds to the SD card device listed from the host
machine.
This page details how to use an image le to create a SD Card containing the embedded
Linux system provided with the Linux SDK. This allows a user to evaluate the embedded
system on a supported hardware platform.
What is Needed
Access to a Windows PC
A valid Linux SDK image for the appropriate processor (AM335x, for example)
Software to decompress a zip le (ex. 7-zip)
Software to write an image le to a SD card
A SD card appropriate for the required hardware platform, must be 2GB or larger
A SD card reader/writer
Steps to Follow
2. On a Windows PC, you’ll need software to decompress a zip le. Windows 7 can do this
natively. If you don’t already have something that works, the open source software 7-
zip is a great choice. Since this image is created with lots of empty space, this step saves
about 700 MB of download time.
3. Use the decompression software to decompress the zipped le to an image le. Here’s
how to do it with 7-zip:
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 16/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
4. If you don’t have it already, download a program to write the image le to the SD card.
The open source Win32 Disk Imager is a good option.
5. Use the software for writing an image to disk to write the decompressed .img le to the
SD card.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 17/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
Note
You’ll likely get the below con rmation box. This command will overwrite
whatever disk you point it to, please make sure and choose the correct disk:
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 18/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
You should see the following status bar as the image is being written to the disk:
And when the write is complete, you should get a noti cation:
6. Safely eject the SD card from the computer. Here’s an example using Windows 7:
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 19/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
1. Plug it into a supported hardware platform and boot the platform from the SD card.
2. If the platform has a display (Starterkit, for example), you should see the Matrix
application from the SDK. If the hardware does not have a display, you should be able
to access Matrix remotely through a web browser if the PC and the board are on a
common network. You can also connect to the board using a terminal emulator (ex.
Tera Term) in order to view the serial console and interact with the embedded Linux
system (ex. run ifcon g to get the IP address of the target board in order to connect to
it to view remote matrix).
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 20/53
How to Get the SDK Installer
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
1. From a le downloaded from the SDK download page. This will always host the latest
version of SDK.
Note
The second way below is not applicable to K2H/K2K, K2E, and K2L platforms, which
are using SD card.
2. From the SD Card included with a TI EVM. This may not be the latest version of the SDK.
We recommend checking the above site and using the latest version if at all possible.
Before running the SDK Installer from the SD card, the SD Card from the EVM box
needs to be mounted to your Linux Host PC (using a USB SD Card reader). The SDK
Installer is found in the START_HERE partition of the SD card.
Make sure that the execute permissions are set. Bring up a terminal window and change
directories to the where the installer is located (probably the Downloads directory if
downloaded or the START_HERE partition mounted from the SD Card) and run the
following commands:
chmod +x ./ti-processor-sdk-linux-[platformName]-evm-xx.xx.xx.xx-Linux-x86-Install.bin
./ti-processor-sdk-linux-[platformName]-evm-xx.xx.xx.xx-Linux-x86-Install.bin |
Alternatively, you can give execute permissions and run the SDK Installer by double
clicking on it within your Linux host PC.
Note
If nothing seems to happen, you are probably running a 32-bit version of Linux. The
installer is 64-bit, and will not execute properly.
Invoking the installer with argument –help will list available options for the installer (e.g.
text installer, etc.):
./ti-processor-sdk-linux-[platformName]-evm-xx.xx.xx.xx-Linux-x86-Install.bin –help |
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 21/53
SDK Installer Execution Steps 1.1. Getting Started Guide — Processor SDK Linux Documentation
11/13/2018
1. Con rm User is to con rm if loading the Processor SDK is ok. This is important to note
if the user is trying to over-install on an existing directory and has made changes to the
directory.
2. Directory Install Location The user will be prompted for a location on where to put the
Processor SDK. An example is given below.
3. Installation of software The software is installed.
The default selection of where to install is the user’s home directory. In this particular
example the name of the user is ‘sitara’.
1.1.4.1. Overview
This release provides the images for the factory to program on the eeprom, nand and nor
for EVMK2H, EVM2E, and EVMK2L. The mechanism only applies to the devices with DSP
core, and won’t work for devices without DSP, such as AM5K2E02 and AM5K2E04 devices.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 22/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
The les used for programming the EVMs are provided under bin\program_evm\binaries\
[evmk2h, evmk2e, evmk2l].
For EVMK2H:
cd bin/program_evm/binaries/evmk2h/
ln -sv ../../../../board-support/prebuilt-images/u-boot-spi-k2hk-evm.gph nor.bin
ln -sv ../../../../filesystem/tisdk-server-rootfs-image-k2hk-evm.ubi nand.bin
For EVMK2E:
cd bin/program_evm/binaries/evmk2e/
ln -sv ../../../../board-support/prebuilt-images/u-boot-spi-k2e-evm.gph nor.bin
ln -sv ../../../../filesystem/tisdk-server-rootfs-image-k2e-evm.ubi nand.bin
For EVMK2L:
cd bin/program_evm/binaries/evmk2l/
ln -sv ../../../../board-support/prebuilt-images/u-boot-spi-k2l-evm.gph nor.bin
ln -sv ../../../../filesystem/tisdk-server-rootfs-image-k2l-evm.ubi nand.bin
nor.bin SPI NOR le for U-Boot (symbolic link to u-boot-spi-[k2hk, k2e, k2l]-evm
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 23/53
Then, modify nor_writer_input.txt
11/13/2018
and nand_writer_input.txt to update the le name.
1.1. Getting Started Guide — Processor SDK Linux Documentation
nor_writer_input.txt:
file_name = nor.bin
nand_writer_input.txt:
file_name = nand.bin
Please use the md5sum utility from the following link: http://www.pc-
tools.net/ les/win32/freeware/md5sums-1.2.zip
The program_evm (top-level) directory is intended to hold the *DSS* script for the Code
Composer Studio which programs the default images to NAND/NOR/EEPROM.
The binaries/evmxxx directory is intended to hold all the factory default images and the
respective writers.
The con gs/evmxxx directory is intended to hold the “CCS target con guration les”.
Use evmxxx-linuxhost.ccxml for linux.
The gel directory holds custom GEL les for the board. It also contains a README.txt for
the gel le usage.
The logs directory is empty and will be used to store logs. Logs are automatically
generated when using program_evm.js to ash evmxxx devices.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 24/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
├───program_evm
│ │ program_evm.js
│ │
│ ├───binaries
│ │ └───evmxxx
│ │ eepromwriter_evmxxx.out
│ │ eepromwriter_input.txt
│ │ eepromwriter_input50.txt
│ │ eepromwriter_input51.txt
│ │ nand.bin (symbolic link created as above)
│ │ nandwriter_evmxxx.out
│ │ nand_writer_input.txt
│ │ nor.bin (symbolic link created as above)
│ │ norwriter_evmxxx.out
│ │ nor_writer_input.txt
│ ├───configs
│ │ └───evmxxx
│ │ evmxxx.ccxml
│ │ evmxxx-linuxhost.ccxml
│ ├───gel
│ │ xtcievmk2x.gel
│ │ evmk2e.gel
│ │ tcievmk2l.gel
│ │ README.txt
│ └───logs (empty directory)
This section assumes you have installed Processor SDK 02.00.01 and above (which
supports EVMK2H/EVMK2L/EVMK2E) and Code Composer Studio.
First, start CCS on linux host machine and con gure the target con guration for the EVM
(e.g., bin/program_evm/con gs/evmk2h/evmk2h-linuxhost.ccxml). Then, launch the target
con guration, and verify the connection to the ARM and DSP through JTAG.
After the CCS connection is veri ed, disconnect the target connection, exit CCS and
continue to Set the Environment Variables.
Note
Please note that this section is needed only the CCS connection cannot be established
successfully.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 25/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
When USB3 ports are used for the JTAG, the following error can be reported when testing
the connection to the target.
...
This utility has selected a 560/2xx-class product.
This utility will load the program 'xds2xxu.out'.
E_RPCENV_IO_ERROR(-6) No connection
Failed to open i/o connection (xds2xxu:0)
...
When this happens, it is required to update the rmware on the xd200 pod. This can be
done on a PC which is able to communicate to the xd200 pod, and has CCS and the latest
TI emulators package installed. Example:
cd ccsv6/ccs_base/common/uscif/xds2xx
xds2xx_conf.exe update xds2xxu 0 xds200_firmware_v1006.bin
xds2xx_conf.exe boot xds2xxu 0
For EVMK2H
Due to hardware NAND issue, EVM of certain revisions need to use alternative
programming method:
For Rev 2.0 and 3.0 EVM using alternative U-Boot command to program NAND, please
follow the steps below: Set the boot mode to SPI boot mode: Set_SPI_boot
For Rev 1.0 EVM, make sure the EVM dip switches are set for no-boot mode and continue.
SW1 O O O On
See instruction here for K2H no boot mode for reference K2H_Noboot
For EVMK2E
Make sure the EVM dip switches are kept as below to put the board in no-boot mode, and
continue.
SW1 On On On On
See instruction here for K2E no boot mode for reference: K2E_NoBoot
For EVMK2L
Make sure the EVM dip switches are kept as below, and continue.
SW1 On On On On
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 27/53
See instructions here for K2L no
11/13/2018
boot mode for reference: K2L_NoBoot
1.1. Getting Started Guide — Processor SDK Linux Documentation
Please make sure the below environment variables needs to be set. Otherwise there could
be some unexpected behavior experienced.
export DSS_SCRIPT_DIR=~/ti/ccsv6/ccs_base/scripting/bin
export PROGRAM_EVM_TARGET_CONFIG_FILE=configs/evmk2h/evmk2h-linuxhost.ccxml
Script Usage:
cd bin/program_evm
$DSS_SCRIPT_DIR/dss.sh program_evm.js evm(k2h|k2e|k2l)[-le] (nor|nand)
k2h:TCI6638 device
k2e:C66AK2E device
k2l:TCI6630 device
-le (optional): Little Endian (default)
-be (optional): Big Endian
(nor|nand): choose from nor or nand
Note
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 28/53
Sometimes, NAND ash could
11/13/2018
be corrupted (e.g. EVM boots from UBI and does not
1.1. Getting Started Guide — Processor SDK Linux Documentation
gracefully shut down), NAND ash needs to be formatted before loading the program
using program_evm utility.
cd bin/program_evm
$DSS_SCRIPT_DIR/dss.sh program_evm.js evm(k2h|k2e|k2l)-le format-nand
Warning
Please note that this would erase all the nand blocks.
1. cd “bin/program_evm” directory
2. Set the necessary environment variables as described under Set the Environment
Variable.
3. Run the “program_evm.js” script command from program_evm directory.
Example:
cd bin/program_evm
$DSS_SCRIPT_DIR/dss.sh program_evm.js evmk2h-le nor
This will write all the little endian images to K2H EVM.
Note
The loading of nand.bin can take up to a few minutes depending on the image size.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 29/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
bin/program_evm$ $DSS_SCRIPT_DIR/dss.sh program_evm.js evmk2h nor
board: evmk2h
endian: Little
emulation: XDS2xx emulator
binaries: /home/user/ti-processor-sdk-linux-k2hk-evm-02.00.01.07/bin/program_evm/binaries/evmk2h/
ccxml: configs/evmk2h/evmk2h-linuxhost.ccxml
C66xx_0: GEL Output:
Connecting Target...
C66xx_0: GEL Output: PLL has been configured (CLKIN * PLLM / PLLD / PLLOD = PLLOUT):
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 30/53
C66xx_0: GEL Output: PLL has been1.1.
11/13/2018 configured (122.88
Getting Started Guide —MHz * 16 SDK
Processor / 1 Linux
/ 2 Documentation
= 983.04 MHz)
C66xx_0: GEL Output: Power on all PSC modules and DSP domains...
C66xx_0: GEL Output: Power on all PSC modules and DSP domains... Done.
C66xx_0: GEL Output: DDR3 PLL Setup complete, DDR3A clock now running at 666 MHz.
C66xx_0: GEL Output: DDR3 PLL Setup complete, DDR3B clock now running at 800MHz.
Writer:/home/user/ti-processor-sdk-linux-k2hk-evm-
02.00.01.07/bin/program_evm/binaries/evmk2h/norwriter_evmk2h.out
NOR:/home/user/ti-processor-sdk-linux-k2hk-evm-02.00.01.07/bin/program_evm/binaries/evmk2h/nor.bin
Note
For EVMs without Security Accelerator components, PSC errors will show up due to a
known issue in GEL le. The PSC errors can be ignored and are not fatal. The program
EVM will proceed and complete successfully.
This section describes how to program the bin les to either NOR or NAND on the devices
without DSP core (AM5K2E02 and AM5K2E04). The installation of Processor SDK and Code
Composer Studio is required.
Eable the TFTP server service on the Linux host machine, and copy u-boot-{platform].gph
and isdk-server-rootfs-image-{platform].ubi from ProSDK installed directory to the tftp
server directory. The les are located in board-support/prebuilt-images and lesystem
directory respectively.
Have the Ethernet connection between the EVM and TFTP Server.
Follow the instruction in previous section to set the dip switch of the EVM in no-boot mode
Interrupt the boot process when running u-boot using CCS. In the u-boot prompt console,
con gure the u-boot environment variables for TFTP download
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 32/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
# setenv serverip <TFTP_SERVER_IP>
# setenv tftp_root <TFTP_SERVER_DOWNLOAD_DIR>
# run get_uboot_net
# run burn_uboot_spi
# run get_ubi_net
# run burn_ubi
Note
When programming UBI image to NAND, be sure the UBI image size is enough to t in
NAND memory.
# env default -f -a
# saveenv
Veri cation
Connect the RS232 Serial cable provided in the box to the serial port of the Host PC. If Host
is running Windows OS, start tera term and con gure the serial port settings as follows.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 33/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
SW1 O O On O
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 34/53
Verifying NAND
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
For EVMK2H, EVMK2E & EVMK2L it is necessary to reformat the NAND Flash prior to
burning the image. Example command to do this:
After entering the command, burn the NAND and perform the steps below to verify.
SW1 O O On O
env default –f –a
setenv boot ubi
boot
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 35/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
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:
Veri cation 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
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 36/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
To run the SDK’s setup scripts the following cables are required to be connected to the
BeagleBone Black and your Linux PC. Please ensure both are connected before following
any of the steps in this guide.
The BeagleBone Black includes an eMMC device on it which comes pre- ashed with an
Angstrom distribution. Because eMMC is the default boot mode for this board we need to
prevent it from being able to boot by either removing or renaming the MLO.
To do this you will need to wipe out the MLO le stored in the eMMC.
To eliminate the MLO rst boot up the board with the USB mini cable connected to the
board and your PC. Once the Angstrom kernel loads your host will mount the eMMC boot
partition on your Linux host under /media/BEAGLEBONE. You can then erase or rename
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 37/53
the MLO le here. You can also1.1.
11/13/2018
login to the BeagleBone Black and rename or remove
Getting Started Guide — Processor SDK Linux Documentation
Once the above steps are completed you can follow the remaining steps on this guide to
execute the setup script.
For K2H/K2K, K2L, and K2E platforms, if u-boot has not been loaded before or the previous
u-boot is somehow corrupted, please rst program the EVMs following the instructions at
Program EVM User Guide. After that, continue to follow the sections below to use the
setup scripts.
The Setup Script is located in the Processor SDK installation directory. By default, this
directory has a name that has the form ti-processor-sdk-linux-<Hardware-Platform>-
<Version>. Change to that ti-processor-sdk-linux install directory. Then run the script:
./setup.sh
Note
The Setup Script will rst 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
di erent 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.
The following sections describe in more detail how to run the script and what is doing.
This section will check to make sure you have the proper host support packages to allow
you do the following tasks:
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 38/53
11/13/2018
telnet 1.1. Getting Started Guide — Processor SDK Linux Documentation
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 di erent releases:
Note
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.
Note
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 39/53
The default locations is: /home/user/ti-processor-sdk-linux-[platformName]-evm-
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
x.x.x.x/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]-evm-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
lesytem.
If you have run this script more than once and the lesystem already exists, you will be
asked to either:
NFS Setup
This step will allow you to export your lesystem which was extracted in the previous step.
Note
This step adds the path to root lesystem from the previous step to the le /etc/exports
on your host.
The NFS kernel daemon is then stopped and then restarted to make sure the exported
le system is recognized.
TFTP Setup
Note
This command requires you to have administrator priviliges (sudo access) on your host.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 40/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
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 o 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:
If you have run this script more than once or the lename already exists, you will be asked
to select one of the following options.
Minicom Setup
This step will set up minicom (serial communication application) for SDK development.
For most boards, the default /dev/ttyUSB0 should be selected. For Beaglebone which has a
USB-to-Serial converter, just hit enter and the proper serial port will be setup in a later
step.
The con guration saved to /home/user/.minirc.d can be changed, see the Software
Development Guide for more information.
Note
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 41/53
If you are using a USB-to-Serial
11/13/2018
converter, your port should be con gured for
1.1. Getting Started Guide — Processor SDK Linux Documentation
/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 le 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 le system was extracted in an
earlier step.
SD card - located on the 2nd partition named “rootfs” of your SD card.
Note
The option of “SD card” is not applicable to K2H/K2K, K2E, and K2L platforms.
Therefore, please use TFTP/NFS for those keystone2 platforms.
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 uImage’s 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.
This section creates a minicom script or a uEnv.txt le which will be used by u-boot to
provide the necessary commands to boot up in the preferred con guration.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 42/53
11/13/2018
For boards with straight serial connectors and K2H/K2K, K2E, and K2L platforms, a
1.1. Getting Started Guide — Processor SDK Linux Documentation
Note
For devices which create a uEnv.txt, the device must already be booted up with the
USB-to-Serial connector attached to the Host. Further the Host must recognize the boot
and START_HERE partitions.
Inside of the Processor Linux SDK there is a top-level Make le that can be used to build
some of the sub-components found within the SDK. This Make le uses the Rules.make le
and gives an example of how the various components can be built and the parameters to
use.
NOTE: You should not call this make le with the environment-setup script sourced. The
sub-component Make les will handle sourcing this script where appropriate, but some
make targets such as the Linux kernel make target do not work properly when this script is
already sourced.
Rules.make
The following sections cover the Rules.make le found in the top-level of the Processor
Linux SDK.
Purpose
The Rules.make le in the top-level of the Processor Linux SDK is used not only by the top-
level Make le, but also by many of the sub-component Make les to gain access to
common shared variables and settings. The next section covers the main variables de ned
in the Rules.make le.
Variables De ned
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 43/53
11/13/2018
PLATFORM - This represents the machine name of the device supported by the SDK.
1.1. Getting Started Guide — Processor SDK Linux Documentation
This machine name has a direct correlation to the machine de nition in the Arago
project build system. The PLATFORM variable can be used by component Make les to
make decisions on a per-machine basis.
ARCH - This represents the architecture family of the machine. This can be used by
component Make les to change settings such as mtune values in CFLAGS based on the
architecture of the PLATFORM.
UBOOT_MACHINE - This us used when building u-boot to con gure the u-boot sources
for the correct device.
TI_SDK_PATH - This points to the top-level of the SDK. This is the same directory where
the Rules.make le itself is located.
DESTDIR - This points to the base installation directory that applications/drivers should
be installed to. This is usually the root of a target le system but can be changed to
point anywhere. By default the initial value is a unique key value of __DESTDIR__ which
is replaced with the location of the target NFS le system when the setup.sh script is
run.
LINUX_DEVKIT_PATH - This points to the linux-devkit directory. This directory is the
base directory containing the cross-compiler and cross-libraries as well as the
environment-setup script used by many component Make les to source additional
variable settings.
CROSS_COMPILE - This setting represents the CROSS_COMPILE pre x to be used when
invoking the cross-compiler. Many components such as the Linux kernel use the
variable CROSS_COMPILE to prepend the proper pre x to commands such as gcc to
invoke the ARM cross-compiler.
ENV_SETUP - This points to the environment-setup script in the linux-devkit directory
used by many components to con gure for a cross-compilation build.
LINUXKERNEL_INSTALL_DIR - This points to the location of the Linux kernel sources,
which is used by components such as out-of-tree kernel drivers to nd the Linux kernel
Make les and headers.
Make le
The following sections cover the Make le found in the top-level of the Processor Linux SDK
Target Types
For each of the targets discussed below the following target type are de ned
<target> - This is the build target which will compile the release version of the
component
<target>_install - This target will install the component to the location pointed to by
DESTDIR
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 44/53
11/13/2018
<target>_clean - This target1.1.
will clean the component
Getting Started Guide — Processor SDK Linux Documentation
Top-Level Targets
The Processor Linux SDK provides the following targets by default which will invoke the
corresponding component targets:
all - This will call the build target for each component de ned in the Make le
install - This will call the install target for each component de ned in the Make le
clean - This will call the clean target for each component de ned in the Make le
Common Targets
The following targets are common to all platforms in Processor Linux SDK:
Additional Targets
Depending on the capabilities and software available for a given device additional targets
may also be de ned. You can nd the list of all the targets by looking at the all target as
described in the **Top-Level Targets** section above. Add devices will have one or the
other of the following targets depending on the u-boot version used:
u-boot-spl - This target will build both u-boot and the u-boot SPL (MLO) binaries used in
newer versions of u-boot. This actually provides a u-boot and u-boot-spl target in the
Make le.
u-boot-legacy - This target will build the u-boot binary for older versions of u-boot
which do not support the SPL build.
wireless - A wireless top-level build target that can be used to rebuild the wireless
drivers against the kernel sources in the board-support directory.
Usage Examples
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 45/53
The following examples demonstrate
11/13/2018
how to use the top-level Make le for some common
1.1. Getting Started Guide — Processor SDK Linux Documentation
tasks. All of the examples below assume that you are calling the Make le from the top-
level of the SDK.
Build Everything
host# make
Clean Everything
Install Everything
Some drivers like the SGX drivers are delivered as modules outside of the kernel tree. If
you rebuild the kernel and install it using the “make linux_install” target you will also need
to rebuild the out of tree modules and install them as well. The modules_install command
used by the linux_install target will remove any existing drivers before installing the new
ones. This means those drivers are no longer available until they have been rebuilt against
the kernel and re-installed.
To simplify and accelerate rebuilding and installing the linux kernel, the le .scmversion is
included in the kernel source tree to pin down the version of the kernel provided in the
SDK. If upgrading the kernel sources or adding new commits, this le should be removed
so that the appropriate version is built into the kernel image.
The Processor SDK for Linux contains a Linaro based toolchain for Cortex A devices. The
Linaro toolchain also enables hardware oating point (hardfp) support. Older toolchains
including arm-arago-linux-gnueabi- uses software oating point (softfp). This results in
software built using a hardfp toolchain being incompatible with software built with a softfp
toolchain.
Linaro Toolchain
The Processor SDK for Linux uses a Linaro based tool chain. Other than using a newer
version of GCC the Linaro tool chain also supports hard oating point also known as Hard-
FP. Hard-FP uses the FPU on the ARM instead of simulating it. Older tool chains including
the Arago tool chain uses soft oating point (Soft-FP). Binaries built using a soft-fp tool
chain are not compatible with binaries built using a hard-fp. Therefore, you must rebuild
all binaries to use either hard-fp and soft-fp since you can’t mix and match. By default all
binaries included in the Processor SDK for Linux will be built for hard-fp.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 47/53
The name of the toolchain binaries
11/13/2018
have also been updated from older versions of the
1.1. Getting Started Guide — Processor SDK Linux Documentation
Linux-Devkit Structure
Element Location
Location in SDK
The toolchain is located in the Linux SDK in the <SDK INSTALL DIR>/linux-devkit directory.
The following sections will cover the key components of the toolchain.
Cross-Compilers/Tools
The cross-compilers and tools such as qmake2 can be found the the <SDK INSTALL
DIR>/linux-devkit/bin directory. Adding this directory to your PATH will allow using these
tools. For example:
The cross-compile tools are pre xed with the arm-linux-gnueabihf- pre x. i.e. the GCC
cross compiler is called arm-linux-gnueabihf-gcc. Additional tools are also located here
such as the qmake2, rcc, uic tools used by Qt. In addition there is a qt.conf le that can be
used by tools such as Qt creator to use the pre-built libraries found in the Linux SDK.
Cross-Compiled Libraries
The toolchain within the Linux SDK contains more than just the cross-compiler, it also
contains pre-built libraries that can be used in your applications without requiring you to
cross-compile them yourself. These libraries include packages from alsa to zlib. The
libraries are located in the <SDK INSTALL DIR>/linux-devkit/sysroots/<device speci c
string>-vfp-neon-linux-gnueabi/ directory. For a list of the libraries you can refer to the
software manifest found in the <SDK INSTALL DIR>/docs directory or look at the list of
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 48/53
libraries available in the <SDK INSTALL
11/13/2018
DIR>/linux-devkit/sysroots/<device speci c
1.1. Getting Started Guide — Processor SDK Linux Documentation
environment-setup script
When cross-compiling packages that use con guration tools and autotools there are many
settings that are required to make sure that the proper cross-compile libraries are used.
The environment-setup script located in the <SDK INSTALL DIR>/linux-devkit directory
handles this for you. This script exports variables to perform actions such as:
To use the environment-setup script you only need to source it. This is as simple as:
To know if the environment setup script has been sourced in your current shell the shell
prompt will be changed to contain the [linux-devkit]: pre x in the command prompt.
The Usage section below will cover some cases where using the environment-setup script
is useful.
Because environment-setup changes standard variables such as CC you should not use
this script when compiler projects that build host-side as well as target-side tools. A prime
example of this is the Linux kernel, which builds some host side tools to help during the
kernel build. If the environment-setup script has been sourced then the CC value will
specify the cross-compiler for the host-side tool build. This means that the tools compiled
and used during the kernel build will be compiled for the ARM platform while the kernel
build tries to run these tools on an Intel platform. This will cause the tools to fail to run and
the kernel to fail to compile.
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 49/53
Usage
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
The following sections give some examples of how to use the included toolchain to
compile simple applications such as HelloWorld to more complex examples such as
con guring and compiler GStreamer plugins.
Simple Cross-Compile
In the simplest case the cross-compiler can be used to compile simple applications that
just need access to standard libraries. The two examples below cover an application that
uses only the standard libgcc libraries and another example that uses the pthreads
threading library.
HelloWorld
Simple applications like HelloWorld can be compiled using just a call to the cross-compiler
since the cross-compiler can nd the libraries it was built with without any issues. The
following steps will show how to make a simple helloworld application and cross-compile
that application.
Create a helloworld.c le |
#include <stdio.h>
int main() {
printf ("Hello World from TI!!!\n");
return 0;
}
After the above steps are run you should now have a helloworld executable in your
directory that has been compiled for the ARM. A simple way to check this is to run the
following command:
host# le helloworld
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 50/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
“helloworld: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses
shared libs), for GNU/Linux 2.6.31, not stripped”
Note
Using PThreads
In many cases your simple application probably wants to use additional libraries than the
standard libgcc and glibc libraries. In this case you will need to include the header les for
those libraries as well as add the library to the compile line. In this example we will look at
how to build a simple threading application and use the pthread library. This example was
derived from the example code at **http://www.amparo.net/ce155/thread-ex.html**
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 51/53
11/13/2018 1.1. Getting Started Guide — Processor SDK Linux Documentation
#include <unistd.h>;
#include <sys/types.h>;
#include <errno.h>;
#include <stdio.h>;
#include <stdlib.h>;
#include <pthread.h>;
#include <string.h>;
data1.thread_no = 1;
strcpy(data1.message, "Hello!");
data2.thread_no = 2;
strcpy(data2.message, "Hi!");
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
exit(0);
}
/* do the work */
printf("Thread %d says%s \n", data->thread_no, data->message);
return 0;
}
Note
Con gure/Autotools
The last case to cover is one where the environment-setup script is useful. In this case we
will download the gst-plugins-bad package and con gure and build it using the
environment-setup script to con gure the system for the autotools to properly detect the
libraries available as pre-built libraries.
IMPORTANT In order to build the gst-plugins-bad package you will need libglib2.0-
dev installed on your system. You can install this using sudo apt-get install
libglib2.0-dev
http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Overview_Getting_Started_Guide.html#windows-sd-card-creation-guide 53/53