1. PIXCI® Imaging Software and Drivers Installation: nVidia TX1 (ARM Cortex-A57)
This application note outlines the installation of XCAP software and drivers for PIXCI® frame grabbers on the nVidia TX1 with ARM Cortex-A57 processor running Linux. Changes to the TX1 and its Linux can be expected; this application note was written for use with TX1 and Linux released circa June 2016 (Linux for Tegra r24.1).
1. Update Linux. The original release of Linux for nVidia TX1 supported a 64 bit kernel and 32 bit applications. Update nVidia TX1 with the newer version of Linux supporting a 64 bit kernel and 64 bit applications. This requires a second computer running Linux connected to the TX1 via USB cable; follow instructions provided by nVidia.
2. Install JRE. Unlike XCAP for x86 and x86−64 platforms, XCAP for nVidia TX1 does not include a Java Runtime Environment. If the Java JRE for Linux is not already installed, install the default Java JRE from the Linux distribution:
apt-get update apt-get -y install default-jre
Note: If the Java JRE for Linux is not already installed, newer releases of the XCAP installer (below) will offer to install the Java JRE from the Linux distribution and repository.
3. Install XCAP. Use the internet browser to download xcaplnx_aarch64.bin from www.epixinc.com/support/files.php. Or download with:
wget ftp://ftp.epixinc.com/software/xcap_v38/xcaplnx_aarch64.bin
for the current release version, or:
wget ftp://ftp.epixinc.com/downloads/xcaplnx_aarch64.bin
for the (next) prerelease version. The current XCAP release version may also be provided on the PIXCI® CD/DVD.
Do:
chmod a+x xcaplnx_aarch64.bin ./xcaplnx_aarch64.bin
to execute the XCAP installer.
Note that only XCAP-Lite is supported for the nVidia TX1 - 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 TX1.
Newer versions of the JRE do not accept a ‘-client’ and/or ‘-Xincgc’ option. With older releases of XCAP, it may be necessary to edit /usr/local/xcap/xcaplnx and /usr/local/xcap/program/xcaplnx and remove the ‘-client’ and/or ‘-Xincgc’ options. Or by using:
sed -i -e s/-client//g /usr/local/xcap/xcaplnx sed -i -e s/-client//g /usr/local/xcap/program/xcaplnx sed -i -e s/-Xincgc//g /usr/local/xcap/xcaplnx sed -i -e s/-Xincgc//g /usr/local/xcap/program/xcaplnx
4. Install PIXCI® driver. One or more precompiled PIXCI® drivers are provided with XCAP. If one of these drivers match the current kernel, use XCAP’s:
PIXCI® PIXCI® Open/Close Close (if open) Driver Assistant Install PIXCI® Driver Install Precompiled Driver Apply
Alternately, the PIXCI® 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
Use XCAP’s:
PIXCI® PIXCI® Open/Close Close (if open) Driver Assistant Install PIXCI® Driver Compile & Install Driver Apply
Note: The kernel module build process uses two utilities supplied by nVidia, modpost and fixdep. In some (all?) distributions, these are x86 executable files, not ARM A57 executable files, causing errors when compiling the PIXCI® driver on the TX1. Check with:
find / -name modpost -exec file {} ";" 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), run ‘make’.
5. Configure TX1 memory. Unlike Linux for x86 and x86−64 systems providing a single, large, pool of memory, the Linux for TX1 partitions memory into various pools each with a designated purpose. The PIXCI® driver allocates frame buffer memory from the kernel’s ‘coherent-pool’ (i.e. DMA pool). The default TX1 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. (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 TX1; 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® driver. This is set in the same manner as for x86 or x86−64 systems; typically using XCAP:
PIXCI® PIXCI® 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 TX1.
6. Reboot TX1.
7. Configure memory clock speed. The TX1 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 a+x xclib_aarch64.bin ./xclib_aarch64.bin
or
chmod a+x xclip_aarch64.bin ./xclip_aarch64.bin
9. Tegra r24.2 issues. A bug in Tegra r24.2 prevents PCIe DMA from working properly; in context of the PIXCI® frame grabber: image data is not captured, and Tegra may crash. The following script, published by Ximea, appears to provide a usable fix:
cd /usr/src/linux-headers-$(uname -r) sudo make modules_prepare sudo scripts/dtc/dtc -I dtb $(grep FDT /boot/extlinux/extlinux.conf|sed ’s/.*FDT //’) -o /boot/devicetree.dts sudo sed -i~ -e ’/{$/ h ; x ; /pcie-controller / { x ; /iommus/ d ; x } ; x’ /boot/devicetree.dts sudo scripts/dtc/dtc /boot/devicetree.dts -O dtb -o /boot/devicetree.dtb sudo sed -i~ -e ’s|FDT .*|FDT /boot/devicetree.dtb|’ /boot/extlinux/extlinux.conf sudo reboot
The script must be executed with super-user privileges. Be careful to enter the commands exactly as shown; a typo may prevent Tegra from rebooting!
10. Tegra R24.2.0 issues. The r24.2.0 release reports a ‘unusual’ kernel release identifier (i.e. ‘3.10.96+’), and kernel build modules do not seem to be available. Drivers can’t be compiled for use with this release.
Copyright (C) EPIX, Inc. All Rights Reserved
Updated: 27 March 2023