1.8 Building the gator module

To get the full functionality of Streamline, you must build the gator driver, gator.ko, and place it in the target file system.

If you do not build the gator.ko driver, Streamline uses user space gator, which provides a subset of the functionality that kernel space gator provides. For more information, see README.md located in DS-5_install_directory/sw/streamline/gator/.

Note

It is not possible to build gator.ko on a Windows host.

Procedure

  1. Either download the gator.ko source from https://github.com/ARM-software/gator, or copy the source supplied in DS-5_install_directory/sw/streamline/gator/driver/.
  2. Change to the gator driver directory:
    cd driver
  3. Assuming that you have all of the required tools for building kernel modules, you can build gator.ko either by using a build command or by integrating it into the kernel build system. The build command to use depends on whether you are building on a Linux host or a target.
    Use one of the following ways to build gator.ko:
    • On a Linux host, use the following build command:
      make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-linux-gnueabihf- modules

      Note

      You must remove the comment hashtag from the following line in the makefile of the gator module to enable kernel stack unwinding:
      # EXTRA_CFLAGS += -DGATOR_KERNEL_STACK_UNWINDING
    • On a target, use the following build command:
      make -C <kernel_build_dir> M=`pwd`
    • To integrate gator.ko into the kernel build system, use the following instructions:
      cd <kernel_build_dir>
      cd drivers
      mkdir gator
      cp -r <path_to_gator_driver_src>/* gator
      Add the following line to the end of Makefile in the kernel drivers folder:
      obj-$(CONFIG_GATOR) += gator/
      Add the following line before the last endmenu in Kconfig in the kernel drivers folder:
      source "drivers/gator/Kconfig"
      This enables you to select and rebuild gator when using menuconfig to configure the kernel.
    To add support for an ARM® Mali™-based processor, you must specify some additional options when building the gator module.
Related tasks
1.5 Preparing and building your Linux kernel
1.7 Building the gator daemon
1.9 Running the gator daemon on your target
1.11 Starting a capture session
1.14 Setting up Streamline to support an ARM® Mali™-based device
11.10 Getting L2C-310 memory-mapped peripherals working with Streamline
11.11 Profiling the Linux kernel
Related reference
1.3 Streamline prerequisites
Non-ConfidentialPDF file icon PDF versionARM DUI0482U
Copyright © 2010-2015 ARM. All rights reserved.