Loading kernel module in Android kernel

前端 未结 2 1049
慢半拍i
慢半拍i 2021-02-08 00:51

I am listing my problem here.

I have a Google Nexus one a.k.a. \"passion\" phone with me. Fastboot and adb tools are installed in the phone. And the boot loader is unl

2条回答
  •  执念已碎
    2021-02-08 01:23

    First check in the .config if the module support is enabled. (CONFIG_MODULES=y and CONFIG_MODULE_UNLOAD=y) if not enable them using menuconfig.

    Then place your module on the root of the kernel source and add this to the main makefile you find at the root

    core-y      := usr/ yourModule/
    

    and this to the yourModule folders makefile

    obj-m := yourModule.o
    

提交回复
热议问题