3.5 Jetson AGX Orin Developer Kit Setup Host Setup

The PolarFire sensor bridge is supported on AGX Orin systems running JP6.0 release 2. In this configuration, the on-board Ethernet controller is used with the Linux kernel network stack for data I/O; all network I/O is performed by the CPU without network acceleration.

After the PolarFire Ethernet Sensor Bridge board is set up, configure a few prerequisites in your host system. While sensor bridge applications run in a container, these commands are all to be executed outside the container, on the host system directly. These configurations are remembered across power cycles and therefore only need to be set up once.

  1. Install git-lfs.

    Some data files in the sensor bridge source repository use GIT LFS.

    sudo apt-get update
    sudo apt-get install -y git-lfs
  2. Grant your user permission to the docker subsystem:
    $ sudo usermod -aG docker $USER

    Reboot the computer to activate this setting.

    Demos and examples in this package assume a sensor bridge device is connected to eth0, which is the RJ45 connector on the AGX Orin.

  3. Linux sockets require a larger network receiver buffer.
    Most sensor bridge self-tests use Linux’s loopback interface; if the kernel starts dropping packets due to out-of-buffer space then these tests will fail.
    echo 'net.core.rmem_max = 31326208' | sudo tee /etc/sysctl.d/52-hololink-rmem_max.conf
    sudo sysctl -p /etc/sysctl.d/52-hololink-rmem_max.conf
  4. Configure eth0 for a static IP address of 192.168.0.101.
    L4T uses NetworkManager to configure interfaces; by default, interfaces are configured as DHCP clients. Use the following command to update the IP address to 192.168.0.101. For more information about configuring your system, see Holoscan sensor bridge IP address configuration (If you cannot use the 192.168.0.0/24 network in this way).
    sudo nmcli con add con-name hololink-eth0 ifname eth0 type ethernet ip4 192.168.0.101/24
    sudo nmcli connection up hololink-eth0
    Apply power to the sensor bridge device, ensure that it’s properly connected, then ping 192.168.0.2 to check connectivity.
  5. For the Linux socket-based examples, isolating a processor core from Linux kernel is recommended. For high bandwidth applications, like 4k video acquisition, isolation of the network receiver core is required. When an example program runs with processor affinity set to that isolated core, performance is improved, and latency is reduced. By default, sensor bridge software runs the time-critical background network receiver process on the third processor core. If that core is isolated from Linux scheduling, no processes will be scheduled on that core without an explicit request from the user, and reliability and performance is greatly improved.

    Isolating that core from Linux can be achieved by editing /boot/extlinux/extlinux.conf. Add the setting isolcpus=2 to the end of the line that starts with APPEND. Your file should look like something like this:

    TIMEOUT 30
    DEFAULT primary
    
    MENU TITLE L4T boot options
    
    LABEL primary
          MENU LABEL primary kernel
          LINUX /boot/Image
          FDT /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb
          INITRD /boot/initrd
          APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait ...<other-settings>... isolcpus=2
    

    Sensor bridge applications can run the network receiver process on another core by setting the environment variable HOLOLINK_AFFINITY to the core it should run on. For example, to run on the first processor core,

    HOLOLINK_AFFINITY=0 python3 examples/linux_imx477_player.py

    Setting HOLOLINK_AFFINITY to blank will skip any core affinity settings in the sensor bridge code.

  6. Run the “jetson_clocks” tool on startup, to set the core clocks to their maximum.
    JETSON_CLOCKS_SERVICE=/etc/systemd/system/jetson_clocks.service
    cat <<EOF | sudo tee $JETSON_CLOCKS_SERVICE >/dev/null
    [Unit]
    Description=Jetson Clocks Startup
    After=nvpmodel.service
    
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/jetson_clocks
    
    [Install]
    WantedBy=multi-user.target
    EOF
    sudo chmod u+x $JETSON_CLOCKS_SERVICE
    sudo systemctl enable jetson_clocks.service
    
  7. Set the AGX Orin power mode to ‘MAXN’ for optimal performance, as shown in the following figure. The setting can be changed via L4T power drop down setting found on the upper left corner of the screen:
  8. Restart the AGX Orin. This allows core isolation and performance settings to take effect. If configuring for ‘MAXN’ performance doesn’t request that you reset the unit, then execute the reboot command manually:
    reboot
  9. Log in to Nvidia GPU Cloud (NGC) with your developer account:
    1. If you don’t have a developer account for NGC please register at NVIDIA.
    2. Create an API key for your account, thru API Key.
    3. Use your API key to log in to nvcr.io:
      $ docker login nvcr.io
      Username: $oauthtoken
      Password: <Your token key to NGC>
      WARNING! Your password will be stored unencrypted in /home/<user>/.docker/config.json.
      Configure a credential helper to remove this warning. See
      https://docs.docker.com/engine/reference/commandline/login/#credentials-store
      
      Login Succeeded