{"id":7,"date":"2008-05-20T17:00:03","date_gmt":"2008-05-20T15:00:03","guid":{"rendered":"http:\/\/valentijn.sessink.nl\/?p=7"},"modified":"2008-07-18T16:08:58","modified_gmt":"2008-07-18T14:08:58","slug":"walkera-helicopters-on-linux-part-2","status":"publish","type":"post","link":"https:\/\/valentijn.sessink.nl\/?p=7","title":{"rendered":"Walkera helicopters on Linux, part 2"},"content":{"rendered":"<p>In part one we built a kernel module and put it somewhere in the filesystem. In this part, we&#8217;re going to tell the <em>inputattach<\/em> utility what to do with it.<\/p>\n<p><!--more--><\/p>\n<p>I assume you followed the directions in part 1, as you will need the <em>build-essentials<\/em> and the <em>debian-helper<\/em>, <em>devscripts<\/em> and <em>fakeroot<\/em> packages to be able to build a new <em>inputattach<\/em> utility.<\/p>\n<p>First, get the source code for inputattach:<br \/>\n<code>$ apt-get source inputattach<\/code><\/p>\n<p>Also, download the patch file. You may cut and paste it from <a href=\"http:\/\/www.mail-archive.com\/linux-input@vger.kernel.org\/msg00276.html\">http:\/\/www.mail-archive.com\/ &#8230; \/msg00276.html<\/a>, but you can also download <a href=\"https:\/\/valentijn.sessink.nl\/wp-content\/uploads\/2008\/05\/inputattach-123-zhenhua.patch\">inputattach-123-zhenhua.patch<\/a>.<br \/>\nthen go to the subdirectory that contains the code, and type<br \/>\n<code>$ patch &lt; ..\/inputattach-123-zhenhua.patch<\/code><\/p>\n<p>Please note that this patch also contains a &#8220;define&#8221; statement for the SERIO_ZHENHUA constant. This should normally not be necessary, but as we compiled a half-baked kernel in part 1, we need this. <strong>This is bad coding practice, don&#8217;t run your nuclear reactor on this<\/strong> (even though the GPL permits you to do that).<\/p>\n<p>Anyway, now change the Debian Release number:<\/p>\n<p><code>EMAIL=your.mail@address.invalid dch -D UNRELEASED -n<\/code><\/p>\n<p>Change the last version number to a &#8220;0&#8221; to be safe. This forces dpkg to upgrade your inputattach utility, should an upgrade be available. Also, we change the target distribution to UNRELEASED, as we won&#8217;t put this file on the internet.<\/p>\n<p>Now build the package:<\/p>\n<p><code>debian\/rules build &amp;&amp; fakeroot debian\/rules binary<\/code><\/p>\n<p>We have our software ready now; you only need to install it with<\/p>\n<p><code>$ sudo dpkg -i ..\/inputattach_1.23-0ubuntu2.0_i386.deb<\/code><\/p>\n<p>You are now ready for step 3, <span style=\"text-decoration: line-through;\">profit<\/span> the Heli-X helicopter simulator.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In part one we built a kernel module and put it somewhere in the filesystem. In this part, we&#8217;re going to tell the inputattach utility what to do with it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[8,10,5,9,7,4],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-happy-hacking","tag-8","tag-hardy-heron","tag-heli-x","tag-linux","tag-ubuntu","tag-walkera"],"_links":{"self":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":0,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions"}],"wp:attachment":[{"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/valentijn.sessink.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}