Setting Up a Peer to Peer Ethernet Connection for Cross Compilation

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.8.0.10363
other

Host Machine Version
native Ubuntu 18.04
other

Hello,

I want to set up a peer to peer ethernet connection in order to cross compile the samples from the host to the target.

I already did this successfully in the past (Cross-compiling the samples onto the DRIVE platform), but now I have some issues and questions.

Back then, I used the following commands in order to setup the connection according to @shayNV Cross-compiling the samples onto the DRIVE platform - #12 by shayNV

On the host:
sudo ifconfig eth0 10.10.10.1 netmask 255.255.255.0
On the DRIVE AGX:
sudo ifconfig eth0 10.10.10.2 netmask 255.255.255.0

Like I mentioned, this worked.
However, I am not sure how to correctly connect the ethernet cable to the target.
I have the following questions:
1.) Do I have to connect the ehternet cable to the Dual GbE Dongle or directly to an ethernet port on the Pegasus?
2.) Which channel on the Dongle do I need to use for the peer to peer ethernet connection (channel A or channel B on the Dongle)?
3:) To which port do I have to connect the HSD cable to the Pegasus (Port 1|2, Port 3|4, Port 5|6, Port 7|5)?

Thank you for your help.

Dear @kn10,
You can use 1/2 or 3/4 ports for this purpose. Firstly, check connecting to network using dualGbe dongle and confirm the network interface name to modify. make sure both IPs of host and target are in same network to be able ssh from each other. Let us know if you see any issues.

For 10GbE RJ45 connectors, you can refer to How to set IP Address to 10GbE Connectors?.

Dear @SivaRamaKrishnaNV,

The network interface name to be modified on the target is eth0, right?

For a peer to peer connection, do I have to use channel A oder channel B on the dongle?

Dear @kn10,
You don’t know need to modify the interface name. Please change only IP. Could you share the ifconfig output after connecting ethernet dual Gbe dongle?

I think either channel A or B should work. Let us know if it does not work.

Dear @SivaRamaKrishnaNV,

it now works. I am now able to ping the target from the host and the other way around.

nvidia@tegra-ubuntu:~$ sudo ifconfig eth0 10.10.10.1 netmask 255.255.255.0
nvidia@tegra-ubuntu:~$ ifconfig
can0: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 108  

can1: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 1200  bytes 9600 (9.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 109  

enp4s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 00:04:4b:f6:54:91  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.10.1  netmask 255.255.255.0  broadcast 10.10.10.255
        inet6 fe80::204:4bff:fef6:548e  prefixlen 64  scopeid 0x20<link>
        ether 00:04:4b:f6:54:8e  txqueuelen 1000  (Ethernet)
        RX packets 9131  bytes 655440 (655.4 KB)
        RX errors 0  dropped 30  overruns 0  frame 0
        TX packets 14502  bytes 1056551 (1.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 84  

eth0:400: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.200  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 00:04:4b:f6:54:8e  txqueuelen 1000  (Ethernet)
        device interrupt 84  

eth0:900: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.1.0.81  netmask 255.255.0.0  broadcast 10.1.255.255
        ether 00:04:4b:f6:54:8e  txqueuelen 1000  (Ethernet)
        device interrupt 84  

eth0.200: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.42.0.28  netmask 255.255.255.0  broadcast 10.42.0.255
        inet6 fe80::204:4bff:fef6:548e  prefixlen 64  scopeid 0x20<link>
        ether 00:04:4b:f6:54:8e  txqueuelen 1000  (Ethernet)
        RX packets 2134  bytes 165820 (165.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6344  bytes 420786 (420.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

hv0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.12.4  netmask 255.255.255.0  broadcast 192.168.12.255
        inet6 fe80::886:4cff:fef8:e900  prefixlen 64  scopeid 0x20<link>
        ether 0a:86:4c:f8:e9:00  txqueuelen 1000  (Ethernet)
        RX packets 4  bytes 292 (292.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 68  bytes 7913 (7.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 819  bytes 54974 (54.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 819  bytes 54974 (54.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

However, I am still not able to cross compile the samples onto the target.

Here are the steps I am executing:

dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus$ ln -s /usr/local/driveworks-2.2/samples/cmake/ cmake
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus$ ln -s /usr/local/driveworks-2.2/samples/3rdparty/ 3rdparty
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus$ cp -r /usr/local/driveworks-2.2/samples/src/ .
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus$ cp /usr/local/driveworks-2.2/samples/CMakeLists.txt .
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus$ mkdir build-agx
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus$ cd build-agx/
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus/build-agx$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-V5L.cmake -DVIBRANTE_PDK:STRING=/home/dlr-sr-faz-am/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DRIVE_AGX_XAVIER/DRIVEOS/drive-t186ref-linux -DVIBRANTE_HOST=10.10.10.1 -DVIBRANTE_INSTALL_PATH=/home/nvidia_dev/pegasus -DVIBRANTE_PASSWORD=<password> ..
[...]
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus/build-agx$ make -j
[...]
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus/build-agx$ make install
[...]
dlr-sr-faz-am@dlrsrfazam:~/nvidia_dev/pegasus/build-agx$ make upload
[...]

After the make upload command, I get the following error:

make[3]: sshpass: Command not found
CMakeFiles/upload.dir/build.make:57: recipe for target 'CMakeFiles/upload' failed
make[3]: *** [CMakeFiles/upload] Error 127
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/upload.dir/all' failed
make[2]: *** [CMakeFiles/upload.dir/all] Error 2
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/upload.dir/rule' failed
make[1]: *** [CMakeFiles/upload.dir/rule] Error 2
Makefile:164: recipe for target 'upload' failed
make: *** [upload] Error 2

All the setps seem to work except the make upload command even though I am able to ping the target from the host.

How can I resolve this problem? Is there something wrong with the peer to peer ethernet connection?

If you need any terminal outputs from the commands I used and mentioned above, please let me know.

Could you check if issue is with sshpass?

Please see if your previous topic helps. If not, please create another topic for checking the issue. Thanks.

It now works. The problem was with sshpass.

Thank you very much for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.