{"id":9869,"date":"2017-11-19T22:07:23","date_gmt":"2017-11-20T03:07:23","guid":{"rendered":"httpss:\/\/www.powenko.com\/wordpress\/?p=9869"},"modified":"2017-11-21T01:15:42","modified_gmt":"2017-11-21T06:15:42","slug":"linux-driver-%e8%aa%b2%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.powenko.com\/wordpress\/?p=9869","title":{"rendered":"linux driver \u8ab2\u7a0b"},"content":{"rendered":"<p>linux driver \u8ab2\u7a0b<\/p>\n<p>httpss:\/\/technote.thispage.me\/index.php\/2016\/12\/20\/ubuntu-16-04-kernel-compile-on-default-setting\/<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>$ sudo su<\/p>\n<p># apt-get update<\/p>\n<p>#\u00a0apt-get source linux-image-$(uname -r)<\/p>\n<p>#\u00a0cd linux-lts-xenial-4.4.0\/<\/p>\n<p># cp \/boot\/config-4.4.0-31-generic\u00a0 \u00a0 .config<\/p>\n<p>#\u00a0ls -al<\/p>\n<p># apt-get install kernel-package<\/p>\n<p># make menuconfig<\/p>\n<p>#\u00a0make-kpkg\u00a0 -j2 &#8211;initrd &#8211;append-to-version=&#8211;test-kernel kernel_image<br \/>\n$ sudo apt-get install ssh<\/p>\n<p>&nbsp;<\/p>\n<h3>Linux API \u6587\u4ef6<\/h3>\n<p>&nbsp;<\/p>\n<p>httpsss:\/\/www.kernel.org\/doc\/htmldocs\/kernel-api\/index.html<\/p>\n<p>&nbsp;<\/p>\n<h3>\u5e38\u898b\u7684\u7de8\u8b6f\u932f\u8aa4\uff1a<\/h3>\n<p>&nbsp;<\/p>\n<ul>\n<li>error: implicit declaration of function \u2018kfree<br \/>\n\u6dfb\u52a0#include &lt;linux\/slab.h&gt;<\/li>\n<li>error: implicit declaration of function \u2018create_proc_read_entry\u2019<br \/>\n\u52a0\u4e0a#include &lt;linux\/proc_fs.h&gt; \u00a0(\u6c92\u7528)<\/li>\n<li>\u00a0error: \u2018struct tty_driver\u2019 has no member named \u2018write\u2019<br \/>\n\u8acb\u770b\u3000httpsss:\/\/ithelp.ithome.com.tw\/articles\/10161491<\/li>\n<li>unrecognized ELF data encoding 101:<\/li>\n<li>CFLAGS \u00a0\u00a0it to use ccflags-y \u00a0Stop<br \/>\nccflags-y<\/li>\n<li>\u00a0implicit declaration of function \u2018mdelay\u2019<br \/>\n#include &lt;linux\/delay.h&gt;<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux driver \u8ab2\u7a0b httpss:\/\/technote.thispage.me\/index.php [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124],"tags":[],"class_list":["post-9869","post","type-post","status-publish","format-standard","hentry","category-124"],"_links":{"self":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/9869"}],"collection":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9869"}],"version-history":[{"count":16,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/9869\/revisions"}],"predecessor-version":[{"id":9885,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/9869\/revisions\/9885"}],"wp:attachment":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}