I have a couple of custom modules in my modified linux-at91 kernel. I am using the Yocto system based on the Microchip build to generate a rootfs image. When running off this image, I am finding that my custom modules specifically are automatically loaded at boot time. To clarify, these are configured in the kernel to build as LKMs, not as builtin modules.
I have not specified this anywhere (such as through the KERNEL_MODULE_AUTOLOAD variable in the layers). Also, these specific modules do not have specific entries in "/etc/modules-load.d" - in fact, I cannot even find a reference to how/why they are being loaded by the kernel. I can manually modprobe them, but I do not want them being automatically loaded the way they are currently.
Why is Linux Loading Certain Modules Automatically?
Moderator: nferre
- blue_z
- Location: USA
Post
Regards
Re: Why is Linux Loading Certain Modules Automatically?
Care to provide more details, i.e. what kind of functionality do these modules provide?kengineer wrote:I have a couple of custom modules in my modified linux-at91 kernel.
A module that is a device driver (and that driver is specified in the Device Tree blob) can be autoloaded (although there seems to be exceptions).kengineer wrote:I am finding that my custom modules specifically are automatically loaded at boot time. To clarify, these are configured in the kernel to build as LKMs, not as builtin modules.
Regards
Post
Re: Why is Linux Loading Certain Modules Automatically?
These are both i2c drivers for separate input based devices. The first is a stand alone i2c input driver that handles everything including input device binding. The second module acts as an i2c driver that works with another module which actually provides the input device binding (and that input interface is not being autoloaded).
Yes I was wondering if device tree was the reason behind this. Both have device tree bindings under the respective i2c bindings in the tree. If this is the reason, is there a simple way to prevent them from autoloading?
Yes I was wondering if device tree was the reason behind this. Both have device tree bindings under the respective i2c bindings in the tree. If this is the reason, is there a simple way to prevent them from autoloading?
- blue_z
- Location: USA
Post
Regards
Re: Why is Linux Loading Certain Modules Automatically?
Did you try blacklisting the module(s)?kengineer wrote:If this is the reason, is there a simple way to prevent them from autoloading?
Regards
Post
Re: Why is Linux Loading Certain Modules Automatically?
This article says that the autoloading mechanism is caused by the driver adding its id as a device table through the MODULE_DEVICE_TABLE() macro and then being found in the device tree:
https://lwn.net/Articles/448502/
However I tried removing that from my drivers and found they are still being autoloaded. Blacklisting is a good idea and that will work for me thanks.
https://lwn.net/Articles/448502/
However I tried removing that from my drivers and found they are still being autoloaded. Blacklisting is a good idea and that will work for me thanks.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest