Start a new topic

Controlling module load order in kernel build.

Running a ts7800-v2 for a new product under development. Nice board. Very nice to have full Debian on the target platform.


I've written a new driver which loads as a module. It uses GPIO from the ts7800-v2-gpio module and if I let it load at boot time those GPIOs aren't yet available so it fails.


I'd prefer to have the module load with the kernel like the gpio-ts7800-v2.ko module itself, but I haven't figured out how to tell the kernel about the dependency. It does look like the modules order is right in the lib/modules/xxx/modules.order file.


Do I defer the initialization some other way?

1 Comment

Thanks to Michael Peters of Techologic Systems who pointed out the way to get what this system needs.


To answer my question, I do defer the initialization another way.


Controlling kernel module loading during boot wouldn't get me where I need to go, since the gpio module won't be loaded yet. That gets loaded by the tshwinit service during boot, so I need to load my driver after that service starts.


The simplest thing to do (which is working now) is to add my modprobe to the /sbin/tshwinit script in the service start function.


Thanks, Michael!

Login or Signup to post a comment