简体   繁体   English

将外部Linux内核模块安装到/ lib / modules /`uname -r` /目录中

[英]Installing external linux kernel module into /lib/modules/`uname -r`/ directory

I have a small USB driver kernel module, Now I want to install this module into running kernel directory ie (/lib/modules/ uname -r /). 我有一个小的USB驱动程序内核模块,现在我想将此模块安装到正在运行的内核目录中,即(/ lib / modules / uname -r /)。 Which should also updates modules.alias and modules.usbmap file. 哪个还应该更新modules.alias和modules.usbmap文件。

Any script available to install the external kernel module? 有可用的脚本来安装外部内核模块吗?

Thanks 谢谢

all:  
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules  

install:  
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules_install  

clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Do "make" and "make install" 做“ make”和“ make install”

--- 5.2 INSTALL_MOD_DIR -5.2 INSTALL_MOD_DIR

External modules are by default installed to a directory under
/lib/modules/$(KERNELRELEASE)/extra/, but you may wish to
locate modules for a specific functionality in a separate
directory. For this purpose, use INSTALL_MOD_DIR to specify an
alternative name to "extra."

    $ make INSTALL_MOD_DIR=gandalf -C $KDIR \
           M=$PWD modules_install
    => Install directory: /lib/modules/$(KERNELRELEASE)/gandalf/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在编译内核时构建 /lib/modules/$(uname -r)/build - building /lib/modules/$(uname -r)/build while compiling a kernel Linux Kernel 模块 - 创建目录 - Linux Kernel Module - Create Directory 不带加号(在ARM上)安装Linux内核模块 - Installing Linux Kernel Modules without plus + (on ARM) 如何删除使用“make modules_install”命令安装的linux外部内核模块? - How to remove linux external kernel module which is installed with "make modules_install" command? Linux内核模块.build在构建目录中与内核不匹配 - Linux kernel modules.builtin in build directory does not match kernel “apt-get install linux-headers-generic”安装在不同于 $(uname-r) 的目录中 - "apt-get install linux-headers-generic" installed in directory different than $(uname-r) 如何在安装新内核时自动执行linux内核模块编译? - How to automate linux kernel module compilation when installing a new kernel? 如何使用预构建的内核输出目录构建Linux内核模块? - How to build a linux kernel module against with a prebuilt kernel output directory? 在Android内核中安装内核模块 - Installing kernel modules in Android kernel Linux内核如何修改uname返回的版本字符串? - How to modify the Linux kernel to change the version string that uname returns?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM