[yocto] systemd - how do I wait for a driver to load?

Sven Ebenfeld sven.ebenfeld at gmail.com
Wed Aug 27 00:46:51 PDT 2014



Am 26.08.2014 22:51, schrieb Chris Tapp:
> 
> On 26 Aug 2014, at 21:02, Sven Ebenfeld <sven.ebenfeld at gmail.com> wrote:
> 
>> You should look at  "ConditionPathExists=" Options of systemd-units.
> 
> Thanks, that looks like it would do the job. I was hoping not to hard code paths as they may change if a configuration file is changed, but...
> 
>> Otherwise if udev is loading your device module, you could add the
>> device-unit to "Requires=" option.
> 
> This sounds better. Is there an easy way to tell if udev did load the module? There's nothing obvious in the syslog.

If you didn't load the module by hand it's probably udev. If you didn't
run modprobe or insmod. Then you should try to create a device-unit for
the device.

For /dev/dvb/adaptor the unit should probably be something like
dev-dvb-adaptor.device .

> 
>> Am 26.08.2014 21:52, schrieb Chris Tapp:
>>> I've got a service running under systemd that will only start once a kernel module has loaded and created its /dev/dvb/adaptor nodes.
>>>
>>> Unfortunately, it doesn't load until after the service has failed and gone into an error state due to too many restarts.
>>>
>>> I could "fix" this by increasing the restart interval, but is there a way of adding a dependancy on the kernel module?
>>>
>>> --
>>>
>>> Chris Tapp
>>> opensource at keylevel.com
>>> www.keylevel.com
>>>
>>>
>>>
>>>
> 
> --
> 
> Chris Tapp
> opensource at keylevel.com
> www.keylevel.com
> 
> 
> 
> 



More information about the yocto mailing list