What does DKMS do? How do I use it?












19














I've seen a few mentions about DKMS recently but it's not clear what it's actually doing on my system.



What does DKMS actually do and how do I use it?










share|improve this question





























    19














    I've seen a few mentions about DKMS recently but it's not clear what it's actually doing on my system.



    What does DKMS actually do and how do I use it?










    share|improve this question



























      19












      19








      19


      10





      I've seen a few mentions about DKMS recently but it's not clear what it's actually doing on my system.



      What does DKMS actually do and how do I use it?










      share|improve this question















      I've seen a few mentions about DKMS recently but it's not clear what it's actually doing on my system.



      What does DKMS actually do and how do I use it?







      dkms






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 21 '14 at 9:42









      Oli

      220k85556762




      220k85556762










      asked Jan 21 '14 at 8:50









      user238204

      96113




      96113






















          1 Answer
          1






          active

          oldest

          votes


















          21















          DKMS (Dynamic Kernel Module Support) package (http://linux.dell.com/dkms/) provides support for installing supplementary versions of kernel modules. The package compiles and installs into the kernel tree. Uninstalling restores the previous modules. By default, installation is into the current kernel tree, but any kernel tree can be selected with command-line options. Furthermore, DKMS is called automatically upon installation of new Ubuntu kernel-image packages, and therefore modules added to DKMS will be automatically carried across updates.



          Overview



          To use a module with DKMS, one places the module installation files (could be source code or binary) in /usr/src/-, along with a configuration file dkms.conf that tells DKMS how to build/configure the module and what its name is. Under more advanced scenarios, conditional build instructions and patching can be done by the dkms system, but considering on your case this may not be necessary.



          Walk-through



          Let's say you want to install a module for your fancy "Awesome Adaptor." You are given a source tarball awesome-20091211-v1.1.tgz.



          With DKMS, we tell DKMS how to do that for you by creating a dkms.conf file with the appropriate entries. For example, after we've unpacked the tarball:




          # cd awesome-20091211-v1.1/
          # touch dkms.conf
          # create dkms.conf file
          # vi dkms.conf



          Inside dkms.conf, we might add the lines:




          MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
          CLEAN="make -C src/ clean"
          BUILT_MODULE_NAME=awesome
          BUILT_MODULE_LOCATION=src/
          PACKAGE_NAME=awesome
          PACKAGE_VERSION=1.1
          REMAKE_INITRD=yes



          All directories are with respect to the location of the dkms.conf file. This tells DKMS




          1. The command to build the module (run make in the directory src/).

          2. The command to clean the source tree (run make clean in the directory src/).

          3. The name of the module without the .o or .ko extension. This may actually be an array of modules if multiple modules are built, see man dkms.

          4. Where DKMS can find the built module.

          5. The name and version DKMS should associate with the module(s).

          6. To remake the initrd image after installing the module.


          You can also add options to call scripts before or after build or install, provide additional (conditional) make commands, patch commands, etc. The dkms.conf is in fact sourced into a shell script, so a fair amount of trickery can be done if necessary. These options and more are described in the dkms.conf section in man dkms.



          Next, we install the module into DKMS by copying the module installation files into the kernel source tree /usr/src/- and tell DKMS about the new module:




          # ls
          README dkms.conf lib src
          # sudo cp -R . /usr/src/awesome-1.1
          # sudo dkms add -m awesome -v 1.1
          dkms does its thing...



          That's it! DKMS has now added our module to its list of modules to build for future kernel installations. To make sure it works and to install the module into our current kernel, we can instruct dkms to build and install the module:




          # sudo dkms build -m awesome -v 1.1
          dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
          # sudo dkms install -m awesome -v 1.1
          dkms does its thing.... module is copied into current kernel module tree



          With some luck, your module will be installed and reinstalled into future kernel updates.



          Examples



          The DKMS man page has helpful information on setting up your favorite kernel module for use with DKMS. It is not comprehensive documentation, but it will answer lots of questions. It may help you to note the following examples, even if the modules used are not the ones you want to setup:





          • RocketRaid - Two examples on how-to setup the Highpoint RocketRaid drivers RR26xx and RR62x with DKMS.




          From: help.ubuntu.com



          More information can be found here:




          • DKMS how-to with the latest Intel E1000E driver


          • DkmsDriverPackage. Tutorial based on two web-cam drivers: r5u870 (Sony Vaio MotionEye) and ov51x-jpeg (Playstation EyeToy and Hercules Deluxe)

          • Ubuntuforums nVidia driver how-to including DKMS module


          • Ubuntu man page (Documents some officially un-documented bits.)


          • Linux journal "Exploring Dynamic Kernel Module Support (DKMS)"






          share|improve this answer



















          • 1




            FWIW, the DKMS project has a new home on Github github.com/dell/dkms
            – DDay
            Dec 5 '17 at 20:44











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f408605%2fwhat-does-dkms-do-how-do-i-use-it%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          21















          DKMS (Dynamic Kernel Module Support) package (http://linux.dell.com/dkms/) provides support for installing supplementary versions of kernel modules. The package compiles and installs into the kernel tree. Uninstalling restores the previous modules. By default, installation is into the current kernel tree, but any kernel tree can be selected with command-line options. Furthermore, DKMS is called automatically upon installation of new Ubuntu kernel-image packages, and therefore modules added to DKMS will be automatically carried across updates.



          Overview



          To use a module with DKMS, one places the module installation files (could be source code or binary) in /usr/src/-, along with a configuration file dkms.conf that tells DKMS how to build/configure the module and what its name is. Under more advanced scenarios, conditional build instructions and patching can be done by the dkms system, but considering on your case this may not be necessary.



          Walk-through



          Let's say you want to install a module for your fancy "Awesome Adaptor." You are given a source tarball awesome-20091211-v1.1.tgz.



          With DKMS, we tell DKMS how to do that for you by creating a dkms.conf file with the appropriate entries. For example, after we've unpacked the tarball:




          # cd awesome-20091211-v1.1/
          # touch dkms.conf
          # create dkms.conf file
          # vi dkms.conf



          Inside dkms.conf, we might add the lines:




          MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
          CLEAN="make -C src/ clean"
          BUILT_MODULE_NAME=awesome
          BUILT_MODULE_LOCATION=src/
          PACKAGE_NAME=awesome
          PACKAGE_VERSION=1.1
          REMAKE_INITRD=yes



          All directories are with respect to the location of the dkms.conf file. This tells DKMS




          1. The command to build the module (run make in the directory src/).

          2. The command to clean the source tree (run make clean in the directory src/).

          3. The name of the module without the .o or .ko extension. This may actually be an array of modules if multiple modules are built, see man dkms.

          4. Where DKMS can find the built module.

          5. The name and version DKMS should associate with the module(s).

          6. To remake the initrd image after installing the module.


          You can also add options to call scripts before or after build or install, provide additional (conditional) make commands, patch commands, etc. The dkms.conf is in fact sourced into a shell script, so a fair amount of trickery can be done if necessary. These options and more are described in the dkms.conf section in man dkms.



          Next, we install the module into DKMS by copying the module installation files into the kernel source tree /usr/src/- and tell DKMS about the new module:




          # ls
          README dkms.conf lib src
          # sudo cp -R . /usr/src/awesome-1.1
          # sudo dkms add -m awesome -v 1.1
          dkms does its thing...



          That's it! DKMS has now added our module to its list of modules to build for future kernel installations. To make sure it works and to install the module into our current kernel, we can instruct dkms to build and install the module:




          # sudo dkms build -m awesome -v 1.1
          dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
          # sudo dkms install -m awesome -v 1.1
          dkms does its thing.... module is copied into current kernel module tree



          With some luck, your module will be installed and reinstalled into future kernel updates.



          Examples



          The DKMS man page has helpful information on setting up your favorite kernel module for use with DKMS. It is not comprehensive documentation, but it will answer lots of questions. It may help you to note the following examples, even if the modules used are not the ones you want to setup:





          • RocketRaid - Two examples on how-to setup the Highpoint RocketRaid drivers RR26xx and RR62x with DKMS.




          From: help.ubuntu.com



          More information can be found here:




          • DKMS how-to with the latest Intel E1000E driver


          • DkmsDriverPackage. Tutorial based on two web-cam drivers: r5u870 (Sony Vaio MotionEye) and ov51x-jpeg (Playstation EyeToy and Hercules Deluxe)

          • Ubuntuforums nVidia driver how-to including DKMS module


          • Ubuntu man page (Documents some officially un-documented bits.)


          • Linux journal "Exploring Dynamic Kernel Module Support (DKMS)"






          share|improve this answer



















          • 1




            FWIW, the DKMS project has a new home on Github github.com/dell/dkms
            – DDay
            Dec 5 '17 at 20:44
















          21















          DKMS (Dynamic Kernel Module Support) package (http://linux.dell.com/dkms/) provides support for installing supplementary versions of kernel modules. The package compiles and installs into the kernel tree. Uninstalling restores the previous modules. By default, installation is into the current kernel tree, but any kernel tree can be selected with command-line options. Furthermore, DKMS is called automatically upon installation of new Ubuntu kernel-image packages, and therefore modules added to DKMS will be automatically carried across updates.



          Overview



          To use a module with DKMS, one places the module installation files (could be source code or binary) in /usr/src/-, along with a configuration file dkms.conf that tells DKMS how to build/configure the module and what its name is. Under more advanced scenarios, conditional build instructions and patching can be done by the dkms system, but considering on your case this may not be necessary.



          Walk-through



          Let's say you want to install a module for your fancy "Awesome Adaptor." You are given a source tarball awesome-20091211-v1.1.tgz.



          With DKMS, we tell DKMS how to do that for you by creating a dkms.conf file with the appropriate entries. For example, after we've unpacked the tarball:




          # cd awesome-20091211-v1.1/
          # touch dkms.conf
          # create dkms.conf file
          # vi dkms.conf



          Inside dkms.conf, we might add the lines:




          MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
          CLEAN="make -C src/ clean"
          BUILT_MODULE_NAME=awesome
          BUILT_MODULE_LOCATION=src/
          PACKAGE_NAME=awesome
          PACKAGE_VERSION=1.1
          REMAKE_INITRD=yes



          All directories are with respect to the location of the dkms.conf file. This tells DKMS




          1. The command to build the module (run make in the directory src/).

          2. The command to clean the source tree (run make clean in the directory src/).

          3. The name of the module without the .o or .ko extension. This may actually be an array of modules if multiple modules are built, see man dkms.

          4. Where DKMS can find the built module.

          5. The name and version DKMS should associate with the module(s).

          6. To remake the initrd image after installing the module.


          You can also add options to call scripts before or after build or install, provide additional (conditional) make commands, patch commands, etc. The dkms.conf is in fact sourced into a shell script, so a fair amount of trickery can be done if necessary. These options and more are described in the dkms.conf section in man dkms.



          Next, we install the module into DKMS by copying the module installation files into the kernel source tree /usr/src/- and tell DKMS about the new module:




          # ls
          README dkms.conf lib src
          # sudo cp -R . /usr/src/awesome-1.1
          # sudo dkms add -m awesome -v 1.1
          dkms does its thing...



          That's it! DKMS has now added our module to its list of modules to build for future kernel installations. To make sure it works and to install the module into our current kernel, we can instruct dkms to build and install the module:




          # sudo dkms build -m awesome -v 1.1
          dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
          # sudo dkms install -m awesome -v 1.1
          dkms does its thing.... module is copied into current kernel module tree



          With some luck, your module will be installed and reinstalled into future kernel updates.



          Examples



          The DKMS man page has helpful information on setting up your favorite kernel module for use with DKMS. It is not comprehensive documentation, but it will answer lots of questions. It may help you to note the following examples, even if the modules used are not the ones you want to setup:





          • RocketRaid - Two examples on how-to setup the Highpoint RocketRaid drivers RR26xx and RR62x with DKMS.




          From: help.ubuntu.com



          More information can be found here:




          • DKMS how-to with the latest Intel E1000E driver


          • DkmsDriverPackage. Tutorial based on two web-cam drivers: r5u870 (Sony Vaio MotionEye) and ov51x-jpeg (Playstation EyeToy and Hercules Deluxe)

          • Ubuntuforums nVidia driver how-to including DKMS module


          • Ubuntu man page (Documents some officially un-documented bits.)


          • Linux journal "Exploring Dynamic Kernel Module Support (DKMS)"






          share|improve this answer



















          • 1




            FWIW, the DKMS project has a new home on Github github.com/dell/dkms
            – DDay
            Dec 5 '17 at 20:44














          21












          21








          21







          DKMS (Dynamic Kernel Module Support) package (http://linux.dell.com/dkms/) provides support for installing supplementary versions of kernel modules. The package compiles and installs into the kernel tree. Uninstalling restores the previous modules. By default, installation is into the current kernel tree, but any kernel tree can be selected with command-line options. Furthermore, DKMS is called automatically upon installation of new Ubuntu kernel-image packages, and therefore modules added to DKMS will be automatically carried across updates.



          Overview



          To use a module with DKMS, one places the module installation files (could be source code or binary) in /usr/src/-, along with a configuration file dkms.conf that tells DKMS how to build/configure the module and what its name is. Under more advanced scenarios, conditional build instructions and patching can be done by the dkms system, but considering on your case this may not be necessary.



          Walk-through



          Let's say you want to install a module for your fancy "Awesome Adaptor." You are given a source tarball awesome-20091211-v1.1.tgz.



          With DKMS, we tell DKMS how to do that for you by creating a dkms.conf file with the appropriate entries. For example, after we've unpacked the tarball:




          # cd awesome-20091211-v1.1/
          # touch dkms.conf
          # create dkms.conf file
          # vi dkms.conf



          Inside dkms.conf, we might add the lines:




          MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
          CLEAN="make -C src/ clean"
          BUILT_MODULE_NAME=awesome
          BUILT_MODULE_LOCATION=src/
          PACKAGE_NAME=awesome
          PACKAGE_VERSION=1.1
          REMAKE_INITRD=yes



          All directories are with respect to the location of the dkms.conf file. This tells DKMS




          1. The command to build the module (run make in the directory src/).

          2. The command to clean the source tree (run make clean in the directory src/).

          3. The name of the module without the .o or .ko extension. This may actually be an array of modules if multiple modules are built, see man dkms.

          4. Where DKMS can find the built module.

          5. The name and version DKMS should associate with the module(s).

          6. To remake the initrd image after installing the module.


          You can also add options to call scripts before or after build or install, provide additional (conditional) make commands, patch commands, etc. The dkms.conf is in fact sourced into a shell script, so a fair amount of trickery can be done if necessary. These options and more are described in the dkms.conf section in man dkms.



          Next, we install the module into DKMS by copying the module installation files into the kernel source tree /usr/src/- and tell DKMS about the new module:




          # ls
          README dkms.conf lib src
          # sudo cp -R . /usr/src/awesome-1.1
          # sudo dkms add -m awesome -v 1.1
          dkms does its thing...



          That's it! DKMS has now added our module to its list of modules to build for future kernel installations. To make sure it works and to install the module into our current kernel, we can instruct dkms to build and install the module:




          # sudo dkms build -m awesome -v 1.1
          dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
          # sudo dkms install -m awesome -v 1.1
          dkms does its thing.... module is copied into current kernel module tree



          With some luck, your module will be installed and reinstalled into future kernel updates.



          Examples



          The DKMS man page has helpful information on setting up your favorite kernel module for use with DKMS. It is not comprehensive documentation, but it will answer lots of questions. It may help you to note the following examples, even if the modules used are not the ones you want to setup:





          • RocketRaid - Two examples on how-to setup the Highpoint RocketRaid drivers RR26xx and RR62x with DKMS.




          From: help.ubuntu.com



          More information can be found here:




          • DKMS how-to with the latest Intel E1000E driver


          • DkmsDriverPackage. Tutorial based on two web-cam drivers: r5u870 (Sony Vaio MotionEye) and ov51x-jpeg (Playstation EyeToy and Hercules Deluxe)

          • Ubuntuforums nVidia driver how-to including DKMS module


          • Ubuntu man page (Documents some officially un-documented bits.)


          • Linux journal "Exploring Dynamic Kernel Module Support (DKMS)"






          share|improve this answer















          DKMS (Dynamic Kernel Module Support) package (http://linux.dell.com/dkms/) provides support for installing supplementary versions of kernel modules. The package compiles and installs into the kernel tree. Uninstalling restores the previous modules. By default, installation is into the current kernel tree, but any kernel tree can be selected with command-line options. Furthermore, DKMS is called automatically upon installation of new Ubuntu kernel-image packages, and therefore modules added to DKMS will be automatically carried across updates.



          Overview



          To use a module with DKMS, one places the module installation files (could be source code or binary) in /usr/src/-, along with a configuration file dkms.conf that tells DKMS how to build/configure the module and what its name is. Under more advanced scenarios, conditional build instructions and patching can be done by the dkms system, but considering on your case this may not be necessary.



          Walk-through



          Let's say you want to install a module for your fancy "Awesome Adaptor." You are given a source tarball awesome-20091211-v1.1.tgz.



          With DKMS, we tell DKMS how to do that for you by creating a dkms.conf file with the appropriate entries. For example, after we've unpacked the tarball:




          # cd awesome-20091211-v1.1/
          # touch dkms.conf
          # create dkms.conf file
          # vi dkms.conf



          Inside dkms.conf, we might add the lines:




          MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
          CLEAN="make -C src/ clean"
          BUILT_MODULE_NAME=awesome
          BUILT_MODULE_LOCATION=src/
          PACKAGE_NAME=awesome
          PACKAGE_VERSION=1.1
          REMAKE_INITRD=yes



          All directories are with respect to the location of the dkms.conf file. This tells DKMS




          1. The command to build the module (run make in the directory src/).

          2. The command to clean the source tree (run make clean in the directory src/).

          3. The name of the module without the .o or .ko extension. This may actually be an array of modules if multiple modules are built, see man dkms.

          4. Where DKMS can find the built module.

          5. The name and version DKMS should associate with the module(s).

          6. To remake the initrd image after installing the module.


          You can also add options to call scripts before or after build or install, provide additional (conditional) make commands, patch commands, etc. The dkms.conf is in fact sourced into a shell script, so a fair amount of trickery can be done if necessary. These options and more are described in the dkms.conf section in man dkms.



          Next, we install the module into DKMS by copying the module installation files into the kernel source tree /usr/src/- and tell DKMS about the new module:




          # ls
          README dkms.conf lib src
          # sudo cp -R . /usr/src/awesome-1.1
          # sudo dkms add -m awesome -v 1.1
          dkms does its thing...



          That's it! DKMS has now added our module to its list of modules to build for future kernel installations. To make sure it works and to install the module into our current kernel, we can instruct dkms to build and install the module:




          # sudo dkms build -m awesome -v 1.1
          dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
          # sudo dkms install -m awesome -v 1.1
          dkms does its thing.... module is copied into current kernel module tree



          With some luck, your module will be installed and reinstalled into future kernel updates.



          Examples



          The DKMS man page has helpful information on setting up your favorite kernel module for use with DKMS. It is not comprehensive documentation, but it will answer lots of questions. It may help you to note the following examples, even if the modules used are not the ones you want to setup:





          • RocketRaid - Two examples on how-to setup the Highpoint RocketRaid drivers RR26xx and RR62x with DKMS.




          From: help.ubuntu.com



          More information can be found here:




          • DKMS how-to with the latest Intel E1000E driver


          • DkmsDriverPackage. Tutorial based on two web-cam drivers: r5u870 (Sony Vaio MotionEye) and ov51x-jpeg (Playstation EyeToy and Hercules Deluxe)

          • Ubuntuforums nVidia driver how-to including DKMS module


          • Ubuntu man page (Documents some officially un-documented bits.)


          • Linux journal "Exploring Dynamic Kernel Module Support (DKMS)"







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 21 '14 at 9:51

























          answered Jan 21 '14 at 9:21









          Rinzwind

          204k28388523




          204k28388523








          • 1




            FWIW, the DKMS project has a new home on Github github.com/dell/dkms
            – DDay
            Dec 5 '17 at 20:44














          • 1




            FWIW, the DKMS project has a new home on Github github.com/dell/dkms
            – DDay
            Dec 5 '17 at 20:44








          1




          1




          FWIW, the DKMS project has a new home on Github github.com/dell/dkms
          – DDay
          Dec 5 '17 at 20:44




          FWIW, the DKMS project has a new home on Github github.com/dell/dkms
          – DDay
          Dec 5 '17 at 20:44


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f408605%2fwhat-does-dkms-do-how-do-i-use-it%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido