| |||
| Home > Setting Up Your Target > Setting up an ARM Linux target | |||
These instructions are specific to targets running ARM Linux.
You can locate all of the files provided by DS-5 by selecting Help → ARM Extras... from the main menu.
You must have the following tools on your host to build the Linux kernel and the gator driver:
Linux kernel source code for the target platform. Streamline supports only Linux kernel versions 2.6.32 and above.
Either the cross compiler for building the Linux kernel or the ARM Linux GCC that comes with DS-5.
Streamline only supports hardware targets, not Real Time System Models (RTSMs). Streamline can run on an RTSM, but an RTSM does not provide the cycle and timing information to make the samples-generated data in the reports meaningful.
The gator daemon and driver collect target metrics and then send them to your host machine.
To enable profiling, you must load the gator daemon on your target. To do this you can either:
Locate
the pre-built .../gator/linux/gatord and copy
it to your desired directory on the host.
Build the gator daemon from the source archive:
Locate the .../gator/daemon-src/gator-daemon.tar.gz archive
and copy it to your host.
Enter the following commands in the directory in
which you copied the gator-daemon.tar.gz archive:
tar xzf gator-daemon.tar.gzcd gator-daemon make
Move the newly created gatord to
your desired directory on the host.
To prepare your kernel for use with Streamline, download the desired version of the Linux kernel, configure it to your target platform, customize it, and then build it. To do so, follow these steps.
Download your desired version of the Linux kernel. For example:
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.7.tar.bz2
Unzip the Linux kernel. For example, enter the following command:
tar xjf linux-2.6.35.7.tar.bz2
Navigate to the root source directory of the Linux kernel. For example, enter the following command:
cd linux-2.6.35.7
Enter the following command in your shell to export the cross compiler:
export CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi-
To specify that this build is for an ARM architecture, enter the following command in your shell:
export ARCH=arm
Enter the following to build the configuration file specific to your platform:
make platform_defconfig
Replace platform_defconfig in the
command with one of the configuration files located in the directory
appropriate for your platform or with a configuration file provided
by a vendor.your_kernel/arch/arm/configs
To configure menus, enter the following in your shell:
make menuconfig
You must enable certain kernel configuration options to run Streamline. The location of some of these options depends on your kernel version:
Enable the Profiling Support option.
Enable the Trace process context switches option.
Enable the High Resolution Timer Support option.
The Trace context switches and events option is not be visible if you have other Tracers configuration options enabled. Enabling other Tracers configuration options is sufficient to turn on context switches and events and run Streamline.
Use the following command to build the image:
make -j5 uImage
To use Streamline with your ARM target, you must build the
gator driver, gator.ko, and place it in the
same directory as the gator daemon, gatord,
on the target file system.
DS-5 provides a gator-driver.tar.gz source
archive. Assuming that you have unzipped the file and that you have
all of the required tools for building kernel modules, enter the
following command on your target to create the gator.ko module:
make -C kernel_build_dir M=`pwd`
ARCH=arm CROSS_COMPILE=<...> modules
When all of the necessary files are in place, you can start the gator daemon.
To run gatord:
Load the kernel onto the target
Copy gatord and gator.ko into
the file system on the target. gatord is located
in .../gator/linux/ on your host. gatord must
be placed in the same directory as gator.ko on
the target.
If you are going to capture data on a target running Android,
use the version of gatord that is located in
the android folder .../gator/android/
To ensure gatord has execute
permission, enter the following command:
chmod +x gatord
After making sure that you have root privileges, enter the following to execute the gator daemon:
./gatord &
By default, gatord uses port 8080 for
communication with the host, but you can adjust this by launching gatord with
the port number as a parameter and changing the Port option
in the Capture Options dialog box. For example:
./gatord 5050 &
To open the Capture Options dialog box, click Change capture options in the ARM Streamline Data view.