Setting Up Your Target
ARM DUI 0482K
Copyright © 2010-2012 ARM. All rights reserved.
2-7
ID120712
Non-Confidential
2.2.2
Build the gator daemon
The gator daemon and driver collect target metrics and then send them to your host machine.
Note
To build the gator daemon, you must install the Android NDK. For more information on how to
do this, visit the Android NDK site, http://developer.android.com/sdk/ndk.
To enable profiling, you must build and load the gator daemon on your target. Follow these steps
to build the gator daemon from the source archive:
1.
Move to the directory that contains the gator daemon source:
cd .../gator/daemon-src
2.
Enter the following commands to unzip the archive:
tar -xzf gator-daemon.tar.gz
Note
Make sure to untar this file in a directory in which you have write privileges.
3.
Issue the following command:
mv gator-daemon jni
4.
Issue the following command to build
gatord
:
ndk-build
Note
If ndk is not on your path, instead issue the following command:
execute /path/to/ndk/ndk-build
.
5.
The newly created gatord is located in
build_directory
/libs/armeabi
Note
You must build the gator daemon on your gcc-enabled target or a Linux host. It is not possible
to build the gator daemon on a Windows host.
2.2.3
Build the gator module
To use Streamline with your Android target, you must build the gator driver on a Linux host and
place it in the same directory as the gator daemon,
gatord
, on the target file system. Transfer the
gator driver module sources from your host to the target. They are located on your host here:
.../gator/driver-src/gator-driver.tar.gz
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
Note
To enable kernel stack unwinding you must remove the comment hashtag from the following
line in the makefile of the gator module: