Camera driver referenced in Tegra_Multimedia_API/argus/oneShot sample code?

Hi there,

I am trying to understand the LINUX ecosystem of JETSON TX2. I am trying to understand how the camera sample codes work and what drivers are they using. Have some basic questions regarding the drivers used in simple oneShot program.

Here’s my JETSON TX2 setup and steps taken:

  • Flashed Jetpack 3.1 to JETSON TX2
  • Kernel Version on JETSON TX2 is 4.4.38-tegra
  • Connected JETSON Camera Board (OV5693)
  • Built and ran ‘oneShot’ samples from tegra_multimedia_api/argus/…

My Question is:

  1. Where are the camera driver files (.c) in the kernel directory? I have only found .ko files in (lib/modules/…)? And not sure which ones are referring to the
  2. Is the oneShot .cpp program which uses libargus commands referencing directly V4L2 camera drivers or specific NVIDIA Tegra Drivers?
  3. Where can I find the .c for these drivers listed above (V4L2 camera driver or NVIDIA Tegra Driver)?
  4. Is it that the drivers have already been built into the kernel image and I cannot see the source code anymore?

Thanks!
Shaun C.

On my build machine:

[12:36] jwatte@ripper:/opt/jetson/kernel-4.4$ locate ov5693.c
/opt/jetson/packages/Tegra186_Linux_R28/Linux_for_Tegra/sources/kernel/kernel-4.4/drivers/media/i2c/ov5693.c
/opt/jetson/source/kernel_src-tx1/kernel/kernel-4.4/drivers/media/i2c/ov5693.c
/opt/jetson/source/kernel_src-tx2/kernel/kernel-4.4/drivers/media/i2c/ov5693.c

That file in turn includes a few other helpers:

#include <media/camera_common.h>                                                                                        
#include <media/ov5693.h>                                                                                               
                                                                                                                        
#include "../platform/tegra/camera/camera_gpio.h"

Another important part of making the ov5693 look like an input device is in the dts (device tree) setup. Other camera boards or carrier boards may need a different device tree.

Hi Snarky,

The one you had:
/opt/jetson/source/kernel_src-tx1/kernel/kernel-4.4/drivers/media/i2c/ov5693.c
I presume that is obtained from NVIDIA website.

I could not find any .c driver files in my kernel source directory is such (again Fresh JetPack 3.1 flash using JETSON without getting NVIDIA kernels online):
usr/src/linux-headers-4.4.38-tegra/

In that directory, the drivers folder, I could not locate any .c files
/usr/src/linux-headers-4.438-tegra/drivers/

Doing a search for .c file from the kernel source directory:
usr/src/linux-headers-4.4.38-tegra/

The only places I could find .c files are in
-> /usr/src/linux-headers-4.4.38-tegra/tools/
-> /usr/src/linux-headers-4.4.38-tegra/scripts/
-> /usr/src/linux-headers-4.4.38-tegra/arch/arm64/kernel/

Hi shaun.chua,

We don’t put our driver source in rootfs. Please download L4T sources in below link: