1.  XCAP Application Note — Installation: nVidia/ARM TX2/Cortex-A57 — 1 May 2018

This application note outlines the installation of XCAP on the nVidia TX2 with ARM Cortex-A57 processor running Linux. Changes to the TX2 and its Linux can be expected; this application note was written with the TX2 and Linux released circa April 2017 (Linux for Tegra r27.1).

1. Update Linux. The original release of Linux for nVidia TX2 is Tegra r27.0.1 . XCAP software was tested on Tegra r17.1. Updating Tegra requires a second computer running Linux connected to the TX2 via USB cable; follow instructions provided by nVidia.

2. Install JRE. Unlike XCAP for x86 and x86−64 platforms, XCAP for nVidia TX2 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 TX2 is not provided on the PIXCI(R) CD, and only available via download. Download xcaplnx_aarch64.bin from www.epixinc.com/support/files.php. Do:

    chmod 755 xcaplnx_aarch64.bin
    ./xcaplnx_aarch64.bin

Note that only XCAP-Lite is supported for the nVidia TX2 - 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 TX2.

Newer versions of the JRE do not accept a ‘-client’ option. With releases of XCAP prior to Jan 2017, it may be necessary to edit /usr/local/xcap/xcaplnx and /usr/local/xcap/program/xcaplnx and remove the ‘-client’ option.

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. Unfortunately, Tegra r27.1 is not configured for native compilation of the kernel, but for cross-compilation. Instructions for cross-compilation of the kernel are beyond the remit of this application note. Instead, we suggest following third party suggestions for native compilation, such as the article ‘Build Kernel and Modules - NVIDIA Jetson TX2’ at ‘www.jetsonhacks.com’.

After kernel build files are installed and tweaked for native compilation, use XCAP’s:

    PIXCI(R)
    PIXCI(R) Open/Close
    Close (if open)
    Driver Assistant
    Install PIXCI(R) Driver
    Compile & Install Driver
    Apply

5. Configure TX2 memory. Unlike Linux for x86 and x86−64 systems providing a single, large, pool of memory, the Linux for TX2 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 TX2 coherent-pool is 1024 KB and allows, approximately, 512 KB of frame buffer memory. Edit /boot/extlinux/extlinux.conf and add, for example:

    vmalloc=256M cma=128M coherent-pool=96M

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.

There are many considerations in selecting these and other boot parameters for the nVidia TX1/TX2; 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 TX2.

6. Reboot TX2.

7. Configure memory clock speed. The TX2 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

    jetson_clocks.sh

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_aarch64.bin or xclip_aarch64.bin from www.epixinc.com/support/files.php. Install with:

    chmod 755 xclib_aarch64.bin
    ./xclib_aarch64.bin

or

    chmod 755 xclip_aarch64.bin
    ./xclip_aarch64.bin

Note: The kernel module build process uses a utility supplied by nVidia, fixdep. For the Tegra r28.2, distribution, it is an x86 executable file, not ARM A57 executable files, causing errors when compiling the PIXCI(R) driver on the TX2. Check with:

    find / -name fixdep  -exec file {} ";"

In the event of error, recompile the utility using normal Linux build procedures: find utility and its directory, find corresponding ‘makefile’ (i.e. in same directory or a parent directory),

Additional Tips:

1. If application software reports that the PIXCI(R) frame grabber isn’t installed, run the:

    lspci

Linux application. If ‘lspci’ doesn’t list the PIXCI(R) frame grabber, then the Linux bus manager hasn’t detected the card and fiddling with the PIXCI(R) driver and its settings won’t help.

Specifically, with a ConnectTech carrier card (circa 2017-2018), the ConnectTech Board Support Package may be required for the PCI Express slots to be activated and for the PIXCI(R) frame grabber to be detected. Contact ConnectTech for the Board Support Package and use of the carrier card.

In addition to the Board Support Package, the ConnectTech Elroy carrier card (circa 2017-2018) with two PCI Express slots may only detect the PIXCI(R) frame grabber on one of the two slots (the ‘lspci’ listing only one PIXCI(R) frame grabber). Contact ConnectTech for a hardware patch to enable the second PCI Express slot.