1. XCAP Application Note — Installation: nVidia/ARM TK1/Cortex-A15 — 8 March 2019
This application note outlines the installation of XCAP on the nVidia TK1 with ARM Cortex-A15 processor running Linux. Changes to the TK1 and its Linux can be expected; this application note was written for use with TK1 and Linux released circa January 2017 (Linux for Tegra r21.5).
1. Update Linux. If needed, update Linux for nVidia TK1 to release r21.5 This requires a second computer running Linux connected to the TK1 via USB cable; follow instructions provided by nVidia.
2. Install JRE. Unlike XCAP for x86 and x86−64 platforms, XCAP for nVidia TK1 does not include a Java Runtime Environment. Install the default Java JRE from the Linux distribution:
apt-get update apt-get -y install default-jre
3. Install XCAP. XCAP for TK1 is not provided on the PIXCI(R) CD, and only available via download. Download xcaplnx_armv7l.bin from www.epixinc.com/support/files.php. Do:
chmod 755 xcaplnx_armv7l.bin ./xcaplnx_armv7l.bin
Note that only XCAP-Lite is supported for the nVidia TK1 - intended as a testing and configuration tool to assist in for developing application programs using the XCLIB C/C++ library. XCAP-Ltd and XCAP-Std are currently not supported for the nVidia TK1.
Some versions of the JRE do not accept a ‘-client’ option. It may be necessary to edit /usr/local/xcap/xcaplnx and /usr/local/xcap/program/xcaplnx and remove the ‘-client’ option.
Problems have been reported with OpenJDK V1.6, causing XCAP to crash. Use a different version of Java.
Problems have been reported with OpenJDK V1.7, resulting in:
Internal Error (os_linux_zero.cpp:285) fatal error: caught unhandled signal 11
Adding the ‘-jamvm’ option has been suggested by the Java community to remedy the problem; edit /usr/local/xcap/xcaplnx and /usr/local/xcap/program/xcaplnx and add the ‘-jamvm’ option (after the ‘java’ command). Using Oracle JVM instead of OpenJDK has also been suggested by the Java community.
4. Install PIXCI(R) driver. One or more precompiled PIXCI(R) drivers are provided with XCAP. If one of these drivers match the current kernel, use XCAP’s:
PIXCI(R) PIXCI(R) Open/Close Close (if open) Driver Assistant Install PIXCI(R) Driver Install Precompiled Driver Apply
Alternately, the PIXCI(R) driver can be compiled so as to match the current kernel. Install the kernel build modules:
apt-get update apt-get -y install build-essential apt-get -y install module-assistant cd /usr/src/linux-headers-$(uname -r) make modules_prepare
where ‘$(uname -r)’ is replaced with the current kernel version. Use XCAP’s:
PIXCI(R) PIXCI(R) Open/Close Close (if open) Driver Assistant Install PIXCI(R) Driver Compile & Install Driver Apply
5. Configure TK1 memory. Unlike Linux for x86 and x86−64 systems providing a single, large, pool of memory, the Linux for TK1 partitions memory into various pools each with a designated purpose. The PIXCI(R) driver allocates frame buffer memory from the kernel’s ‘coherent-pool’ (i.e. DMA pool). The default TK1 coherent-pool is 256 KB and allows, approximately, 128 KB of frame buffer memory. Edit /boot/extlinux/extlinux.conf and add, for example:
vmalloc=512M cma=64M coherent_pool=32M
to the kernel command line so as to allow additional frame buffer memory. Note: The long kernel command line may be displayed by the editor as split into several lines; but it must be edited as a single line without line break. (Use ‘cat /proc/cmdline’ to verify the current kernel command line).
There are many considerations in selecting these and other boot parameters for the nVidia TK1; this application note is not intended as a treatise on the subject.
The amount of frame buffer memory available for image capture is also determined by the amount of memory requested by the PIXCI(R) driver. This is set in the same manner as for x86 or x86−64 systems; typically using XCAP:
PIXCI(R) PIXCI(R) Open/Close Close (if open) Driver Assistant Set Frame Buffer Memory Size ...
XCAP’s ‘Forceful Memory Allocation’ option, used with the memory architecture of x86 and x86−64 systems, is not applicable to the TK1.
6. Reboot TK1.
7. Configure memory clock speed. The TK1 memory clock speed can be adjusted. Lower speed presumably consumes lower power, but provides lower bandwidth for video capture. Higher speed presumably consumes more power, but provides higher bandwidth for video capture, and thus a potential remedy for ‘PCI FIFO Overflow’ error. See the
command and http://elinux.org/Jetson/Performance.
While this application note makes note of this Jetson feature, its impact on PCIe bandwidth has not been confirmed.
8. If using the XCLIB or XCLIB+PXIPL C/C++ library, download: xclib_armv7l.bin or xclip_armv7l.bin from www.epixinc.com/support/files.php. Install with:
chmod 755 xclib_armv7l.bin ./xclib_armv7l.bin
chmod 755 xclip_armv7l.bin ./xclip_armv7l.bin