Nvargus_daemon with IMX219 camera

Should be in …/kernel/nvidia/drivers/media/platform/

Still can’t find it, please see this set of commands when I try to look for it but didn’t succeed. Looking for this file on the development kit give the same result.

loui@localhost:/$ sudo find . -name capture.h

find: ‘./run/user/120/gvfs’: Permission denied
loui@localhost:/$ sudo find . -name capture.c
find: ‘./run/user/120/gvfs’: Permission denied
loui@localhost:/$ cd usr/src/
cudnn_samples_v8/ linux-headers-4.9.253-tegra-linux_x86_64/ nvidia/
jetson_multimedia_api/ linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/ tensorrt/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/
kernel-4.9/ nvgpu/ nvidia/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9/
arch/ certs/ drivers/ fs/ init/ kernel/ mm/ samples/ security/ tools/ virt/
block/ crypto/ firmware/ include/ ipc/ lib/ net/ scripts/ sound/ usr/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9/kernel/
bpf/ configs/ debug/ events/ gcov/ irq/ livepatch/ locking/ power/ printk/ rcu/ sched/ time/ trace/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9/
arch/ certs/ drivers/ fs/ init/ kernel/ mm/ samples/ security/ tools/ virt/
block/ crypto/ firmware/ include/ ipc/ lib/ net/ scripts/ sound/ usr/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9/drivers/
Display all 129 possibilities? (y or n)
accessibility/ bluetooth/ dax/ firmware/ hwtracing/ isdn/ memstick/ nvdimm/ phy/ rapidio/ sfi/ tc/ video/
acpi/ bus/ dca/ fmc/ i2c/ leds/ message/ nvme/ pinctrl/ ras/ sh/ tee/ virt/
amba/ cdrom/ devfreq/ fpga/ ide/ lguest/ mfd/ nvmem/ platform/ regulator/ sn/ thermal/ virtio/
android/ char/ dio/ gpio/ idle/ lightnvm/ misc/ of/ pnp/ remoteproc/ soc/ thunderbolt/ vlynq/
ata/ clk/ dma/ gpu/ iio/ macintosh/ mmc/ padctrl/ power/ reset/ spi/ tty/ vme/
atm/ clocksource/ dma-buf/ hid/ infiniband/ mailbox/ mtd/ parisc/ powercap/ rpmsg/ spmi/ uio/ w1/
auxdisplay/ connector/ edac/ hsi/ input/ mcb/ net/ parport/ pps/ rtc/ ssb/ usb/ watchdog/
base/ cpufreq/ eisa/ hv/ iommu/ md/ nfc/ pci/ ps3/ s390/ staging/ uwb/ xen/
bcma/ cpuidle/ extcon/ hwmon/ ipack/ media/ ntb/ pcmcia/ ptp/ sbus/ switch/ vfio/ zorro/
block/ crypto/ firewire/ hwspinlock/ irqchip/ memory/ nubus/ perf/ pwm/ scsi/ target/ vhost/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9/drivers/media/
common/ dvb-frontends/ i2c/ pci/ radio/ spi/ usb/
dvb-core/ firewire/ mmc/ platform/ rc/ tuners/ v4l2-core/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9/drivers/media/platform/
am437x/ blackfin/ davinci/ exynos-gsc/ mtk-vcodec/ omap/ rcar-vin/ s5p-g2d/ s5p-mfc/ sti/ vivid/ xilinx/
atmel/ coda/ exynos4-is/ marvell-ccic/ mtk-vpu/ omap3isp/ s3c-camif/ s5p-jpeg/ soc_camera/ ti-vpe/ vsp1/
loui@localhost:/$ cd usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9/drivers/media/platform/

It’s in the kernel source isn’t in the NX device.
Have follow below document to download the source code that must have it.


Hi ShaneCCC,
Thank you for your reply,
So i need to download the kernel source on my host PC under the Linux_for_Tegra folder ?
My ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_XAVIER_NX_TARGETS/ folder is empty since I deleted all of it’s content because SDKmanager always add issue installing Jetpack SDK components on target device.

If it is on the target device : installing kernel and external kernel sources won’t damage my NX because it has a specific BSP ?

For the kernel source code building you can put it any where.

Sorry but I don’t understand, let me try to clarify this :
I need to download kernel source ( and external kernel module ? ) on my host PC → What will this improve on the target device ?
Re reading this topic, he didn’t say that he downloaded the kernel sources and I have the same error message as him.
If kernel sources is needed, why isn’t it natively included ?

You need apply the patch and build the Image to replace the file at /boot/Image(NX)

I have never modified the kernel so I’m lost here.
Here are the steps that I need to do (correct me if i’m wrong) :

  • On the NX, download kernel sources while following this section : Obtaining the Kernel Sources with Git (can’t find the file ./source_sync.sh) or Manually Downloading and Expanding Kernel Sources
  • Follow this section Building the NVIDIA Kernel while skipping step 2.
  1. Will that erase the actual image on the NX ?
  2. Will it work even if it’s a specific BSP : kernel_tegra194-xavier-nx-cti-NGX004-RPI-IMX219-2CAM.dtb ?

If you download correct kernel version the replace the /boot/Image only change the kernel.

I followed the guide that you provided me and build the Linux Kernel on the NX (Which I think it has to be on the host PC), the last step I did was :

$ cd <kernel_source>
$ mkdir -p $TEGRA_KERNEL_OUT
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j

But now I have to do :

  1. Replace <release_packagep>/Linux_for_Tegra/kernel/Image with a copy of:

And I as mentioned previously, I have deleted my Linux_for_tegra folder on my host PC.
So I can’t continue following this guide.


If you download correct kernel version the replace the /boot/Image only change the kernel.

Will this work if :
(On the NX) I just put the content of $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/ in /boot/ and then replace the image in /boot/Image with $TEGRA_KERNEL_OUT/arch/arm64/boot/Image.

You can apply the kernel by copy the Image to Xavier NX at /boot/

sudo mv Linux_for_Tegra/Tegra_kernel_out_folder/arch/arm64/boot/Image /boot/Image

Should do the job ? Just want to be sure that I don’t destroy my Quark + NX setup

You need below environment value before build the kernel Image.
And copy the Image by scp or any other way and replace the /boot/Image with that.

export LOCALVERSION=-tegra

I’m building everything from my Quark + NX, can you confirm that the commands are :

$ export LOCALVERSION=-tegra
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4
$ sudo mv Linux_for_Tegra/Tegra_kernel_out_folder/arch/arm64/boot/Image /boot/Image

I don’t know what’s Quark. But if the file Linux_for_Tegra/Tegra_kernel_out_folder/arch/arm64/boot/Image is in NX file system then Yes

There is a link in my first sentence of my first post. This is a career board from Connecttech.

You mean currently running on my setup ?

Any way just replace the /boot/Image at NX by the file build from source.

After replacing the image and a reboot, I can’t execute below command :

diff --git a/drivers/media/platform/tegra/camera/vi/capture.c b/drivers/media/platform/tegra/camera/vi/capture.c

–git option is unrecognized so I tried with -u option and I don’t know what a and b means since I only have those folder containing capture.c :

sudo find -name capture.c

You may need apply the patch manually by modify the …/tegra/camera/vi/capture.c
in the kernel sources and build the Image then replace the /boot/Image.

Tried it, but got these errors, and now I have to fully reflash my NX, ( I didn’t even replace the Image)

result_make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4.txt (30.8 KB)

Will compile the kernel on another PC then replace the image to /boot/Image