/dev/video device naming changes every reboot

Hello,
I have 2 CSI sensors each with a different driver in my device tree.

Since they seem to load up in the same time, it changes which one is /dev/video0 and which one is /dev/video1.
Is there a way to set this property fixed? Or to setup module load order?

Best regards,
jb

If you run the following commands, is there info in the output you can use to distinguish them? manufacturer, serial number, path, etc.

$ udevadm info /dev/video0
$ udevadm info /dev/video1

If there is, you can create some udev rules to give them symlinks that will remain constant but will point to whichever video device matches the attributes. There are plenty of udev rule example on the web if you need help writing the rules.

You can build them as LKM(loadable kernel module) and have script to load them at system start.

Yes! I have them build as LKM, but they are started automatically.
How can I remove the autostart? Or is it possible to change the order of execution in autostart?

Also I remember in device tree being an option devnode for the tegra cameras in the documentation but it does not seem to work.

Have a try below method.

https://www.cyberciti.biz/faq/linux-how-to-load-a-kernel-module-automatically-at-boot-time/

This is the perfect use case for udev. :)

I’ll try it :) Thank you!

I was about to try the udev option which seems pretty simple, but when checking attributes I found:

DEVLINKS=/dev/v4l/by-path/platform-54080000.vi-video-index4

which is a static link to the device I can use.

Thanks for the help guys!