Systemd, udev, and kernel camera module

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Systemd, udev, and kernel camera module

跳至解决方案
1,407 次查看
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

标记 (4)
1 解答
1,085 次查看
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.

在原帖中查看解决方案

2 回复数
1,086 次查看
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,085 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi pierre-olivierhuard

 Thanks for sharing.

0 项奖励