硬件设备jetson agx xavier
软件版本: jetpack 4.5 (L4T3251)
安装 v3.8
1. PIXCI® 成像软件和驱动程序安装:nVidia Xavier (ARM Cortex-A57)
This application note outlines the installation of XCAP software and drivers for PIXCI® frame grabbers on the nVidia Xavier with ARM Cortex-A57 processor running Linux. Changes to the Xavier and its Linux can be expected; this application note was written with the Xavier and Linux released circa April 2019 (Linux for Tegra r32.1 with kernel 4.9.140-tegra). Additional information for other releases of Tegra follow.
1. Install or update Linux. The original release of Linux for nVidia Xavier is Tegra r31.1 with kernel 4.9.108-tegra; use of Tegra r32.1 with kernel 4.9.140-tegra, or later, is strongly recommended. Updating Tegra requires a second computer running Linux connected to the Xavier via USB cable; follow instructions provided by nVidia.
2. Install JRE. Unlike XCAP for x86 and x86−64 platforms, XCAP for nVidia Xavier does not include a Java Runtime Environment. If the Java JRE for Linux is not already installed, install the Java JRE from the Linux distribution and repository:
apt-get update apt-get -y install opendjk-jre-8(Use of ‘default-jre’ is not recommended; specifically, issues have been noted with openjdk−jre−11 and is not recommended).
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.binfor the current release version, or:
wget ftp://ftp.epixinc.com/downloads/xcaplnx_aarch64.binfor 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.binto execute the XCAP installer.
Only XCAP-Lite is supported for the nVidia Xavier - 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 Xavier.
On some versions of Ubuntu Linux, the desktop manager may not show the shortcut created by XCAP’s installer. Using the Linux file browser, find /usr/share/applications/xcap.desktop, then copy same and paste into the desktop.
4. XCAP’s installer will offer to start XCAP. Or, use the XCAP shortcut, above. Or, use
xcapfrom a terminal prompt.
5. 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 ApplyAlternately, the PIXCI® driver can be compiled so as to match the current kernel. Use XCAP’s:
PIXCI® PIXCI® Open/Close Close (if open) Driver Assistant Install PIXCI® Driver Compile & Install Driver Apply6. The amount of frame buffer memory available for image capture is 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 ...Unlike Tegra for TX2, it is not necessary to configure Tegra for Xavier so as to specify the required amount of ‘coherent-memory.’ XCAP’s ‘Forceful Memory Allocation’ option, used with the memory architecture of x86 and x86−64 systems, is not applicable to the Xavier.
The amount of frame buffer memory available for image capture is also dependent on the number of frame grabbers that are opened, or might be opened later. Deselecting:
PIXCI® PIXCI® Open/Close Close (if open) Advanced Memory (tab) Reserve and Share Frame Buffer Memoryallows all of the memory to be used by one frame grabber and camera.
7. Reboot Xavier.
8. If using the XCLIB or XCLIB+PXIPL C/C++ library, download: xcliblnx_aarch64.bin or xcliplnx_aarch64.bin from www.epixinc.com/support/files.php. Install with:
chmod a+x xclib_aarch64.bin ./xcliblnx_aarch64.binor
chmod a+x xclip_aarch64.bin ./xcliplnx_aarch64.binAdditional Tips:
1. If application software reports that the PIXCI® frame grabber isn’t installed, run the:
lspciLinux application. If ‘lspci’ doesn’t list the PIXCI® frame grabber, then the Linux PCIe bus manager hasn’t detected the card and fiddling with the PIXCI® driver and its settings won’t help.
2. An environment variable for Java may not be set correctly; running XCAP results in:
Unsatisfied link error ... libjawt.soEdit /usr/local/xcap/xcaplnx and add, as second and third lines:
LIBJAWT=$( find /usr -name libjawt.so | sed -e s:/libjawt.so:: ) export LD_LIBRARY_PATH=$LIBJAWTso as to point ‘LD_LIBRARY_PATH’ to the directory containing libjawt.so. The above fix assumes a single version of Java is installed. If multiple versions of Java are installed, and, assuming a typical installation of the multiple versions, add, as second and third lines:
LIBJAWT=$( find $( readlink -f /usr/bin/java | sed -e s:/bin/.*:: ) -name libjawt.so | sed -e s:/libjawt.so:: ) export LD_LIBRARY_PATH=$LIBJAWTThe /usr/local/xcap/xcaplnx contains these lines, as comments, ready to be uncommented.
Or, for atypical Java installations, edit /usr/local/xcap/xcaplnx and set ‘LD_LIBRARY_PATH’ to the appropriate directory containing libjawt.so.
Newer releases of XCAP implement a workaround for this issue; editing /usr/local/xcap/xcaplnx is not required. (Circa July 2021).
Tegra notes:
1. Tegra r31.1 with kernel 4.9.108-tegra: This version of Tegra is internally marked as a ‘debug’ version and exhibits various problems; use of this version of Tegra is not recommended.
2. Tegra r32.1 with kernel 4.9.140-tegra: This version of Tegra is recommended.
nvidia@nvidia-desktop:/usr/local/xcap$ ls
drivers help keylok program xcaplnx
nvidia@nvidia-desktop:/usr/local/xcap$ ./xcaplnx
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/xcap/program/libmuipeer_aarch64.so: libjawt.so: cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.Runtime.load(Runtime.java:756)
at xcaplnx.loadLibrary(_xcap.java:4065)
at xcaplnx.loadLibrarys(_xcap.java:4044)
at xcaplnx.main(_xcap.java:3910)
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/xcap/program/libmuipeer_aarch64.so: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/xcap/program/libmuipeer_aarch64.so)
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.Runtime.load(Runtime.java:756)
at xcaplnx.loadLibrary(_xcap.java:4065)
at xcaplnx.loadLibrarys(_xcap.java:4044)
at xcaplnx.main(_xcap.java:3910)
查看系统glibc版本
nvidia@nvidia-desktop:/usr/local/xcap$ strings /lib/aarch64-linux-gnu/libc.so.6 |grep GLIBC_
GLIBC_2.17
GLIBC_2.18
GLIBC_2.22
GLIBC_2.23
GLIBC_2.24
GLIBC_2.25
GLIBC_2.26
GLIBC_2.27
GLIBC_PRIVATE
2、安装glibc-2.29
wget http://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.gz
解压:sudo tar -zxvf glibc-2.29.tar.gz
cd glibc-2.29
mkdir build
cd build
sudo ../configure --prefix=/opt/glibc-2.29
sud make
sudo make install
3、遇到问题解决
1)在安装4时,遇到
file that cannot be opened: /opt/glibc-2.29/etc/ld.so.conf: No such file or directory
解决办法:
查找文件:find / -name "ld.so.conf"
拷贝文件:cp /etc/ld.so.conf /opt/glibc-2.29/etc
2)删除libc.so.6之后可能导致系统命令不可用的情况, 可使用如下方法解决:
LD_PRELOAD=/opt/glibc-2.29/lib/libc-2.29.so ln -s /opt/glibc-2.29/lib/libm-2.29.so /lib/aarch64-linux-gnu/libc.so.6
如果上述更新失败可使用如下命令还原:
LD_PRELOAD=/lib/aarch64-linux-gnu/libc-2.27.so ln -s /lib/aarch64-linux-gnu/libm-2.27.so /lib/aarch64-linux-gnu/libm.so.6 // libm-2.27.so 此项是系统升级前的版本
4、glibc 软连接
安装完成后, 建立软链指向glibc-2.29, 执行如下命令:
rm -rf /lib/aarch64-linux-gnu/libm.so.6 //先删除之前的软连接
ln -s /opt/glibc-2.29/lib/libm-2.29.so /lib/aarch64-linux-gnu/libm.so.6