{"id":1273,"date":"2020-01-02T10:15:52","date_gmt":"2020-01-02T02:15:52","guid":{"rendered":"http:\/\/iqotom.com\/?p=1273"},"modified":"2020-05-18T17:10:20","modified_gmt":"2020-05-18T09:10:20","slug":"openwrt-%e7%ae%80%e5%8d%95%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/iqotom.com\/?p=1273","title":{"rendered":"OpenWrt \u7b80\u5355\u4ecb\u7ecd"},"content":{"rendered":"\n<p>\u539f\u6587\uff1a <a href=\"https:\/\/blog.csdn.net\/hongwei_1990\/article\/details\/93791798\">https:\/\/blog.csdn.net\/hongwei_1990\/article\/details\/93791798<\/a> <\/p>\n\n\n\n<p> \u3000\u3000OpenWrt\uff08\u5b98\u7f51\u00a0<a href=\"http:\/\/www.openwrt.org\/\">www.openwrt.org<\/a>\uff09\u662f\u4e00\u4e2a\u5d4c\u5165\u5f0f\u7684 Linux \u53d1\u884c\u7248\uff0c\u76ee\u524d\u5e38\u7528\u5728\u8def\u7531\u5668\u4e0a\u3002\u5b83\u662f\u4e00\u4e2a\u9ad8\u5ea6\u6a21\u5757\u5316\u3001\u9ad8\u5ea6\u81ea\u52a8\u5316\u7684\u5d4c\u5165\u5f0f Linux \u7cfb\u7edf\uff0c\u62e5\u6709\u5f3a\u5927\u7684<code>\u7f51\u7edc\u7ec4\u4ef6<\/code>\u548c<code>\u6269\u5c55\u6027<\/code>\u3002 <br>\u3000\u3000 OpenWrt \u4e0d\u540c\u4e8e\u5176\u4ed6\u8bb8\u591a\u7528\u4e8e\u8def\u7531\u5668\u7684\u53d1\u884c\u7248\uff08\u4e3b\u6d41\u8def\u7531\u5668\u56fa\u4ef6\u6709 <strong>DD-WRT\uff0cTomato\uff0cOpenWrt<\/strong> \u4e09\u7c7b\uff09\uff0c\u5b83\u662f\u4e00\u4e2a\u4ece\u96f6\u5f00\u59cb\u7f16\u5199\u7684\u3001\u529f\u80fd\u9f50\u5168\u7684\u3001\u5bb9\u6613\u4fee\u6539\u7684<code>\u8def\u7531\u5668<\/code>\u64cd\u4f5c\u7cfb\u7edf\u3002 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001OpenWrt \u4f18\u70b9<\/h2>\n\n\n\n<p>\u3000\u3000\u901a\u8fc7 OpenWrt \u5feb\u901f\u6784\u5efa\u4e00\u4e2a\u5e94\u7528\u5e73\u53f0\uff0cOpenWrt \u4ece\u4ea4\u53c9\u7f16\u8bd1\u5668\uff0c\u5230 Linux \u5185\u6838\uff0c\u518d\u5230\u6587\u4ef6\u7cfb\u7edf\u751a\u81f3 Bootloader \u90fd\u6574\u5408\u5728\u4e86\u4e00\u8d77\uff0c\u5f62\u6210\u4e86\u4e00\u4e2aSDK\u73af\u5883\u3002\u5176\u591a\u8fbe 3000 \u591a\u79cd\u8f6f\u4ef6\u5305\uff08\u6570\u91cf\u8fd8\u5728\u589e\u52a0\uff09\uff0c\u56ca\u62ec\u4ece\u5de5\u5177\u94fe\uff08Toolchain\uff09\uff0c\u5230\u5185\u6838\uff08<a href=\"https:\/\/www.kernel.org\/\">Linux Kernel<\/a>\uff09\uff0c\u5230\u8f6f\u4ef6\u5305\uff08Packages\uff09\uff0c\u518d\u5230\u6839\u6587\u4ef6\u7cfb\u7edf\uff08Rootfs\uff09\u6574\u4e2a\u4f53\u7cfb\uff0c\u4f7f\u5f97\u7528\u6237\u53ea\u9700\u7b80\u5355\u7684\u4e00\u4e2amake\u547d\u4ee4\u5373\u53ef\u65b9\u4fbf\u5feb\u901f\u5730\u5b9a\u5236\u4e00\u4e2a\u5177\u6709\u7279\u5b9a\u529f\u80fd\u7684\u5d4c\u5165\u5f0f\u7cfb\u7edf\u6765\u5236\u4f5c\u56fa\u4ef6\uff0c\u5927\u5927\u51cf\u5c11\u4e86\u5d4c\u5165\u5f0f\u8f6f\u4ef6\u5f00\u53d1\u7684\u5de5\u5e8f\u3002<br> \u3000\u3000\u5f53\u4f60\u719f\u6089\u8fd9\u4e9b\u5d4c\u5165\u5f0f Linux \u7684\u57fa\u672c\u5f00\u53d1\u6d41\u7a0b\u540e\u4f60\u4e0d\u518d\u5c40\u9650\u4e8eMIPS\u5904\u7406\u5668\u548c\u65e0\u7ebf\u8def\u7531\u5668\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u5728\u5176\u5b83\u5904\u7406\u5668\uff0c\u6216\u8005\u975e\u65e0\u7ebf\u8def\u7531\u5668\u7684\u7cfb\u7edf\u79fb\u690d\u5d4c\u5165\u5f0f Linux\uff0c\u5b9a\u5236\u5408\u9002\u81ea\u5df1\u7684\u5e94\u7528\u8f6f\u4ef6\uff0c\u5e76\u5efa\u7acb\u4e00\u4e2a\u5b8c\u6574\u7684\u5d4c\u5165\u5f0f\u4ea7\u54c1\u3002<br>\u3000\u3000 OpenWrt \u7684\u6210\u529f\u4e4b\u5904\u8fd8\u5728\u4e8e\u5b83\u7684\u6587\u4ef6\u7cfb\u7edf\u662f\u53ef\u5199\u7684\uff0c\u5f00\u53d1\u8005\u65e0\u9700\u5728\u6bcf\u4e00\u6b21\u4fee\u6539\u540e\u91cd\u65b0\u7f16\u8bd1\u7cfb\u7edf\uff0c\u5e76\u4e14\u53ef\u4ee5\u50cf PC \u673a\u4e0a\u7684 Linux \u7cfb\u7edf\u4e00\u6837\uff0c\u7528\u547d\u4ee4\u5b89\u88c5\u4e00\u4e9b\u5b89\u88c5\u5305\uff0c\u4e0d\u7528\u624b\u52a8\u914d\u7f6e\uff0c\u8fd9\u4e9b\u90fd\u4ee4\u5b83\u66f4\u50cf\u4e00\u4e2a\u5c0f\u578b\u7684 Linux \u7535\u8111\u7cfb\u7edf\u3002 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001OpenWrt \u7248\u672c\u53d1\u5c55<\/h2>\n\n\n\n<p> \u3000\u3000OpenWrt \u6240\u652f\u6301\u7684\u5e73\u53f0\u5305\u62ec\uff1aBroadcom\u7684SoC\uff0cARM\uff0cPowerPC\uff0cMIPS 24K R2\uff0cx86 \u3002\u5728\u8f6f\u4ef6\u5e94\u7528\u4e0a\u51fa\u73b0\u4e86\u4ee5&nbsp;<code>LuCi<\/code>&nbsp;\u8ddf&nbsp;<code>Webif<\/code>&nbsp;\u4e3a\u9996\u7684 UI \u4ee5\u53ca\u5404\u79cd\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002 <\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\u5e8f\u53f7<\/td><td>\u7248\u672c<\/td><td>\u53d1\u5e03\u65e5\u671f<\/td><td>\u4ee3\u53f7<\/td><\/tr><tr><td>1<\/td><td>10.03.1<\/td><td> 2011\/12<\/td><td> Backfire <\/td><\/tr><tr><td>2<\/td><td>12.09<\/td><td> 2013\/4<\/td><td> Attitude Adjustment <\/td><\/tr><tr><td>3<\/td><td>14.07<\/td><td> 2014\/10 <\/td><td> Barrier Breaker <\/td><\/tr><tr><td>4<\/td><td>15.05<\/td><td> 2015\/9 <\/td><td> Chaos Calmer <\/td><\/tr><tr><td>5<\/td><td>15.05.1<\/td><td> 2016\/3<\/td><td> Chaos Calmer  <\/td><\/tr><tr><td>6<\/td><td>18.06<\/td><td>2018\/7<\/td><td> Chaos Calmer  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001OpenWrt\u6e90\u7801<\/h2>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\u5e8f\u53f7<\/td><td>\u76ee\u5f55\u548c\u6587\u4ef6<\/td><td>\u63cf\u8ff0<\/td><\/tr><tr><td>1<\/td><td><code>\/config<\/code><\/td><td>\u5b58\u653e\u7740\u6574\u4e2a\u7cfb\u7edf\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr><tr><td>2<\/td><td><code>\/docs<\/code><\/td><td>\u5305\u542b\u4e86\u6574\u4e2a\u5bbf\u4e3b\u673a\u7684\u6587\u4ef6\u6e90\u7801\u7684\u4ecb\u7ecd, \u91cc\u9762\u8fd8\u6709Makefile \u4e3a\u76ee\u6807\u7cfb\u7edf\u751f\u6210 <strong>docs<\/strong>\u3002<br>\u4f7f\u7528<code>make -C docs\/<\/code>\u53ef\u4ee5\u4e3a\u76ee\u6807\u7cfb\u7edf\u751f\u6210\u6587\u6863<\/td><\/tr><tr><td>3<\/td><td><code>\/feeds<\/code><\/td><td>\u4e0b\u8f7d\u7ba1\u7406\u8f6f\u4ef6\u5305\u7684<br>\u9ed8\u8ba4\u7684<strong>feeds<\/strong>\u4e0b\u8f7d\u6709<code>packages\u3001management\u3001luci\u3001routing\u3001telephony<\/code><\/td><\/tr><tr><td>4<\/td><td><code>\/include<\/code><\/td><td>OpenWrt \u7684\u5f88\u591a<strong>Makefile<\/strong>\u90fd\u5b58\u653e\u5728\u8fd9\u91cc\uff0c\u6587\u4ef6\u540d\u4e3a<code>*.mk<\/code>;\u8fd9\u91cc\u7684\u6587\u4ef6\u662f\u5728<strong>Makefile<\/strong>\u91cc\u88ab<code>include<\/code>\u7684\uff0c\u7c7b\u4f3c\u4e8e\u5e93\u6587\u4ef6<br> \u8fd9\u4e9b\u6587\u4ef6\u5b9a\u4e49\u4e86\u7f16\u8bd1\u8fc7\u7a0b<\/td><\/tr><tr><td>5<\/td><td><code>\/package<\/code><\/td><td>\u5b58\u653e\u4e86 <strong>OpenWrt <\/strong>\u7cfb\u7edf\u4e2d\u9002\u7528\u7684\u8f6f\u4ef6\u5305\uff0c\u5305\u542b\u9488\u5bf9\u5404\u4e2a\u8f6f\u4ef6\u5305\u7684<code>Makefile<\/code><\/td><\/tr><tr><td>6<\/td><td><code>\/scripts<\/code><\/td><td>\u5b58\u653e\u4e86\u4e00\u4e9b\u811a\u672c\uff0c\u4f7f\u7528\u4e86 <code>bash\uff0cPython\uff0cperl<\/code> \u7b49\u591a\u79cd\u811a\u672c\u8bed\u8a00<br>\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u7528\u4e8e\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\u7ba1\u7406\u7684<code>feeds<\/code>\u6587\u4ef6\u4e5f\u662f\u5728\u8fd9\u4e2a\u76ee\u5f55\u5f53\u4e2d<br>\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528\u5230\u7684\u811a\u672c\u4e5f\u7edf\u4e00\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e2d<\/td><\/tr><tr><td>7<\/td><td><code>\/target<\/code><\/td><td><strong>OpenWrt<\/strong> \u7684\u6e90\u7801\u53ef\u4ee5\u7f16\u8bd1\u51fa\u5404\u4e2a\u5e73\u53f0\u9002\u7528\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u5404\u5e73\u53f0\u5728\u8fd9\u4e2a\u76ee\u5f55\u91cc\u5b9a\u4e49\u4e86<code>firmware<\/code>\u548c<code>kernel<\/code>\u7684\u7f16\u8bd1\u8fc7\u7a0b<\/td><\/tr><tr><td>8<\/td><td><code>\/toolchain<\/code><\/td><td>\u5b58\u653e\u7684\u5c31\u662f\u7f16\u8bd1\u4ea4\u53c9\u7f16\u8bd1\u94fe\u7684\u8f6f\u4ef6\u5305<br>\u5305\u62ec\uff1a<code>binutils\uff0cgcc\uff0clibc<\/code>\u7b49\u7b49<\/td><\/tr><tr><td>9<\/td><td><code>\/tools<\/code><\/td><td>\u7f16\u8bd1\u65f6\uff0c\u4e3b\u673a\u9700\u8981\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u8f6f\u4ef6\uff0c<code>tools<\/code> \u91cc\u5305\u542b\u4e86\u83b7\u53d6\u548c\u7f16\u8bd1\u8fd9\u4e9b\u5de5\u5177\u7684\u547d\u4ee4<br>\u8f6f\u4ef6\u5305\u91cc\u9762\u6709<strong>Makefile<\/strong>\u6587\u4ef6\uff0c\u6709\u7684\u8fd8\u5305\u542b\u4e86<code>patch<\/code><br>\u6bcf\u4e2a<strong>Makefile<\/strong>\u5f53\u4e2d\u90fd\u6709\u4e00\u53e5<code>$(eval $(call HostBuild))<\/code>\uff0c\u8fd9\u8868\u660e\u7f16\u8bd1\u8fd9\u4e2a\u5de5\u5177\u662f\u4e3a\u4e86\u5728\u4e3b\u673a\u4e0a\u4f7f\u7528\u7684<\/td><\/tr><tr><td>10<\/td><td><code>Config.in<\/code><\/td><td>\u5728<code>include\/toplevel.mk<\/code>\u4e2d\u53ef\u4ee5\u770b\u5230\uff0c\u8fd9\u662f\u548c<code>make menuconfig<\/code>\u76f8\u5173\u8054\u7684\u6587\u4ef6<\/td><\/tr><tr><td>11<\/td><td><code>feeds.conf.default<\/code><\/td><td>\u53ef\u4ee5\u914d\u7f6e\u4e0b\u8f7d\u7b2c\u4e09\u65b9\u4e00\u4e9b\u8f6f\u4ef6\u5305\u65f6\u6240\u4f7f\u7528\u7684\u5730\u5740<\/td><\/tr><tr><td>12<\/td><td><code>Makefile<\/code><\/td><td>\u5728\u9876\u5c42\u76ee\u5f55\u6267\u884c<code>make<\/code>\u547d\u4ee4\u7684\u5165\u53e3\u6587\u4ef6<\/td><\/tr><tr><td>13<\/td><td><code>rules.mk<\/code><\/td><td>\u5b9a\u4e49\u4e86<strong>Makefile<\/strong>\u4e2d\u4f7f\u7528\u7684\u4e00\u4e9b\u901a\u7528\u53d8\u91cf\u548c\u51fd\u6570<\/td><\/tr><tr><td>14<\/td><td><code>LICENSE<\/code><\/td><td>\u8f6f\u4ef6\u8bb8\u53ef\u8bc1<\/td><\/tr><tr><td>15<\/td><td><code>READNE<\/code><\/td><td>\u8f6f\u4ef6\u57fa\u672c\u8bf4\u660e\uff1a\u63cf\u8ff0\u4e86\u7f16\u8bd1\u8f6f\u4ef6\u7684\u57fa\u672c\u8fc7\u7a0b\u548c\u4f9d\u8d56\u6587\u4ef6<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>\n\n\u7f16\u8bd1\u4e00\u6b21 OpenWrt \u6e90\u7801\u540e\uff0c\u4f1a\u51fa\u73b0\u4e00\u4e9b\u65b0\u7684\u76ee\u5f55\uff1a\n\n<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\u5e8f\u53f7<\/td><td>\u76ee\u5f55<\/td><td>\u63cf\u8ff0<\/td><\/tr><tr><td>1<\/td><td><code>\/build_dir\/host<\/code><\/td><td>\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\u7f16\u8bd1\u4e3b\u673a\u4f7f\u7528\u7684\u5de5\u5177\u8f6f\u4ef6<\/td><\/tr><tr><td>2<\/td><td><code>\/build_dir\/target-mipsel_xxx<\/code><\/td><td>\u5728\u6b64\u7f16\u8bd1\u76ee\u6807\u5e73\u53f0\u7684\u76ee\u6807\u6587\u4ef6\uff0c\u5305\u62ec\u5404\u4e2a\u8f6f\u4ef6\u5305\u548c\u5185\u6838\u6587\u4ef6<\/td><\/tr><tr><td>3<\/td><td><code>\/build_dir\/toolchain-mipsel_<\/code><\/td><td>\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\u7f16\u8bd1<a href=\"https:\/\/baike.baidu.com\/item\/%E4%BA%A4%E5%8F%89%E5%B7%A5%E5%85%B7%E9%93%BE\/2503696?fr=aladdin\">\u4ea4\u53c9\u5de5\u5177\u94fe<\/a><\/td><\/tr><tr><td>4<\/td><td><code>\/bin<\/code><\/td><td>\u4fdd\u5b58\u7f16\u8bd1\u5b8c\u6210\u540e\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6<br>\u5305\u62ec\uff1a\u5b8c\u6574\u7684 <strong>bin<\/strong> \u6587\u4ef6\uff0c\u6240\u6709\u7684 <strong>ipk<\/strong> \u6587\u4ef6<\/td><\/tr><tr><td>5<\/td><td><code>\/dl<\/code><\/td><td>\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u7684\u5f88\u591a\u8f6f\u4ef6<br>\u521a\u5f00\u59cb\u4e0b\u8f7d\u6e90\u7801\u5e76\u6ca1\u6709\u5305\u542b\uff0c\u800c\u662f\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4ece\u5176\u4ed6\u670d\u52a1\u5668\u4e0b\u8f7d\u7684;\u8fd9\u91cc\u662f\u7edf\u4e00\u7684\u4fdd\u5b58\u76ee\u5f55<\/td><\/tr><tr><td>6<\/td><td><code>\/staging_dir<\/code><\/td><td>\u7528\u4e8e\u4fdd\u5b58\u5728<code>build_dir<\/code>\u76ee\u5f55\u4e2d\u7f16\u8bd1\u5b8c\u6210\u7684\u8f6f\u4ef6<br>\u6240\u4ee5\u8fd9\u91cc\u4e5f\u548c<code>build_dir<\/code>\u6709\u540c\u6837\u7684\u5b50\u76ee\u5f55\u7ed3\u6784<br>\u6bd4\u5982\uff1a\u5728<code>target-XXX<\/code>\u6587\u4ef6\u5939\u4e2d\u4fdd\u5b58\u4e86\u76ee\u6807\u5e73\u53f0\u7f16\u8bd1\u597d\u7684\u5934\u6587\u4ef6\uff0c\u5e93\u6587\u4ef6<br>\u5728\u6211\u4eec\u5f00\u53d1\u81ea\u5df1\u7684ipk \u6587\u4ef6\u65f6\uff0c\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u9884\u5904\u7406\u5934\u6587\u4ef6\uff0c\u94fe\u63a5\u52a8\u6001\u5e93\uff0c\u9759\u6001\u5e93 \u90fd\u662f\u5230\u8fd9\u4e2a\u5b50\u6587\u4ef6\u5939\u4e2d<\/td><\/tr><tr><td>7<\/td><td><code>\/tmp<\/code><\/td><td>\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u6709\u5927\u91cf\u4e2d\u95f4\u4e34\u65f6\u6587\u4ef6\u9700\u8981\u4fdd\u5b58\uff0c\u90fd\u662f\u5728\u8fd9\u91cc<\/td><\/tr><tr><td>8<\/td><td><code>\/logs<\/code><\/td><td>\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u51fa\u9519\u7684\u4fe1\u606f\uff0c\u53ea\u6709\u5f53\u7f16\u8bd1\u51fa\u9519\u4e86\u624d\u4f1a\u51fa\u73b0<\/td><\/tr><\/tbody><\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\uff1a https:\/\/blog.csdn.net\/hongwei_1990\/article\/details\/\u2026 <span class=\"read-more\"><a href=\"https:\/\/iqotom.com\/?p=1273\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":1277,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[11,13],"_links":{"self":[{"href":"https:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1273"}],"collection":[{"href":"https:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1273"}],"version-history":[{"count":5,"href":"https:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1273\/revisions"}],"predecessor-version":[{"id":1279,"href":"https:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1273\/revisions\/1279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/media\/1277"}],"wp:attachment":[{"href":"https:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}