{"id":91,"date":"2025-11-12T19:20:07","date_gmt":"2025-11-12T11:20:07","guid":{"rendered":"https:\/\/blog.dream-cast.com.cn\/?p=91"},"modified":"2025-11-12T19:20:07","modified_gmt":"2025-11-12T11:20:07","slug":"%e4%b8%ba%e6%96%b0%e8%ae%be%e5%a4%87%e6%b7%bb%e5%8a%a0openwrt%e6%94%af%e6%8c%81","status":"publish","type":"post","link":"https:\/\/blog.dream-cast.com.cn\/?p=91","title":{"rendered":"\u4e3a\u65b0\u8bbe\u5907\u6dfb\u52a0OpenWrt\u652f\u6301"},"content":{"rendered":"\n<p>\u4e3a\u4e86\u5168\u9762\u4e86\u89e3\u5982\u4f55\u6dfb\u52a0\u65b0\u8bbe\u5907\u652f\u6301\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u67e5\u770b\u4e00\u53f0\u65b0\u8bbe\u5907\u76f8\u5173\u7684\u6700\u65b0\u7684commit\uff0c\u6478\u6e05\u695a\u54ea\u4e9b\u6587\u4ef6\u53d1\u751f\u4e86\u4fee\u6539\u548c\u5982\u4f55\u4fee\u6539\u5b83\u4eec\u3002\u8fd9\u4e9b\u6587\u4ef6\u975e\u5e38\u65b9\u4fbf\u7406\u89e3\uff0c\u6211\u4eec\u53ea\u9700\u8981\u53bb\u6253\u5f00\u67e5\u770b\u5c31\u80fd\u7406\u89e3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u901a\u8fc7\u5b9e\u4f8b\u8fdb\u884c\u5b66\u4e60\">\u901a\u8fc7\u5b9e\u4f8b\u8fdb\u884c\u5b66\u4e60<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E9%80%9A%E8%BF%87%E5%AE%9E%E4%BE%8B%E8%BF%9B%E8%A1%8C%E5%AD%A6%E4%B9%A0\"><\/a><\/h2>\n\n\n\n<p>\u4e00\u4e2a\u597d\u65b9\u6cd5\u662f\u901a\u8fc7\u793a\u4f8b\u5b66\u4e60\uff0c\u6211\u4eec\u901a\u8fc7\u641c\u7d22<em>mt300a<\/em>\u8fd9\u4e2a\u7248\u578b\u6587\u4ef6\u6765\uff0c\u627e\u51fa\u9700\u8981\u4fee\u6539\u7684\u6587\u4ef6\uff0c\u6240\u4ee5\u4f60\u53ef\u4ee5\u8fd9\u6837\u505a\uff1a<\/p>\n\n\n\n<p>grep -lri mt300a target\/<\/p>\n\n\n\n<p>\u663e\u793a\u7ed3\u679c\u662f\u6dfb\u52a0\u65b0\u677f\u6240\u9700\u7684\u6700\u5c11\u6587\u4ef6\u5217\u8868\uff1a<\/p>\n\n\n\n<p>target\/linux\/ramips\/base-files\/etc\/board.d\/01_leds<\/p>\n\n\n\n<p>target\/linux\/ramips\/base-files\/etc\/board.d\/02_network<\/p>\n\n\n\n<p>target\/linux\/ramips\/base-files\/lib\/upgrade\/platform.sh<\/p>\n\n\n\n<p>target\/linux\/ramips\/base-files\/lib\/ramips.sh<\/p>\n\n\n\n<p>target\/linux\/ramips\/dts\/GL-MT300A.dts<\/p>\n\n\n\n<p>target\/linux\/ramips\/image\/mt7620.mk<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u91cd\u8981\u6587\u4ef6\">\u91cd\u8981\u6587\u4ef6<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E9%87%8D%E8%A6%81%E6%96%87%E4%BB%B6\"><\/a><\/h2>\n\n\n\n<p>\u6700\u91cd\u8981\u7684\u6587\u4ef6\u4e00\u822c\u5b58\u653e\u4e8e\u4ee5\u4e0b\u76ee\u5f55\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"targetlinuxarch_namebase-filesetc\">\/target\/linux\/&lt;arch_name&gt;\/base-files\/etc\/\u2026<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#targetlinuxarch_namebase-filesetc\"><\/a><\/h3>\n\n\n\n<p>\u8be5\u76ee\u5f55\u7684\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u6700\u7ec8\u5c06\u4f1a\u5b58\u653e\u4e8e\u8bbe\u5907\u56fa\u4ef6\u7684\/etc\/\u76ee\u5f55\u3002<\/p>\n\n\n\n<p>\u5b83\u4e00\u822c\u5305\u542b\u4e0b\u5217\u7684\u6587\u4ef6\u548c\u6587\u4ef6\u5939\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u2026board.d\/<\/strong>\u00a0\u5b9a\u4e49\u8bbe\u5907\u4e13\u7528\u7684\u9ed8\u8ba4\u786c\u4ef6\u7684\u811a\u672c\uff0c\u5982LED\u548c\u7f51\u7edc\u63a5\u53e3\u3002<\/li>\n\n\n\n<li><strong>\u2026hotplug.d\/<\/strong>\u00a0\u5b9a\u4e49\u8bbe\u5907\u4e13\u7528\u7684\uff0c\u5728\u63d2\u5165\u70ed\u63d2\u62d4\u8bbe\u5907\u65f6\u81ea\u52a8\u8fd0\u884c\u7684\u811a\u672c<\/li>\n\n\n\n<li><strong>\u2026init.d\/<\/strong>\u00a0\u5b9a\u4e49\u8bbe\u5907\u4e13\u7528\u7684\u5728\u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c\u7684\u811a\u672c<\/li>\n\n\n\n<li><strong>\u2026uci-defaults\/<\/strong>\u00a0\u5b9a\u4e49\u8bbe\u5907\u4e13\u7528\u7684UCI\u9ed8\u8ba4\u8bbe\u7f6e<\/li>\n\n\n\n<li><strong>\u2026diag.sh<\/strong>\u00a0\u5b9a\u4e49\u8bbe\u5907\u663e\u793a\u7684\u9519\u8bef\u4ee3\u7801<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"targetlinuxarch_namebase-fileslib\">\/target\/linux\/&lt;arch_name&gt;\/base-files\/lib\/\u2026<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#targetlinuxarch_namebase-fileslib\"><\/a><\/h3>\n\n\n\n<p>\u8be5\u6587\u4ef6\u5939\u4e0b\u7684\u6587\u4ef6\u5939\u548c\u6587\u4ef6\u5bf9\u5e94\u56fa\u4ef6\u4e2d\u7684\/lib\u76ee\u5f55\u4e0b\u6587\u4ef6\u5939\u548c\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u5b83\u7684\u5b50\u6587\u4ef6\u5939\u548c\u6587\u4ef6\u6709:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u2026&lt;arch_name>.sh<\/strong>\u00a0\u5c06<em>\u9605\u8bfb\u53cb\u597d\u7684\u8bbe\u5907\u540d<\/em>\u8f6c\u5316\u4e3a<em>\u811a\u672c\u5b89\u5168\u7684\u8bbe\u5907\u540d<\/em>\u7684\u811a\u672c<\/li>\n\n\n\n<li><strong>\u2026preinit\/<\/strong>\u00a0\u901a\u7528&lt;arch_name>\u9884\u521d\u59cb\u5316\u811a\u672c<\/li>\n\n\n\n<li><strong>\u2026upgrade\/<\/strong>\u00a0\u901a\u7528&lt;arch_name>\u5347\u7ea7\u811a\u672c<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"targetlinuxarch_namebase-filessbin\">\/target\/linux\/&lt;arch_name&gt;\/base-files\/sbin<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#targetlinuxarch_namebase-filessbin\"><\/a><\/h3>\n\n\n\n<p>\u8be5\u6587\u4ef6\u5939\u5bf9\u5e94\u56fa\u4ef6\u4e2d\u7684\/sbin\u6587\u4ef6\u5939, \u4e00\u822c\u4e3a\u901a\u7528\u7684&lt;arch_name&gt; sbin\u811a\u672c\u548c\u5de5\u5177.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"targetlinuxarch_namedts\">\/target\/linux\/&lt;arch_name&gt;\/dts\/<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#targetlinuxarch_namedts\"><\/a><\/h3>\n\n\n\n<p>\u8bbe\u5907\u6811\u6e90\u6587\u4ef6(Device tree source files, \u7b80\u5199\u4e3adts).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"targetlinuxarch_nameimage\">\/target\/linux\/&lt;arch_name&gt;\/image\/<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#targetlinuxarch_nameimage\"><\/a><\/h3>\n\n\n\n<p>\u7528\u4e8e\u6784\u5efa\u5199\u5165\u7528\u955c\u50cf\u7684\u8bbe\u7f6e\u6587\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"targetlinuxarch_nameboard_name\">\/target\/linux\/&lt;arch_name&gt;\/&lt;board_name&gt;\/<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#targetlinuxarch_nameboard_name\"><\/a><\/h3>\n\n\n\n<p>\u8bbe\u5907\u4e13\u7528\u7684\u8bbe\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"targetlinuxarch_namemodulesmk\">\/target\/linux\/&lt;arch_name&gt;\/modules.mk<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#targetlinuxarch_namemodulesmk\"><\/a><\/h3>\n\n\n\n<p><em>menuconfig<\/em>\u4e2d\u4f7f\u7528\u7684\u67b6\u6784\u4e13\u7528(Arch-specific)\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4f7f\u65b0\u8bbe\u5907\u51fa\u73b0\u5728make_menuconfig\u4e2d\">\u4f7f\u65b0\u8bbe\u5907\u51fa\u73b0\u5728make menuconfig\u4e2d<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E4%BD%BF%E6%96%B0%E8%AE%BE%E5%A4%87%E5%87%BA%E7%8E%B0%E5%9C%A8make_menuconfig%E4%B8%AD\"><\/a><\/h3>\n\n\n\n<p>\u5728\u7f16\u8f91\u4e86\u4e0a\u8ff0\u7684\u6587\u4ef6\u540e, \u4f60\u9700\u8981\u5bf9Makefile\u4f7f\u7528touch\u547d\u4ee4<\/p>\n\n\n\n<p>touch target\/linux\/*\/Makefile<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u8865\u4e01\">\u8865\u4e01<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E8%A1%A5%E4%B8%81\"><\/a><\/h2>\n\n\n\n<p>\u5b50\u76ee\u5f55 patches-xxx \u662f\u5bf9\u4e00\u4e2a \u76ee\u6807\u7248\u672cxxx \u7684\u5185\u6838\u8865\u4e01.<br>\u5b83\u5305\u542b\u7684\u6587\u4ef6\u540d\uff08&#8217;3\u4e2a\u6570\u5b57-\u5168\u5c0f\u5199\u5b57\u6bcd\u7684\u7b80\u4ecb.patch&#8217;\uff09\u79f0\u542b\u4e49\u5982\u4e0b:<\/p>\n\n\n\n<p><strong>0xx<\/strong>&nbsp;&#8211; \u4e0a\u6e38\u9700\u8981\u56de\u9000\u7684\u5185\u5bb9\u8865\u4e01<br><strong>1xx<\/strong>&nbsp;&#8211; \u7b49\u5f85\u4e0a\u6e38\u5408\u5e76\u7684\u4ee3\u7801\u8865\u4e01<br><strong>2xx<\/strong>&nbsp;&#8211; \u5185\u6838\u6784\u5efa\u3001\u914d\u7f6e\u548c\u5934\u6587\u4ef6\u7684\u8865\u4e01<br><strong>3xx<\/strong>&nbsp;&#8211; \u7528\u4e8e\u7279\u5b9a\u4f53\u7cfb\u7ed3\u6784\u7684\u8865\u4e01<br><strong>4xx<\/strong>&nbsp;&#8211; MTD\u76f8\u5173\u7684\u8865\u4e01\uff08\u7cfb\u7edf\u548c\u8bbe\u5907\u65b9\u9762\uff09<br><strong>5xx<\/strong>&nbsp;&#8211; \u6587\u4ef6\u7cfb\u7edf\u76f8\u5173\u7684\u8865\u4e01<br><strong>6xx<\/strong>&nbsp;&#8211; \u7f51\u7edc\u901a\u7528\u8865\u4e01<br><strong>7xx<\/strong>&nbsp;&#8211; \u7f51\u7edc\u7269\u7406\u5c42\u9a71\u52a8\u8865\u4e01<br><strong>8xx<\/strong>&nbsp;&#8211; \u5176\u4ed6\u8bbe\u5907\u8865\u4e01<br><strong>9xx<\/strong>&nbsp;&#8211; \u672a\u5206\u7c7b\u7684\u5176\u4ed6\u8865\u4e01<\/p>\n\n\n\n<p>\u6240\u6709\u7684\u8865\u4e01\u53d1\u5e03\u90fd\u5fc5\u987b\u5177\u6709\u76f8\u6bd4\u73b0\u9636\u6bb5\u6f5c\u5728\u7684\u4f18\u52bf\uff0c\u5982\uff1a<\/p>\n\n\n\n<p>&#8211; \u8865\u4e01\u5fc5\u987b\u5177\u6709<strong>\u5408\u9002\u660e\u786e\u7684\u4e3b\u9898<\/strong><br>&#8211; \u5fc5\u987b\u6709\u4e00\u4e2a<strong>\u660e\u786e\u6e05\u6670\u7684commit\u4fe1\u606f<\/strong>\u6765\u89e3\u6790\u8865\u4e01\u4f5c\u51fa\u4e86\u4ec0\u4e48\u6837\u7684\u6539\u53d8<br>&#8211; \u8865\u4e01\u5fc5\u987b\u5305\u542b<strong>\u4e00\u4e2a\u7b7e\u7f72\u4eba<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u955c\u50cf\u6d4b\u8bd5\">\u955c\u50cf\u6d4b\u8bd5<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E9%95%9C%E5%83%8F%E6%B5%8B%E8%AF%95\"><\/a><\/h2>\n\n\n\n<p>\u6d4b\u8bd5\u955c\u50cf\u56fa\u4ef6\u901a\u8fc7ramdisk\u955c\u50cf\u800c\u4e0d\u901a\u8fc7\u70e7\u5199\u5230Flash\u3002<\/p>\n\n\n\n<p>\u5728<strong>make menuconfig<\/strong>\u914d\u7f6e\u4e2d\u9009\u62e9<strong>Target Images<\/strong>\uff0c\u7136\u540e\u518d\u9009\u62e9<strong>ramdisk<\/strong>\u9009\u9879\u3002<\/p>\n\n\n\n<p>\u8fd9\u6837\u5c06\u4f1a\u7f16\u8bd1\u751f\u6210\u4e00\u4e2akernel+inittramfs\uff08\u5185\u6838\u52a0\u4e0a\u5185\u5b58\u6839\u6587\u4ef6\u7cfb\u7edf\uff09\u7684\u955c\u50cf\u6587\u4ef6\uff0c\u5b83\u7684\u540d\u5b57\u4e2d\u5c06\u4f1a\u5305\u542b<strong>initramfs<\/strong>\u3002\u901a\u8fc7BootLoader\u7684tftp\u529f\u80fd\u53ef\u4ee5\u5c06\u8fd9\u4e2a\u955c\u50cf\u6587\u4ef6\u5bfc\u5165\u5230\u8bbe\u5907\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u4e0d\u9700\u8981flash\u6587\u4ef6\u7cfb\u7edf\u7684\u652f\u6301\u4e0b\u8fdb\u884c\u542f\u52a8\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u5c0f\u7a8d\u95e8\">\u5c0f\u7a8d\u95e8<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E5%B0%8F%E7%AA%8D%E9%97%A8\"><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4f7f\u7528\u76ee\u6807\u8bbe\u5907\u4e2d\u7684shell\">\u4f7f\u7528\u76ee\u6807\u8bbe\u5907\u4e2d\u7684shell<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E4%BD%BF%E7%94%A8%E7%9B%AE%E6%A0%87%E8%AE%BE%E5%A4%87%E4%B8%AD%E7%9A%84shell\"><\/a><\/h3>\n\n\n\n<p>\u4e3a\u4e86\u83b7\u53d6\u5230\u67d0\u4e2a\u4f60\u611f\u5174\u8da3\u7684OpenWrt\u8bbe\u5907\u7684\u7aef\u53e3\u7684\u76f8\u5173\u6570\u636e\uff0c\u9700\u8981\u8fdb\u884cshell\u8bbf\u95ee\u3002\u4f46\u662f\u5927\u591a\u6570\u8bbe\u5907\u90fd\u6ca1\u6709\u63d0\u4f9b\u4f7f\u7528telnet\u6216\u8005ssh\u8fde\u63a5shell\u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u901a\u8fc7ping\u6216\u8005ntp\u529f\u80fd\u8fdb\u5165shell\">\u901a\u8fc7PING\u6216\u8005NTP\u529f\u80fd\u8fdb\u5165shell<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E9%80%9A%E8%BF%87ping%E6%88%96%E8%80%85ntp%E5%8A%9F%E8%83%BD%E8%BF%9B%E5%85%A5shell\"><\/a><\/h3>\n\n\n\n<p>\u67d0\u4e9b\u8def\u7531\u5668\u63d0\u4f9bping\u6d4b\u8bd5\u6216NTP\u670d\u52a1\u5668\u914d\u7f6e\uff0c\u5e76\u4e14\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6e05\u7406\u7528\u6237\u8f93\u5165\u3002\u5c1d\u8bd5\u8f93\u5165shell\u811a\u672c\uff0c\u770b\u770b\u60a8\u662f\u5426\u5e78\u8fd0\u3002\u60a8\u53ef\u80fd\u9700\u8981\u4e00\u4e9bJavaScript\u77e5\u8bc6\u624d\u80fd\u7981\u7528\u5ba2\u6237\u7aef\u8f93\u5165\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"\u4f7f\u7528telnetd\">\u4f7f\u7528telnetd<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E4%BD%BF%E7%94%A8telnetd\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><em>$<\/em>( \/bin\/busybox telnetd -l\/bin\/<strong>sh<\/strong> -p23 &amp; )<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"\u5982\u679c\u9700\u8981\u8fdc\u7a0b\u767b\u5f55_\u8bf7\u4f7f\u7528http\u83b7\u53d6\u5bc6\u7801\u54c8\u5e0c\u6216\u4f7f\u7528_sed_\u5220\u9664\u66f4\u6539\u9ed8\u8ba4\u5bc6\u7801\">\u5982\u679c\u9700\u8981\u8fdc\u7a0b\u767b\u5f55\uff0c\u8bf7\u4f7f\u7528HTTP\u83b7\u53d6\u5bc6\u7801\u54c8\u5e0c\u6216\u4f7f\u7528\u201csed\u201d\u5220\u9664\/\u66f4\u6539\u9ed8\u8ba4\u5bc6\u7801<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E5%A6%82%E6%9E%9C%E9%9C%80%E8%A6%81%E8%BF%9C%E7%A8%8B%E7%99%BB%E5%BD%95_%E8%AF%B7%E4%BD%BF%E7%94%A8http%E8%8E%B7%E5%8F%96%E5%AF%86%E7%A0%81%E5%93%88%E5%B8%8C%E6%88%96%E4%BD%BF%E7%94%A8_sed_%E5%88%A0%E9%99%A4%E6%9B%B4%E6%94%B9%E9%BB%98%E8%AE%A4%E5%AF%86%E7%A0%81\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">$( <strong>cp<\/strong> \/etc\/shadow \/www )\n$( <strong>cp<\/strong> \/etc\/<strong>passwd<\/strong> \/www )<\/pre>\n\n\n\n<p>\u7136\u540e\u5c1d\u8bd5\u5c06\u4ed6\u4eec\u4e0b\u8f7d\u5230\u60a8\u7684\u7535\u8111\u5e76\u4e14\u7834\u89e3\u54c8\u5e0c\u5bc6\u7801\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"\u964d\u7ea7\u56fa\u4ef6\">\u964d\u7ea7\u56fa\u4ef6<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E9%99%8D%E7%BA%A7%E5%9B%BA%E4%BB%B6\"><\/a><\/h5>\n\n\n\n<p>\u67d0\u4e9b\u8def\u7531\u5668\u53ef\u80fd\u4f1a\u5728\u542f\u52a8\u4e4b\u521d\u5c1d\u8bd5\u4ece\u7279\u5b9a\u7684\u4e13\u7528IP\u4e0b\u8f7d\u56fa\u4ef6\u6587\u4ef6\uff08\u4f8b\u5982TP-Link Archer C2 AC750\uff09\uff0c\u4ece\u800c\u5141\u8bb8\u7528\u6237\u964d\u7ea7\u5230\u8f83\u65e7\u7684\u56fa\u4ef6\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"http\u670d\u52a1\u5668\u6f0f\u6d1e\">HTTP\u670d\u52a1\u5668\u6f0f\u6d1e<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#http%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%BC%8F%E6%B4%9E\"><\/a><\/h5>\n\n\n\n<p>\u4e00\u4e9b\u8def\u7531\u5668\u53ef\u80fd\u6b63\u5728\u8fd0\u884c\u8fc7\u65f6\/\u4e0d\u5b89\u5168\u7684HTTP\u670d\u52a1\u5668\uff0c\u5e76\u4e14\u53ef\u80fd\u5bb9\u6613\u53d7\u5230\u7f13\u51b2\u533a\u6ea2\u51fa\u6216\u5176\u4ed6\u653b\u51fb\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"\u7f51\u4ef6\">\u7f51\u4ef6<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E7%BD%91%E4%BB%B6\"><\/a><\/h5>\n\n\n\n<p>\u4f7f\u7528&nbsp;<a href=\"https:\/\/openwrt.org\/toh\/netgear\/telnet.console\">netgear-telnetenable<\/a>&nbsp;\u8bb8\u591a\u7f51\u4ef6\u8bbe\u5907\u90fd\u53ef\u4ee5\u901a\u8fc7telnet\u8fdb\u5165\uff0c\u4e5f\u53ef\u4ee5\u67e5\u770b&nbsp;<a href=\"https:\/\/github.com\/insanid\/NetgearTelnetEnable\">GitHub: insanid\/NetgearTelnetEnable<\/a>\u3002\u5982\u679c\u65e0\u6cd5\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\uff0c\u5219\u53ef\u4ee5\u5c1d\u8bd5\u4ece\u542f\u7528\u4e86telnetd\u7684\u4f9b\u5e94\u5546\u53d1\u5e03\u7684\u6e90\u4e2d\u5237\u65b0\u6620\u50cf\u6784\u5efa\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7&nbsp;<a href=\"https:\/\/github.com\/jclehner\/nmrpflash\">nmrpflash<\/a>\u8bb8\u591a\u7f51\u4ef6\u8bbe\u5907\u53ef\u4ee5\u88ab\u70e7\u5f55\uff0c\u4f46\u662f\u65e0\u6cd5\u786e\u5b9a\u80fd\u591f\u4f7f\u7528\u8be5\u5de5\u5177\u7684\u8bbe\u5907\u6709\u54ea\u4e9b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u6536\u96c6\u76f8\u5173\u6570\u636e\">\u6536\u96c6\u76f8\u5173\u6570\u636e<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E6%94%B6%E9%9B%86%E7%9B%B8%E5%85%B3%E6%95%B0%E6%8D%AE\"><\/a><\/h3>\n\n\n\n<p>\u5728<a href=\"https:\/\/wikidevi.com\/wiki\/Main_Page\">WikiDevi<\/a>\u4e0a\u9762\u8bb8\u591a\u4fe1\u606f\u53ef\u4ee5\u88ab\u67e5\u8be2\u5230\uff0c\u4f8b\u5982\uff1aFCC ID\uff1a\u5341\u5206\u7684\u6709\u7528\u5904\u5f53\u4f60\u641c\u5bfb\u6587\u4ef6\u7684\u65f6\u5019\uff0cdatasheets\u548c\u7f51\u7edc\u7167\u7247\uff1a\u80fd\u591f\u65e0\u9700\u6253\u5f00\u673a\u58f3\u5c31\u80fd\u533a\u5206\u4f7f\u7528\u8fc7\u7684\u82af\u7247\u3002<\/p>\n\n\n\n<p>\u901a\u5e38\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u7684\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">  <strong>dmesg<\/strong>                          <em># log buffer might be to small, see note 1.<\/em>\n  <strong>cat<\/strong> \/proc\/cmdline\n  <strong>cat<\/strong> \/proc\/cpuinfo\n  <strong>cat<\/strong> \/proc\/meminfo\n  <strong>cat<\/strong> \/proc\/devices\n  <strong>ls<\/strong> \/sys\/devices\/platform\n  <strong>cat<\/strong> \/proc\/mtd\n  <strong>cat<\/strong> \/sys\/class\/mtd\/mtd*\/offset <em># Linux 4.1 and newer, see note 2.<\/em>\n  <strong>ifconfig<\/strong> -a\n  <strong>ls<\/strong> \/sys\/class\/net\n  brctl show\n  <strong>cat<\/strong> \/sys\/kernel\/debug\/gpio     <em># GPIO information<\/em><\/pre>\n\n\n\n<p><strong>\u6ce8\u610f1<\/strong>:\u901a\u8fc7<strong>dmesg<\/strong>\u68c0\u7d22\u65f6\uff0c\u5982\u679c\u65e5\u5fd7\u7684\u7f13\u5b58\u533a\u592a\u5c0f\uff0c\u5c31\u4f1a\u4e22\u5931\u6389\u6700\u65e9\u7684\u4fe1\u606f\u3002\u5982\u679c\u4ece\u4f9b\u5e94\u5546\u53d1\u5e03\u7684\u8d44\u6e90\u4e2d\u6784\u5efa\u5e93\u5b58\u53ca\u955c\u50cf\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u5728\u5185\u6838\u914d\u7f6e\u4e2d\u8bbe\u7f6e\u66f4\u5927\u7684\u7f13\u51b2\u533a\u5927\u5c0f\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\u610f2<\/strong>:<a href=\"http:\/\/lxr.free-electrons.com\/source\/Documentation\/ABI\/testing\/sysfs-class-mtd\">http:\/\/lxr.free-electrons.com\/source\/Documentation\/ABI\/testing\/sysfs-class-mtd<\/a><\/p>\n\n\n\n<p>\u83b7\u53d6\u8bbe\u7f6eLED\u4fe1\u606f\u7684\u53e6\u4e00\u4e2a\u6709\u7528\u7684\u5de5\u5177\u662f<a href=\"https:\/\/github.com\/jclehner\/gpiodump-mt7620\">gpiodump<\/a>\uff0c\u5b83\u662fMT7620 GPIOMODE\u5bc4\u5b58\u5668\u8f6c\u50a8\u5668(RAMIPS)\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4ece\u8bbe\u5907\u83b7\u53d6\u6570\u636e\">\u4ece\u8bbe\u5907\u83b7\u53d6\u6570\u636e<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E4%BB%8E%E8%AE%BE%E5%A4%87%E8%8E%B7%E5%8F%96%E6%95%B0%E6%8D%AE\"><\/a><\/h3>\n\n\n\n<p>\u7531\u4e8e\u7a7a\u95f4\u6709\u9650\uff0c\u5e38\u89c1\u7684\u6587\u4ef6\u4f20\u8f93\u5b9e\u7528\u7a0b\u5e8f\uff08\u4f8b\u5982rsync\/curl\/ssh\/scp\/ftp\/http\/tftp\uff09\u53ef\u80fd\u4e0d\u53ef\u7528\uff0c\u7cbe\u7b80\u7248version\/applet\u53ef\u80fd\u5728busybox\u4e2d\u53ef\u7528\u3002<\/p>\n\n\n\n<p>\u5047\u8bbe\u8def\u7531\u5668ip\u4e3a192.168.0.123\uff0c\u8981\u4f20\u8f93\u7684\u6587\u4ef6\u4f4d\u4e8e\/tmp\/important-data.txt<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"http\u901a\u8fc7_httpd_\u548c_busybox_mount\">HTTP\u901a\u8fc7&#8221;httpd&#8221;\u548c&#8221;busybox mount&#8221;<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#http%E9%80%9A%E8%BF%87_httpd_%E5%92%8C_busybox_mount\"><\/a><\/h4>\n\n\n\n<p>\u5982\u679c\u4ece\/www\u63d0\u4f9bWeb\u754c\u9762<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"sender\">Sender<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#sender\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>mount<\/strong> -o bind \/tmp \/www<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"receiver\">Receiver<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#receiver\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>wget<\/strong> http:\/\/192.168.0.123\/important-data.txt<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ftp\u901a\u8fc7_busybox_ftpput\">FTP\u901a\u8fc7\u201cbusybox ftpput\u201d<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#ftp%E9%80%9A%E8%BF%87_busybox_ftpput\"><\/a><\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"receiver1\">Receiver<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#receiver1\"><\/a><\/h5>\n\n\n\n<p>\u8bbe\u7f6e\u4e00\u4e2aFTP\u670d\u52a1\u5668\uff0c\u6dfb\u52a0\u4e00\u4e2a\u5177\u6709\u5199\u6743\u9650\u7684\u533f\u540d\u8d26\u53f7\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python -m pyftpdlib -w -p 21<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"sender1\">Sender<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#sender1\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">busybox ftpput 192.168.0.123 important-data.txt \/tmp\/important-data.txt <\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"netcat\u901a\u8fc7_buxybox_nc\">netcat\u901a\u8fc7\u201cbuxybox nc\u201d<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#netcat%E9%80%9A%E8%BF%87_buxybox_nc\"><\/a><\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"receiver2\">Receiver<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#receiver2\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">busybox nc -l -p 12345 &gt; important-data.txt <\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"sender2\">Sender<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#sender2\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>cat<\/strong> \/tmp\/important-data.txt | busybox nc 192.168.0.123:12345 <\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"tftp\u901a\u8fc7_busybox_tftp\">TFTP\u901a\u8fc7\u201cbusybox tftp\u201d<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#tftp%E9%80%9A%E8%BF%87_busybox_tftp\"><\/a><\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"receiver3\">Receiver<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#receiver3\"><\/a><\/h5>\n\n\n\n<p>\u5efa\u7acb\u4e00\u4e2atftp\u670d\u52a1\u5668<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"sender3\">Sender<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#sender3\"><\/a><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">busybox tftp -p -l \/tmp\/important-data.txt -r important-data.txt 192.168.0.123<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u901a\u8fc7\u7ec8\u7aef_terminal_\u590d\u5236\">\u901a\u8fc7\u7ec8\u7aef\uff08terminal\uff09\u590d\u5236<a href=\"https:\/\/openwrt.org\/zh\/docs\/guide-developer\/adding_new_device#%E9%80%9A%E8%BF%87%E7%BB%88%E7%AB%AF_terminal_%E5%A4%8D%E5%88%B6\"><\/a><\/h4>\n\n\n\n<p>\u5982\u679c\u4e0a\u8ff0\u6240\u6709\u5de5\u5177\/\u5c0f\u5de5\u5177\u90fd\u4e0d\u53ef\u7528\uff0c\u5219\u53ef\u4ee5\u4ecetelnet\u7ec8\u7aef\u8fdb\u884c\u590d\u5236\uff0c\u4f46\u4e0d\u9002\u7528\u4e8e\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4e86\u5168\u9762\u4e86\u89e3\u5982\u4f55\u6dfb\u52a0\u65b0\u8bbe\u5907\u652f\u6301\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u67e5\u770b\u4e00\u53f0\u65b0\u8bbe\u5907\u76f8\u5173\u7684\u6700\u65b0\u7684commit &hellip; <a href=\"https:\/\/blog.dream-cast.com.cn\/?p=91\">\u7ee7\u7eed\u9605\u8bfb <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":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=91"}],"version-history":[{"count":1,"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.dream-cast.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}