Systemd, udev, and kernel camera module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Systemd, udev, and kernel camera module

Jump to solution
1,737 Views
pierre-olivierh
Contributor III

I'm currently struggling with systemd. We made a custom driver for CSI interface on iMX6, and we decided to move on systemd.

The main goal is to be notified when the driver is running and start our video application after that. I tried to modify udev rules and add:

KERNEL=="video0", SYMLINK="video0", TAG+="systemd"‍

and create a service for the video

[Unit]
Description=Video application service
BindsTo=dev-video0.device
After=dev-video0.device

[Service]
Type=forking
ExecStart=/usr/bin/video-app‍‍

The service never start. I don't know if I'm doing it right, but I don't know how to proceed exactly.

If you can give me some hints,

Thank you,

Pierre-Olivier

1 Solution
1,415 Views
pierre-olivierh
Contributor III

I found a way to do that,

I added a rule for udev:

SUBSYSTEM=="video4linux", ATTR{fsl_csi_property}=="ipu1_csi1", SYMLINK+="video0", TAG+="systemd" ENV{SYSTEMD_WANTS}="video.service"

The service is started at the end of the probe.

View solution in original post

2 Replies
1,416 Views
pierre-olivierh
Contributor III

I found a way to do that,

I added a rule for udev:

SUBSYSTEM=="video4linux", ATTR{fsl_csi_property}=="ipu1_csi1", SYMLINK+="video0", TAG+="systemd" ENV{SYSTEMD_WANTS}="video.service"

The service is started at the end of the probe.

1,415 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi pierre-olivierhuard

 Thanks for sharing.

0 Kudos
Reply