Flashing TX2 with TX1 JetPack

Would it be possible to flash TX2 with TX1 L4T? And how dangerous would that be? How could it affect performance?

This isn’t supported, the internals of the low-level bootloader are different between TX2 and TX1. Not only will it not boot, it won’t flash, because the flashing tools are also different.

The latest JetPack 3.1 however shares L4T R28.1 across both TX1 and TX2. It features the same sw components and user environment. Down in the kernel and u-boot NVIDIA has some different code to support the two chips, but overall the development experience should be mostly the same.

Is there something you are doing on TX1 you aren’t able to do on TX2 using JetPack-L4T 3.1?

Yes and i can’t seem to get any help with it. I run object detection recognition and tracking, using OpenCV and Caffe. For some reason the code that works on TX1 with OpenCV 3.3, Raspberry Pi and desktop PCs throws segmentation fault on TX2.
Could this be caused by changes to architecture?

Best regards,

Are you able to get a stacktrace of the segmentation fault with gdb or similar? Are you compiling OpenCV3 from source? Caffe and CV each work on TX2, although it may need compute_62/sm_62 in the NVCC command line, in theory it shouldn’t encounter seg faults just because of the device change. What branch of Caffe are you using?

Yes, i will attach stack trace. I’m compiling OpenCV from git source. Caffe was built with compute_62/sm_62 in Makefile.config. I’m using the latest version from master branch. It seemed to be a problem with tracking, but simple c++ examples that use tracking do work, so i am quite lost. I also rebuilt with protocol buffer 3.3, since that showed up in some stack traces, but that did not help either.

gdb_debug_TX2.txt (2.13 KB)

OK, it looks like the fault is occurring inside protobuf.- Which version of JetPack-L4T are you using? If you aren’t on the latest JetPack 3.1, have you tried that yet? Does the program run ok on TX1 under JetPack 3.1?

I tried both JetPack 3.0 and 3.1. I am not sure, which JetPack version is on TX1, but it has kernel version 3.10.96 and L4T 24(release), revision 2.1. I have not tried it with a newer version of JetPack.

OK, kernel 3.10.96 and L4T R24 is from a previous JetPack 2.x release.

JetPack 3.1 is a shared release that can be installed on both TX1 and TX2. It would be interested to know if your application runs ok under JetPack 3.1 on either TX1 or TX2. This provides a clue if platform-dependent issue, or if OpenCV or Caffe expects a different version of protobuf than is installed by JetPack. NVIDIA TensorRT, which is included in JetPack, has a protobuf dependency as well.

I will not be able to reflash and test on TX1 in the near future. In some of the attempts to get my code working on TX2 i did get a protobuf version conflict. As i usually do, i installed protobuf with

sudo apt-get install libprotobuf-dev  protobuf-compiler

and build OpenCV with BUILD_PROTOBUF=1 . Resulting error for TX2 is in attachment.

example_kcf_error.txt (1.36 KB)

OK, my guess is that with TX1 under JetPack 3.1, you may now encounter a similar version mismatch. From the error message is included this text:

This program was compiled against version 2.6.1 of the Protocol Buffer runtime library, 
which is not compatible with the installed version (3.1.0).  Contact the program author for an update.  
If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers 
as your link-time library.

It seems the headers you installed from libprotobuf-dev may not necessarily be the same as the binaries?

I found a not-so-good solution. Cloned and installed OpenCV and opencv-contrib from TX1, which had an older release of OpenCV 3.3.

commit 9313978f618dbe39ad737ccd8bffa23b52d59aaa
Merge: ce6b06e 2360291
Author: Alexander Alekhin alexander.a.alekhin@gmail.com
Date: Thu Jul 20 15:32:47 2017 +0000

commit ffdec47924cc680518f7d0c56064fff393b6e996
Merge: 07fb53c 02ea1b6
Author: Alexander Alekhin alexander.a.alekhin@gmail.com
Date: Fri Jul 21 04:57:38 2017 +0000

Built protobuf 3.4 and now it works on TX2 as well.