{"id":4520,"date":"2013-10-04T10:35:15","date_gmt":"2013-10-04T02:35:15","guid":{"rendered":"http:\/\/blog.dword1511.info\/?p=4520"},"modified":"2013-10-04T10:35:15","modified_gmt":"2013-10-04T02:35:15","slug":"%e4%b8%ba-openwrt-%e7%bc%96%e8%af%91%e9%a2%9d%e5%a4%96%e7%9a%84%e5%86%85%e6%a0%b8%e6%a8%a1%e5%9d%97","status":"publish","type":"post","link":"http:\/\/blog.dword1511.info\/?p=4520","title":{"rendered":"\u4e3a OpenWRT \u7f16\u8bd1\u989d\u5916\u7684\u5185\u6838\u6a21\u5757"},"content":{"rendered":"<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5982\u679c\u60f3\u5728\u8def\u7531\u5668\u4e0a\u8dd1 OpenWRT \u5e76\u672a\u5305\u542b\u7684 RTL8188EU \u9a71\u52a8\u6a21\u5757\u8be5\u600e\u4e48\u529e\u5462\uff1f\u5728\u8fd9\u91cc\u7ed9\u51fa\u4e00\u79cd\u5feb\u6377\u4f46\u662f\u6bd4\u8f83 dirty \u7684\u529e\u6cd5\uff08<a href=\"http:\/\/wiki.openwrt.org\/doc\/devel\/packages#creating.packages.for.kernel.modules\" target=\"_blank\">\u5426\u5219\u5e94\u8be5\u81ea\u5df1\u5199\u4e2a package <\/a>\uff09\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u9996\u5148\u5f97\u6709\u7f16\u8bd1\u56fa\u4ef6\u65f6\u7559\u4e0b\u7684 kernel \u7684\u6e90\u7801\uff0c\u5305\u62ec\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u751f\u6210\u7684\u4e00\u4e9b\u6587\u4ef6\u3002<\/p>\n<p>\u4e0b\u9762\u5047\u5b9a OpenWRT \u7684\u6e90\u7801\u76ee\u5f55\u5728 <em>\/some\/path\/openwrt<\/em> \uff0c\u5185\u6838\u76ee\u5f55\u4ee5\u53ca Staging DIR \u5206\u522b\u4e3a\u5176\u4e0b\u7684\u00a0<em>build_dir\/target-mips_r2_uClibc-x.x.x.x\/linux-target_generic\/linux-x.x.x<\/em> \u548c\u00a0<em>staging_dir<\/em> \uff0cToolchain \u7f16\u8bd1\u597d\u540e\u4f1a\u5b58\u653e\u5728 Staging DIR \u4e0b\u7684\u00a0<em>toolchain-mips_r2_gcc-x.x-linaro_uClibc-x.x.x.x<\/em> \u76ee\u5f55\u91cc\uff0c\u524d\u7f00\u4e3a <em>mips-openwrt-linux-<\/em>\u00a0\u3002\u76ee\u6807\u673a\u5668\u6307\u4ee4\u96c6\u4e3a MIPS32 R2 \u3002<\/p>\n<p>\u90a3\u4e48\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u5185\u6838\u9a71\u52a8\u7684\u76ee\u5f55\u4e0b\u5199\u4e00\u4e2a\u811a\u672c\u6765\u5e2e\u52a9\u7f16\u8bd1\uff1a<\/p>\n<pre class=\"brush: bash; title: \u4ee3\u7801; notranslate\" title=\"\u4ee3\u7801\">\r\n#!\/bin\/sh\r\nPREFIX=&quot;\/media\/study\/wrt\/openwrt_trunk&quot;\r\nARCH=mips\r\nKSRC=&quot;$PREFIX\/build_dir\/target-mips_r2_uClibc-0.9.33.2\/linux-ar71xx_generic\/linux-3.10.9&quot;\r\nSTAGING_DIR=&quot;$PREFIX\/staging_dir&quot;\r\nTOOLCHAIN_DIR=&quot;$STAGING_DIR\/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2\/bin&quot;\r\nCROSS_COMPILE=&quot;mips-openwrt-linux-&quot;\r\n\r\nexport STAGING_DIR=$STAGING_DIR\r\nexport PATH=$TOOLCHAIN_DIR:$PATH\r\nmake clean\r\nmake ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE KSRC=$KSRC\r\n<\/pre>\n<p>\u4e00\u822c\u60c5\u51b5\u4e0b\u5382\u5546\u7684 Makefile \u90fd\u4f1a\u5e2e\u4f60\u4f20\u9012 <em>ARCH<\/em> \u3001<em>CROSS_COMPILE<\/em> \u548c <em>KSRC<\/em> \u8fd9\u51e0\u4e2a\u53d8\u91cf\uff0c\u5982 rtl8188eu \u7684\u9a71\u52a8\uff08 <a href=\"https:\/\/github.com\/lwfinger\/rtl8188eu.git\" target=\"_blank\">https:\/\/github.com\/lwfinger\/rtl8188eu.git<\/a> \uff09\u3002\u6709\u7684\u65f6\u5019\u9700\u8981\u9605\u8bfb Makefile \u5e76\u505a\u4e9b\u4fee\u6539\u3002<\/p>\n<p>\u6700\u540e\u628a\u751f\u6210\u7684\u5185\u6838\u6a21\u5757 scp \u5230\u88c5\u6709\u5bf9\u5e94\u56fa\u4ef6\u7684\u8def\u7531\u5668\u4e0a\u7684 \/lib\/modules\/&lt;kernel_version&gt;\/ \u4e0b\u5373\u53ef\u3002\u4f7f\u7528 insmod \u624b\u52a8\u88c5\u5165\u6216\u8005\u5728\u00a0\/etc\/modules.d\/ \u4e0b\u521b\u5efa\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u6765\u5b8c\u6210\u5f00\u673a\u81ea\u52a8\u52a0\u8f7d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5982\u679c\u60f3\u5728\u8def\u7531\u5668\u4e0a\u8dd1 OpenWRT \u5e76\u672a\u5305\u542b\u7684 RTL8188EU \u9a71\u52a8\u6a21\u5757\u8be5\u600e\u4e48\u529e\u5462\uff1f\u5728\u8fd9\u91cc\u7ed9\u51fa\u4e00 &hellip; <a href=\"http:\/\/blog.dword1511.info\/?p=4520\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u4e3a OpenWRT \u7f16\u8bd1\u989d\u5916\u7684\u5185\u6838\u6a21\u5757<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[14,11],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=\/wp\/v2\/posts\/4520"}],"collection":[{"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4520"}],"version-history":[{"count":4,"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=\/wp\/v2\/posts\/4520\/revisions"}],"predecessor-version":[{"id":4536,"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=\/wp\/v2\/posts\/4520\/revisions\/4536"}],"wp:attachment":[{"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4520"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.dword1511.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}