<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dkms on Chris J Arges</title><link>https://chrisarges.net/tags/dkms/</link><description>Recent content in Dkms on Chris J Arges</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 05 Sep 2013 07:10:00 -0700</lastBuildDate><atom:link href="https://chrisarges.net/tags/dkms/index.xml" rel="self" type="application/rss+xml"/><item><title>building a proper debian source package with dkms</title><link>https://chrisarges.net/posts/2013-09-05-building-proper-debian-source-package/</link><pubDate>Thu, 05 Sep 2013 07:10:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-09-05-building-proper-debian-source-package/</guid><description>&lt;p&gt;How can one use DKMS to build a proper debian source package? The &lt;code&gt;mkdsc&lt;/code&gt;&#10;command will actually generate one automatically, but there are a few more&#10;steps to simplify it, and bring it up to date.&lt;/p&gt;&#10;&lt;p&gt;First follow the steps &lt;a href="https://wiki.ubuntu.com/Kernel/Dev/DKMSPackaging"&gt;here&lt;/a&gt; for setting up a DKMS package. Make sure you&#10;can build it using dkms. Then do the following:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#First pull in some dependencies as necessary&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install devscripts debhelper&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Create the debian source package&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo dkms mkdsc -m hello -v 0.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Create a directory to work in, and let’s copy those files into it&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir ~/dsc &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; cd ~/dsc&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cp /var/lib/dkms/hello/0.1/dsc/* .&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Extract the .dsc to be able to edit the directory&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dpkg-source -x hello-dkms_0.1.dsc &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd hello-dkms-0.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we run debuild -uc -us, we see a few lintian errors and warnings:&lt;/p&gt;</description></item><item><title>building a binary debian kernel module package with dkms</title><link>https://chrisarges.net/posts/2013-07-23-building-binary-debian-kernel-module/</link><pubDate>Tue, 23 Jul 2013 14:40:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-07-23-building-binary-debian-kernel-module/</guid><description>&lt;p&gt;DKMS packaging works great for building out of tree kernel modules. However,&#10;what do you do when you need to install to a machine without a compiler? You&#10;can accompish this by using DKMS&amp;rsquo;s &lt;code&gt;mkdriverdisk&lt;/code&gt; functionality.&lt;/p&gt;&#10;&lt;p&gt;First follow the steps &lt;a href="https://wiki.ubuntu.com/Kernel/Dev/DKMSPackaging"&gt;here&lt;/a&gt; for setting up a proper DKMS package.&lt;/p&gt;&#10;&lt;p&gt;After you&amp;rsquo;ve built the module successfully, you can use the following bash&#10;script to extract the .deb installer from the driverdisk. This way you can copy&#10;the deb file to the target machine and install. You must ensure that &lt;code&gt;$(uname -rm)&lt;/code&gt;&#10;on the target machine matches the build machine.&lt;/p&gt;</description></item></channel></rss>