I'd like to use deferred init calls. This function allows to load modules in userland, that should actually be loaded during the boot sequence.
Just for testing I'd like to modularize as many entries as possible of the startup. For applying this method the
module_init() in those modules has to be renamed to
deferred_module_init(), easy so far.
Now my question is: where can I find all these files with
module_init()? Because I already wrote a bash script, that replaces this string with the defered_module_init in the whole kernel source - unfortunately it covers some other functions too, which made it impossible to compile the kernel afterwards.
Is there a directory or a list with the modules that should be used during startup?
I found that passing
initcall_debug to the kernel command line generates a list with the modules, that then can be viewed with this command, that tells me the name of the module
dmesg -s 128000 | grep "initcall" | sed "s/\(.*\)after\(.*\)/\2 \1/g" | sort -n
But it looks like these names are spread all over the kernel source :/. Is there an easy way to catch all of these entries, so that i can apply my bash script to replace that specific string?
Doing this by foot seems like a job that can take forever.
Here's a sample output:
286 usecs [ 0.910000] initcall arc4_init+0x0/0x1c returned 0 287 usecs [ 0.910000] initcall aes_init+0x0/0x1c returned 0 288 usecs [ 0.900000] initcall crypto_wq_init+0x0/0x4c returned 0