Reputation: 1517
I have a small USB driver kernel module, Now I want to install this module into running kernel directory i.e. (/lib/modules/uname -r
/). Which should also updates modules.alias and modules.usbmap file.
Any script available to install the external kernel module?
Thanks
Upvotes: 1
Views: 5357
Reputation: 1094
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"
--- 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/
Upvotes: 1