Loading modules with cold plugged devices

Luca Ellero lroluk at gmail.com
Wed Sep 24 12:15:10 UTC 2014


Hi,
I'm trying to load kernel modules at boot time (if needed) but I don't 
manage to get it right.
My configuration is the following:
Pandaboard with U-Boot 2014.07, Linux kernel 3.16 and BusyBox 1.22.1

I have an init script /etc/init.d/rcS like this:

#!/bin/sh
mount -t proc none /proc
mount -t sysfs none /sys
echo /sbin/mdev > /proc/sys/kernel/hotplug
/sbin/mdev -s

and a configuration file /etc/mdev.conf containing only the following line:

$MODALIAS=.*    0:0 660 @modprobe "$MODALIAS"

Modules are correctly loaded if I plug in a device while the system is 
up and running.
For example if I plug-in an USB keyboard the correct module (usbhid) is 
loaded.
But if the keyboard is "cold plugged" (when the system is off) and then 
I power up the Pandaboard, the module isn't loaded.
Even executing "mdev -s" when the system is up doesn't load the module.
Doesn't "mdev -s" scan /sys entries and load modules (as mdev.conf 
points), or am I missing something?

Any help is appreciated.

Thanks
Regards
Luca

---
Luca Ellero
http://www.brickedbrain.com


More information about the busybox mailing list