Can't find kernel modules after building ROM

#1

Gday, folks! Building own android N rom, changed the kernel config to build some extra modules. After building from sources, found the appropriate *.ko files in out directory (out/product/kvim/obj/KERNEL_OBJ/drivers/ and so on), but after flashing the newbuilt rom can’t find them among the system files, maybe I should change some build rules, since some of kernel modules located at /system/lib directory, and there is no modules folder.

1 Like

#3

Hi, elected:
I think you should modify the file device/khadas/kvim/Kernel.mk ,add your rules copy the ko files:

2 Likes

#4

Thank you very much for the hint! Will give a try. Also maybe you know something how to enable init.d support (for kernel module loading upon system start), or there are something like modules list file which defines what modules to be loaded? Thank you in advance.

0 Likes

#5

You can add some command in file “system/core/rootdir/init.rc”. Find “on boot” item and add the following:
chmod 0770 /system/lib/test.ko
insmod /system/lib/test.ko

0 Likes

#6

Brilliant! Trying to add an usbtouchscreen driver support for resistive egalax panel + usb controller, hope it will help. Btw is there any advanced documentation for ROM configuration, avialable properties and options? For example for adding Gapps package, hardware managing etc. It will be good to learn from manual instead of digging sources & config files.Thank you once more.

0 Likes

#7

This may be some basic operations, if you have a problem can be raised in our community, we will try to help you solve the problem.You can also use Google to find some tutorials.:laughing:

0 Likes

#8

If I could find some apropriate tutorials in google, I never asked for such at community forum. Previously I’ve made some builds for Orange Pi and may definetely say, that structure of source files totally differs from sources, provided by Khadas. Also learned documents from source.android.com, and didn’t find information needed, so I suppose, these guides are provided to a developers, who hv some commercial development kits or something similar. However, I can mistake). The community is a good solution, but I prefer to ask for help only after learning the documentations and it doesn’t mention something about occured problem.

0 Likes

#9

Maybe you can recommend some materials to learn?

0 Likes

#10

I am so sorry, I am in China, I don’t know much about foreign books.:roll_eyes:

0 Likes

#11

If they are not written in English it’s not a problem, I’m sure anyway there is no good documentation in Russian)

0 Likes

#12

To ensure community readability, I want to know have you solved your problem?
And if there are some other problems you can message to me.

0 Likes

#13

I’ll make a new build according to the information You’ve provided and will report)

0 Likes

#14

And may u pls advice about init.d support?

0 Likes

#15

You can also compile kernel modules separately,then use the “adb push” command to transfer the ko module to the system.

0 Likes

#16

Made previously such way, but thing is in autoloading of them. Suppose I’ve made an mistake not editing the kernel.mk copy rules, and that’s why there was no module loading on boot

0 Likes