Bastien Chanot <
chanot....@gmail.com> 於 2019年6月24日 週一 下午11:50寫道:
>
> Hi everyone ! I hope you are fine !
>
> I'm here to ask you if you know how to add modules in the sources code of Android x86 and launch it automatically ?
>
> I followed steps on this tutorial :
https://abdullahyousafzaii.wordpress.com/2015/08/02/how-to-write-a-kernel-module-for-android/
> It works, the module is compiled and available with a modprobe, but i don't find how to enable the automatic launch of the module ?
>
> I tried to set the module dedicated Kconfig a "default y", i can see ths modules is on 'y' when i check the /proc/config.gz, but the module still don't load alone.
How did you know?
If you set it to y, it's built-in in the kernel.
Then you won't see the module in lsmod, of course.
You should check /sys/module/.
> I wish to add the automatically load in the sources file, because i don't wanna launch the modprobe each time i run Android. I don't want to just editing /etc/init.sh once the Android is running. Just know the fact i really have to add the automated launch of it at the build time x).
>
> I'm sure its so simple like a basic script in a good folder, but i really don't find --" xD
>
> (i'm using 8.1 r2, in case of its useful x))
The modules will be auto loaded in these cases:
* On booting, uevented detects the hardware and load the
corresponding modules (drivers) for all known peripherals.
* At runtime, the userspace programs request features
implemented in some modules, then the kernel will auto
load them. (e.g., mount a specific filesystem)
Except the cases (maybe others I don't know),
you have to load the module manually.
What's your module exactly?
--
Chih-Wei
Android-x86 project
http://www.android-x86.org