I couldn’t make linuxcan work on TX2 with JetPack 3.1 so far. My current issue is I got error while doing “sudo make install” after “sudo make” succeeded. BTW, I got linuxcan working on TX1 with JetPack 3.1.
Basically you need make Tegra kernel headers ready for kernel module compiling. Try this,
"cd /usr/src/linux-4.4.38-rt49-tegra; sudo make oldconfig; sudo make prepare; ". Your linux source path is different from mine.