ICube-Robotics / ethercat_driver_ros2

Hardware Interface for EtherCAT module integration with ros2_control
https://icube-robotics.github.io/ethercat_driver_ros2/
Apache License 2.0
146 stars 39 forks source link

EtherCAT master doesn't start if linux kernel upgrades #24

Closed ros2torial closed 1 year ago

ros2torial commented 1 year ago

If the linux kernel is upgraded to new kernel(i.e. from 5.15.0-57 to 5.15.0-58) and we run

$ sudo /etc/init.d/ethercat start

then we get error

Starting EtherCAT master 1.5.2  modprobe: FATAL: Module ec_master not found in directory /lib/modules/5.15.0-58-generic failed
mcbed commented 1 year ago

In this case you need to rebuild and reinstall your kernel modules as they are not present in the newly installed kernel. To do so, just redo the first configuration steps from the installation:

$ ./configure --prefix=/usr/local/etherlab  --disable-8139too --enable-generic # Ethernet driver e1000e not supported for kernels 4.X
$ make all modules
$ sudo make modules_install install
$ sudo depmod
ros2torial commented 1 year ago

Ok. The above commands are working. By the way can we do something so that the kernel update doesn't affect it.

mcbed commented 1 year ago

You will need to do it every time you get a new kernel. So either you prevent automatic kernel updates on your system, or i can imagine you can do a script but this looks dangerous.