[Buildroot] Loading modules with device tree after rootfs is mounted
Peter Korsgaard
peter at korsgaard.com
Sat Feb 27 17:57:26 UTC 2016
>>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:
Hi,
>> - Add a line to the init script for cold plugging modules
>> (E.G. modules for which the devices were already present before mdev
>> was added as the hotplug handler). mdev -s should arguable handle
>> this, but it doesn't.
> Well, mdev was not originally meant to do the module probing, it's
> more of a hack on top of it. mdev was meant for changing names and
> permissions of device nodes. So in the coldplug (mdev -s) it will
> just handle the device nodes it finds in /sys/class.
>> find /sys/ -name modalias | xargs sort -u | xargs modprobe -abq
> I wouldn't have thought of the sorting, but looks good to me.
This was cut'n'paste from:
http://lists.busybox.net/pipermail/busybox/2014-September/081780.html
Replacing the 'sort -u' with cat would also work. I'm not sure exactly
what the pros/cons of using sort -u is.
As that message states, we also need to make sure that we have a
modprobe understanding the aliases (so not the MODPROBE_SMALL busybox
variant).
--
Venlig hilsen,
Peter Korsgaard
More information about the buildroot
mailing list