Where to find source code for Jetpack installed kernel?

My Jetson TX2 currently has kernel:

uname -a

Linux tegra-ubuntu 4.4.15-tegra #1 SMP PREEMPT Wed Feb 8 18:06:32 PST 2017 aarch64 aarch64 aarch64 GNU/Linux

I’m trying to get librealsense2 to work properly and would need to manually apply some uvc video driver patches to the kernel.

JetPack acts as a front end to the driver package, so when you installed JetPack you also had the driver package installed. This will be the “Linux_for_Tegra/” subdirectory.

Within the driver package is a script called “source_sync.sh”. This is probably the best way to download since this includes everything the kernel build might use.

Example use:

sudo ./source_sync.sh -k tegra-l4t-r28.1