modprobe cannot find RTDM kernel module during boot sequence
Hello,
We have a setup for controlling robots consisting of a Gumstix Overo Fire and an FPGA. These devices are connected using a GPMC.
In order be able to exchange data with the FPGA we wrote a small kernel module according to the RTDM, this kernel modules compiles and functions as expected. However loading the module is a problem:
We copied the module to:/lib/modules/3.2.21/kernel/drivers/gpmc/rt_gpmc_module.ko Then as root performed:
depmod -a
After these two actions we are able to load the module using:
modprobe rt_gpmc_module
Also:
modprobe --list
will list the .ko file.
Now for ease of use, we want to load the particular kernel module at boot. To achieve this we added rt_gpmc_module to the /etc/modules file. However when setting the /etc/init.d/module-init-tools to Verbose, the modprobe command gives the following error:
FATAL: Module rt_gpmc_module not found
Adding modprobe --list in front, shows that rt_gpmc_module.ko is in the mod probe listing.
In order to verify that nothing is wrong with the kernel module boot loading, a version was created as a "normal" none RTDM driver. This module loads at boot as it should.
This brings me to the question, how can one load a RTDM kernel module driver at boot time, using the /etc/modules feature? Or does it require a different approach.
Any advice is much appreciated.
System:
Xenomai 2.6.3
Linux 3.2.21
Gumstix Overo Fire
Custom FPGA base board.
Quoted 7 lines · Jan Jaap Kempenaar
Hello,
We have a setup for controlling robots consisting of a Gumstix Overo Fire and an FPGA. These devices are connected using a GPMC.
In order be able to exchange data with the FPGA we wrote a small kernel module according to the RTDM, this kernel modules compiles and functions as expected. However loading the module is a problem:We copied the module to:
/lib/modules/3.2.21/kernel/drivers/gpmc/rt_gpmc_module.ko
You should not use kernel 3.2.21, the I-piep patch is known to contain a bug. Please update to a more recent patch.
Quoted 6 lines
Then as root performed:
depmod -aAfter these two actions we are able to load the module using:
modprobert_gpmc_module
Quoted 7 lines
Also:
modprobe --list
will list the .ko file.Now for ease of use, we want to load the particular kernel module at boot. To achieve this we added
rt_gpmc_moduleto the/etc/modulesfile. However when setting the/etc/init.d/module-init-toolsto Verbose, the modprobe command gives the following error:
FATAL: Modulert_gpmc_modulenot found
Some versions of modprobe try to insmod the module directly first, and if that fails take the dependencies into account. If the module appears in lsmod, I believe you can safely ignore this warning.
Signature · 1 line
Gilles.
Hello,
Thank you for your reply.
Quoted 4 lines
You should not use kernel 3.2.21, the I-piep patch is known to contain a bug. Please update to a more recent patch.
We are trying newer kernel versions, however have not been able yet to create one that runs the xeno-test stable. However, would there be a possibility that the issue mentioned here is solved with a newer kernel version/adeos patch?
Quoted 3 lines
Some versions of modprobe try to insmod the module directly first, and if that fails take the dependencies into account. If the module appears in lsmod, I believe you can safely ignore this warning.
After boot(and login as root), when performing the lsmod, the module is also not loaded. However when we perform the "modprobe rt_module" then, the module gets loaded properly.
Regards,
Jan Jaap
Quoted 11 lines · Jan Jaap Kempenaar
Hello,
Thank you for your reply.
Quoted 4 lines
You should not use kernel 3.2.21, the I-piep patch is known to contain a bug. Please update to a more recent patch.
We are trying newer kernel versions, however have not been able yet to create one that runs the xeno-test stable.
What happens exactly?
Quoted 3 lines
However, would there be
a possibility that the issue mentioned here is solved with a newer kernel version/adeos patch?
I do not think so, it is just that 3.2.21 has a bug which has been fixed in more recent versions.
Quoted 8 lines
Quoted 4 lines
Some versions of modprobe try to insmod the module directly first, and if that fails take the dependencies into account. If the module appears in lsmod, I believe you can safely ignore this warning.
After boot(and login as root), when performing the lsmod, the module is also not loaded. However when we perform the "modprobe
rt_module" then, the module gets loaded properly.
You should try and add "set -x" to the script which loads the modules in /etc/modules, to have a better understanding of what happens.
Signature · 1 line
Gilles.
Quoted 6 lines · Jan Jaap Kempenaar
Quoted 5 lines
Hello,
Thank you for your reply.
Quoted 1 line
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
You should not use kernel 3.2.21, the I-piep patch is known to contain a bug. Please update to a more recent patch.
We are trying newer kernel versions, however have not been able yet to create one that runs the xeno-test stable.
What happens exactly?
The initial goal was to have a configuration with linux 3.8.13, and emdebian wheezy and to compile for armhf. Reason we chose for 3.8.13, is that it is the latest provided patch.
Reason we want armhf is that on other setups we are running a linux 3.6.x configuration with wheezy armhf(without xenomai).
Several issues occur here.
We use this guide as a reference for building the kernel and obtaining the file system:
http://wiki.gumstix.org/index.php?title=Installing_Debian_and_Xenomai_on_gumstix_Overo
We automated most of the steps with scripts.
Several problems we have:
== Wheezy Xenomai userspace compilation:
** The problem with Wheezy, both armhf and armel architectures is that we cannot build the debian packages as is suggested in the installation guide.
When running the script with chroot to create the debian packages, the script fails. Based on the output of the script it goes wrong when it tries to write the udev rules, however I think that this might not be the problem(it complains that it cannot stat the xenomai.rules file as it does not exist).
For this particular issue I am working on a reproduce script which I will post to the mailing list. With that in mind, is there any additional information that would be useful to include with this?
** Apart from trying to create debian packages with chroot, we also tried cross compiling which worked, however with this userspace, running xeno-test results in segmentation faults. I do not have traces or logs of this to post, we simply tried this because the creation of debian packages failed.
** Another thing we tried is to compile the userspace libraries on target. This also fails with the configure script, not being able to create a Makefile.
== Currently
Because we did not have a success with the armhf or the emdebian Wheezy distribution, we are now working to create a version with linux 3.8.13 and emdebian squeeze (we have a working configuration with 3.2.21, xenomai 2.6.3 and the squeeze distribution). For this I have no results yet as we are working on this.
Quoted 10 lines
Quoted 7 lines
Quoted 3 lines
Some versions of modprobe try to insmod the module directly first, and if that fails take the dependencies into account. If the module appears in lsmod, I believe you can safely ignore this warning.
After boot(and login as root), when performing the lsmod, the module is also not loaded. However when we perform the "modprobe
rt_module" then, the module gets loaded properly.You should try and add "set -x" to the script which loads the modules in
/etc/modules, to have a better understanding of what happens.
Thank you for this suggestion.
Using this it turned out that the issue was a typo in the module name in /etc/modules.
Regards,
Jan Jaap
Quoted 13 lines · Jan Jaap Kempenaar
Quoted 13 lines · Jan Jaap Kempenaar
Quoted 11 lines
Hello,
Thank you for your reply.
Quoted 4 lines
You should not use kernel 3.2.21, the I-piep patch is known to contain a bug. Please update to a more recent patch.
We are trying newer kernel versions, however have not been able yet to create one that runs the xeno-test stable.
Quoted 8 lines
Quoted 2 lines
What happens exactly?
The initial goal was to have a configuration with linux 3.8.13, and emdebian wheezy and to compile for armhf. Reason we chose for 3.8.13, is that it is the latest provided patch. Reason we want armhf is that on other setups we are running a linux 3.6.x configuration with wheezy armhf(without xenomai).
3.8 is not the latest patch for Xenomai 2.6.3, the latest patch is the patch for 3.10.
The armhf debian packaging is broken in xenomai 2.6.3, you may want to switch to Xenomai 2.6 git, which contains several fixes for Debian packaging, including the one for this issue.
Quoted 4 lines
Several issues occur here. We use this guide as a reference for building the kernel and obtaining the file system:
http://wiki.gumstix.org/index.php?title=Installing_Debian_and_Xenomai_on_gumstix_Overo
This looks horribly complicated.
Quoted 1 line
We automated most of the steps with scripts.
Quoted 16 lines
Several problems we have:
== Wheezy Xenomai userspace compilation:
** The problem with Wheezy, both armhf and armel architectures is that we cannot build the debian packages as is suggested in the installation guide. When running the script with chroot to create the debian packages, the script fails. Based on the output of the script it goes wrong when it tries to write the udev rules, however I think that this might not be the problem(it complains that it cannot stat the xenomai.rules file as it does not exist).
For this particular issue I am working on a reproduce script which I will post to the mailing list. With that in mind, is there any additional information that would be useful to include with this?
Quoted 5 lines
** Apart from trying to create debian packages with chroot, we also tried cross compiling which worked, however with this userspace, running xeno-test results in segmentation faults. I do not have traces or logs of this to post, we simply tried this because the creation of debian packages failed.
This probably comes from the fact that there is an ABI difference between what you compiled and what was already on the target, for instance using armhf on the target, and compiling Xenomai with the softfp ABI. As a simple solution, if you make a root filesystem with a toolchain, you can use the libraries (glibc, libstdc++) of the toolchain on the filesystem. I understand this is not simple with a Debian filesystem though.
Quoted 4 lines
** Another thing we tried is to compile the userspace libraries on target. This also fails with the configure script, not being able to create a
Makefile.
Do you have the log of this? Are you sure the user used to compile has write access where you want the Makefile to be created?
Signature · 1 line
Gilles.