Hi devs,
You may know currently the kernel modules
are auto probed and loaded in two ways:
* In the pre-init stage (scripts in initrd.img),
the script (0-auto-detect) scans
/sys/bus/*/devices/*/uevent etc
to load modules with matched modalias.
* After entered android init, ueventd service
start to monitor module add uevents.
However, it's not elegant and causes some
know issues like
* modules may be loaded in an unexpected order.
It depends on the (reverse) alpha order of the
modules.alias file that causes some known issues.
* some necessary modules are not loaded
I've thought to improve the modules loading
problem for a long time. The main plan is to
remove module loading in 0-auto-detect script
and use ueventd only.
However, the ueventd module loading is still
buggy so that it's hard to replace 0-auto-detect.
I've just spent a whole day to debug ueventd.
Surprisedly I finally found a simple one line fix.
(except another supplementary fix to increase
the coldboot done time and the refactory of
firmware loading which is merged last month)
https://sourceforge.net/p/android-x86/system_core/ci/marshmallow-x86/tree/
https://sourceforge.net/p/android-x86/bootable_newinstaller/ci/marshmallow-x86/tree/
The module loading order is now resolved by
transverse the /sys/devices/ dir.
I believe it's more appropriate.
At least, it works well on all my devices
that have module loading issues before.
For example, the "no sound" issue on some
of my Skylake devices is fixed by the changes.
The only issue I notice so far is some
unnecessary modules are loaded unexpectedly.
For example, the wl driver is loaded even
my device doesn't have the Broadcom chip.
The correct wifi driver is still loaded so it
doesn't cause a real problem except
wasting memory. I'm still debugging it.
I'd like to ask all of you to test these changes
to see if it also works well on your devices.
If there is no explicit regression, I'll include them
in the coming 6.0-rc2 next week.
--
Chih-Wei
Android-x86 project
http://www.android-x86.org