User Guide

  • 2020
  • 06/18/2020
  • Public Content
Contents

Build and Install Sampling Drivers for Android* Targets

On some versions of Android systems, including most of the Intel® supplied reference builds for SDVs, the required drivers are pre-installed in
/lib/modules
or
/system/lib/modules
. If the drivers are not pre-installed in any of these directories, you need to build them manually from the command line. Optionally, you can get the drivers integrated into the Android build so that they are built and installed when the operating system is built.
Android requires signed drivers. Every time the Android kernel is built, a random private/public key is generated. Drivers must be signed with the random private key to be loaded. The drivers (
socperf2_x.ko
,
pax.ko
,
sep4_x.ko
, and
vtsspp.ko
) must be signed with the same key and be compiled against the same kernel headers/sources as what is installed on the Android target system.
VTune
Profiler
has options for building a new driver on the Linux host system and installing it on a target Android system. This is not the default and will only work if you provide the proper kernel headers/sources and a signing key. For example, the
VTune
Profiler
uses the
--with-drivers
option for building PMU drivers and
--kernel-src-dir
option for providing the configured kernel headers/sources tree path.
To build the sampling drivers on the host Linux system, enter:
<>/bin{32,64}/
vtune
-androidreg.sh --package-command=build --with-drivers --kernel-src-dir=/
path
/
to
/
configured
/
kernel
/
sources
[--jitvtuneinfo=jit|src|dex|none]
To install the sampling drivers from the Linux host, enter:
<>/bin{32,64}/
vtune
-androidreg.sh --package-command=install --with-drivers --kernel-src-dir=/
path
/
to
/
configured
/
kernel
/
sources
[--jitvtuneinfo=jit|src|dex|none]
To sign the drivers after the drivers are built:
Typically the
VTune
Profiler
automatically signs drivers if kernel sources with the keys are available when it builds the drivers. Otherwise, to manually sign the drivers, use the following command:
$KERNEL_SRC/source/scripts/sign-file CONFIG_MODULE_SIG_HASH $KERNEL_SRC/signing_key.priv $KERNEL_SRC/signing_key.x509 driver.ko
where the
CONFIG_MODULE_SIG_HASH
value is extracted from the
$KERNEL_SRC/.config
file.
You need the "exact" signing key that was produced at the time and on the system where your kernel was built for your target.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804