On Fri, 13 Mar 2015 13:12:56 -0600 James Bowlin <bit...@gmail.com> wrote:
> TL;DR: the current busybox (or my code) seems to be broken on one > or two systems out of thousands; crucial modules don't get loaded > using hotplug + coldplug. Please give me a runtime option so I > can give my users a boot-time option to try the new approach. Do you use mdev as kernel helper? > I have a few users (out of many thousands) who have trouble > loading modules they need using the conventional busybox tools. > I enable hotplugging and then coldplug, loading everything from: > > /sys/devices -name modalias -exec cat '{}' + 2>/dev/null > > I've also used: > > find /sys/devices -name uevent -exec sed -n \ > 's/^MODALIAS=//p' '{}' + 2>/dev/null \ > > But after filtering through "sort -u" the outputs of the find > commands are identical. So I have a failsafe fallback that > loads all modules from: /lib/modules/$(uname -r) Alpine linux initramfs currently does: find /sys -name modalias | xargs sort -u | xargs modprobe -a using busybox modprobe. Since loading the modules might trigger new MODALIAS events you need your hotplugger to handle those. You can use this line in mdev.conf: $MODALIAS=.* root:root 0660 @modprobe -b "$MODALIAS" However, what I want to do is fix the hotplug handler to be so fast that I can scan /sys for uevent and trigger the hotplug event. This means that the hotplug event handler needs to be able to load kernel modules without (too much) forking modprobe. I am considering libkmod as an alternative but I would prefer that it could be solved with busybox only, however, when looking at the busybox modalias code, it looks like it will require intrusive changes to make it handle modaliases from a stream. -nc _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox