{"id":78,"date":"2021-09-13T11:16:03","date_gmt":"2021-09-13T03:16:03","guid":{"rendered":"https:\/\/blog.xiaotao2333.top:344\/?p=78"},"modified":"2021-09-15T14:26:33","modified_gmt":"2021-09-15T06:26:33","slug":"%e5%9f%ba%e4%ba%8ekvm%e8%99%9a%e6%8b%9f%e5%8c%96%e7%9a%84%e8%bd%af%e8%b7%af%e7%94%b1diy%ef%bc%88%e4%b8%80%ef%bc%89%ef%bc%9a%e8%87%aa%e5%b7%b1%e5%8a%a8%e6%89%8b%e7%bc%96%e8%af%91openwrt","status":"publish","type":"post","link":"https:\/\/blog.xiaotao2333.top:344\/?p=78","title":{"rendered":"\u57fa\u4e8eKVM\u865a\u62df\u5316\u7684\u8f6f\u8def\u7531DIY\uff08\u4e00\uff09\uff1a\u7f16\u8bd1OpenWrt"},"content":{"rendered":"<h1>\u57fa\u4e8eKVM\u7684\u8f6f\u8def\u7531DIY\uff08\u4e00\uff09\uff1a\u7f16\u8bd1OpenWrt<\/h1>\n<h2>\u4ec0\u4e48\u662f\u8f6f\u8def\u7531<\/h2>\n<p>\u8f6f\u8def\u7531\uff0c\u662f\u76f8\u5bf9\u4e8e\u4e00\u4e2a\u786c\u8def\u7531\u7684\u6982\u5ff5\uff0c\u786c\u8def\u7531\u5c31\u662f\u786c\u4ef6\u8def\u7531\u5668\uff0c\u76f4\u63a5\u5c31\u662f\u4e00\u4e2a\u8def\u7531\u5668\u4ea7\u54c1\uff0c\u800c\u8f6f\u8def\u7531\u5219\u662f\u5728\u5176\u4ed6\u901a\u7528\u5e73\u53f0\uff08\u5982\u901a\u7528\u8ba1\u7b97x86\u5e73\u53f0\uff0c\u6811\u8393\u6d3e\uff0c\u865a\u62df\u5316\u7cfb\u7edf\u7b49\uff09\u4e0a\u901a\u8fc7\u8f6f\u4ef6\u7684\u65b9\u5f0f\u5b9e\u73b0\u8def\u7531\u529f\u80fd<\/p>\n<h2>\u4e3a\u4ec0\u4e48\u8981\u4f7f\u7528\u8f6f\u8def\u7531<\/h2>\n<p>\u8f6f\u8def\u7531\u5f80\u5f80\u62e5\u6709\u6bd4\u786c\u8def\u7531\u66f4\u5f3a\u5927\u7684\u8ba1\u7b97\u80fd\u529b\uff08\u5982\u679c\u6709\u9ad8\u5f3a\u5ea6\u7684\u52a0\u89e3\u5bc6\u8fd0\u7b97\u9700\u6c42\uff0c\u8fd9\u4e2a\u5c31\u5f88\u5173\u952e\u4e86\uff09\uff0c\u5185\u5b58\u548c\u5b58\u50a8\u7a7a\u95f4\uff0c\u53ef\u62d3\u5c55\u6027\u66f4\u5f3a\uff0c<del>\u8017\u7535\u66f4\u5feb<\/del>\uff0c\u8fd9\u5c31\u8d4b\u4e88\u4e86\u8f6f\u8def\u7531\u80fd\u6bd4\u540c\u4ef7\u4f4d\u7684\u786c\u8def\u7531\u62e5\u6709\u66f4\u9ad8\u7684\u53ef\u73a9\u6027\u548c\u66f4\u5c11\u7684\u74f6\u9888\u3002<\/p>\n<h2>\u4e3a\u4ec0\u4e48\u8981\u81ea\u5df1\u7f16\u8bd1\u56fa\u4ef6<\/h2>\n<p>\u8def\u7531\u5668\u56fa\u4ef6\u591a\u79cd\u591a\u6837\uff0c\u7f51\u4e0a\u4e5f\u6709\u5927\u91cf\u6574\u5408\u548c\u5206\u4eab\u7684\u56fa\u4ef6\u955c\u50cf\uff0c\u5982\u679c\u4f60\u6709\u4ee5\u4e0b\u9700\u6c42\uff0c\u90a3\u4e48\u9009\u62e9\u81ea\u5df1\u7f16\u8bd1\u56fa\u4ef6\u5c31\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u65b9\u6848\uff1a<\/p>\n<ol>\n<li>\u62c5\u5fc3\u56fa\u4ef6\u201c\u4e0d\u5e72\u51c0\u201d<\/li>\n<li>\u60f3\u4f53\u9a8c\u65b0\u7248\u672c\u7684\u56fa\u4ef6\u7cfb\u7edf\uff0c\u4f53\u9a8c\u65b0\u529f\u80fd<\/li>\n<li>\u81ea\u5df1\u60f3\u8981\u5b9a\u5236\u8def\u7531\u5668\u7684\u529f\u80fd<\/li>\n<li>\u5c31\u662f\u5355\u7eaf\u60f3\u6298\u817e<\/li>\n<\/ol>\n<h2>\u4e3a\u4ec0\u4e48\u662fOpenwrt\uff0c\u800c\u4e0d\u662f\u8001\u6bdb\u5b50\/\u6f58\u591a\u62c9\u7b49\u5176\u4ed6\u56fa\u4ef6<\/h2>\n<p>Openwrt\u662f\u6240\u6709\u56fa\u4ef6\u4e2d\u53ef\u62d3\u5c55\u6027\u6700\u5f3a\u7684\uff0c\u751a\u81f3\u53ef\u4ee5\u5b8c\u5168\u5f53\u4f5c\u4e00\u4e2aGNU\/Linux\u64cd\u4f5c\u7cfb\u7edf\u6765\u4f7f\u7528\uff0c\u62e5\u6709\u6700\u5927\u7684\u53ef\u63a7\u5236\u7a0b\u5ea6\u3002<br \/>\n\uff08\u5176\u5b9e\u5c31\u662f\u535a\u4e3b\u592a\u83dc\u4e86\uff0c\u627e\u4e0d\u5230\u4ed6\u4eec\u7684\u6e90\u4ee3\u7801\uff09<\/p>\n<h2>\u8d77\u6b65<\/h2>\n<p>\u4ee5\u4e0b\u6b65\u9aa4\u53c2\u8003\u81eaLEDE\u4ed3\u5e93README.md\uff0c\u987a\u4fbf\u4e00\u63d0LEDE\u548cOpenWrt\u540c\u6e90\uff0c\u968f\u540eLEDE\u548cOpenWrt\u4ee5OpenWrt\u7684\u540d\u4e49\u5408\u5e76\u4e86\uff0cLEDE\u5c31\u662fOpenWrt<br \/>\n\u8fd9\u91cc\u7ed9\u51faOpenWrt\u5b98\u65b9\u4ed3\u5e93\u5728GitHub\u7684\u955c\u50cf\u548cLean\u7684OepnWrt\u5305\uff08\u9644\u5e26\u66f4\u591a\u7684\u670d\u52a1\u7ec4\u4ef6\uff09<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/openwrt\/openwrt.git\">https:\/\/github.com\/openwrt\/openwrt.git<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/coolsnowwolf\/lede\">https:\/\/github.com\/coolsnowwolf\/lede<\/a><\/li>\n<\/ul>\n<h3>\u6ce8\u610f\u4e8b\u9879<\/h3>\n<p>\u7531\u4e8e\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u9700\u8981\u4e0b\u8f7d\u5176\u4ed6\u4f9d\u8d56\u7684\u5e93\uff0c\u5f80\u5f80\u9700\u8981\u8bbf\u95ee\u56fd\u5916\u7684\u6e90\uff08\u5982GitHub\uff09\uff0c\u56e0\u6b64\u6700\u597d\u51c6\u5907\u4e00\u4e2a\u52a0\u901f\u5668\uff0c\u4f7f\u7528\u65b9\u6cd5\u6211\u8fd9\u91cc\u5c31\u4e0d\u63d0\u4f9b\u4e86<\/p>\n<h3>\u514b\u9686\u6e90<\/h3>\n<pre><code class=\"language-shell\">git clone https:\/\/github.com\/coolsnowwolf\/lede.git<\/code><\/pre>\n<h3>\u5b89\u88c5\u4f9d\u8d56<\/h3>\n<p>\u901a\u8fc7apt\u6216yum\u5b89\u88c5\u4f9d\u8d56\uff08\u53d6\u51b3\u4e8e\u4f60\u7684Linux\u64cd\u4f5c\u7cfb\u7edf\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff09<br \/>\n\u5b89\u88c5\u4e4b\u524d\u8bb0\u5f97\u66f4\u65b0\u4e00\u4e0b\u6e90\u4fe1\u606f\u3002<br \/>\n\u6587\u7ae0\u7f16\u8f91\u81ea2021\/9\/13\uff0c\u8bf7\u6ce8\u610f\u65f6\u6548\u6027\uff0c\u5efa\u8bae\u7ffb\u9605\u4ed3\u5e93\u6587\u6863<br \/>\n<code>apt -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget curl swig rsync <\/code><\/p>\n<h3>\u6dfb\u52a0\u989d\u5916\u7684\u7b2c\u4e09\u65b9\u670d\u52a1\u7ec4\u4ef6\u7f16\u8bd1\u6e90<\/h3>\n<p>\u7f16\u8f91<code>feeds.conf.default<\/code>\u5373\u53ef\uff0c\u8fd9\u91cc\u6211\u4e5f\u4e0d\u63d0\u4f9b\u5177\u4f53\u7684\u6e90\u4e86\uff0c\u6709\u9700\u8981\u7684\u81ea\u884cGoogle<\/p>\n<h3>\u4e0b\u8f7d\u548c\u5b89\u88c5\u62d3\u5c55\u7ec4\u4ef6\u5305<\/h3>\n<pre><code class=\"language-shell\">.\/scripts\/feeds update -a\n.\/scripts\/feeds install -a<\/code><\/pre>\n<h3>\u7f16\u8f91\u7f16\u8bd1\u9009\u9879<\/h3>\n<pre><code class=\"language-shell\">make menuconfig<\/code><\/pre>\n<p>\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\uff0c\u53ef\u8fdb\u5165\u547d\u4ee4\u884c\u4ea4\u4e92\u754c\u9762\u3002<br \/>\n<img src=\"\/wp-content\/uploads\/2021\/09\/\u7f16\u8bd1\u9009\u9879\u754c\u9762-300x144.jpg\" alt=\"\" \/><\/p>\n<p>\u7531\u4e8e\u6211\u91c7\u7528KVM\u865a\u62df\u5316\u8f6f\u8def\u7531\uff0c\u6240\u4ee5\u5e73\u53f0\u4f7f\u7528x86\uff0c\u5f53\u7136\u5982\u679c\u4f60\u8981\u7ed9\u4f60\u7684\u786c\u8def\u7531\u7f16\u8bd1\u56fa\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u5bf9\u5e94\u7684\u5e73\u53f0\u548c\u82af\u7247\u7c7b\u578b\uff0c\u4e0d\u8fc7\u8981\u6ce8\u610f\u4e0d\u8981\u592a\u8d2a\u5fc3\u9009\u592a\u591a\u529f\u80fd\uff0c\u56fa\u4ef6\u5bb9\u6613\u592a\u5927\uff0c\u8def\u7531\u5668\u5fcd\u4e0d\u4e0b\uff08\u8def\u7531\u5668\u7684Flash\u82af\u7247\u5f80\u5f80\u5f88\u5c0f\uff0c\u53ea\u6709\u5341\u51e0\u4e8c\u5341\u6765MB\uff0c\u751a\u81f3\u66f4\u5c0f\uff0c\u8981\u5237\u56fa\u4ef6\u7684\u8bdd\u5c31\u5f97\u81ea\u5df1\u66f4\u6362\u66f4\u5927\u7684Flash\u82af\u7247\u4e86\uff09<br \/>\n\u4ee5\u4e0b\u662f\u6211\u9009\u62e9\u7684\u7f16\u8bd1\u9009\u9879\uff0c\u53ef\u4ee5\u53c2\u8003\u4e0b\uff1a<\/p>\n<ul>\n<li>Target System -&gt; x86<\/li>\n<li>Subtarget -&gt; x86_64<\/li>\n<li>Target Profile -&gt; Generic x86\/64<\/li>\n<li>LuCI.Collections -&gt; [luci-nginx, luci-ssl-nginx]<\/li>\n<li>LuCI.Applications -&gt; \u8fd9\u4e2a\u81ea\u884c\u6309\u9700\u9009\u62e9\uff0c\u8fd9\u91cc\u9009\u62e9\u540e\u7684\u7ec4\u4ef6\u670d\u52a1\u53ef\u4ee5\u76f4\u63a5\u5728\u8def\u7531\u5668Web\u7ba1\u7406\u754c\u9762\u4e2d\u64cd\u4f5c\u548c\u67e5\u770b<\/li>\n<li>LuCI.Themes -&gt; [luci-theme-edge, luci-theme-material, ] \u4e2a\u4eba\u63a8\u8350\u7684\u4e3b\u9898\uff0c\u524d\u8005\u89c6\u89c9\u6548\u679c\u66f4\u597d\u4f46\u8f83\u5927\uff0c\u540e\u8005\u66f4\u8f7b\u91cf\u548c\u7b80\u6d01<\/li>\n<\/ul>\n<p>\u5176\u4ed6\u9009\u9879\u5168\u9ed8\u8ba4<\/p>\n<blockquote>\n<p>\u6ce8\u610f\uff1a\u9009\u62e9\u9009\u9879\u7684\u65f6\u5019\u8bf7\u4f7f\u7528\u4e24\u6b21\u7a7a\u683c\u6216\u6309Y\u4f7f\u9009\u62e9\u6846\u53d8\u6210*\uff0c\u5426\u5219\u7ec4\u4ef6\u4e0d\u4f1a\u96c6\u6210\u5230\u7f16\u8bd1\u540e\u7684\u56fa\u4ef6\u4e2d<\/p>\n<\/blockquote>\n<p>\u8bbe\u5b9a\u5b8c\u6210\u540e\uff0c\u9009\u62e9\u201cSave\u201d\uff0c\u4fdd\u5b58\u4f4d\u7f6e\u548c\u6587\u4ef6\u540d\u9ed8\u8ba4<\/p>\n<h3>\u4e0b\u8f7d\u7f16\u8bd1\u9700\u8981\u7684\u5305<\/h3>\n<pre><code class=\"language-shell\">make -j8 download<\/code><\/pre>\n<p>-j8\u7684\u610f\u601d\u662f\u5f00\u542f8\u7ebf\u7a0b\u4e0b\u8f7d\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u6839\u636eCPU\u6838\u5fc3\u6570\u91cf\u6765\u51b3\u5b9a\u7ebf\u7a0b\u6570\uff0c\u547d\u4ee4\u5982\u4e0b<\/p>\n<pre><code class=\"language-shell\">make -j`nproc` download<\/code><\/pre>\n<h3>\u5f00\u59cb\u7f16\u8bd1<\/h3>\n<pre><code class=\"language-shell\">make -j`nproc`<\/code><\/pre>\n<blockquote>\n<p>\u6ce8\u610f\uff01\u5982\u679c\u4f60\u662f\u4f7f\u7528WSL\u8fdb\u884c\u7f16\u8bd1\uff0c\u5219\u9700\u8981\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<br \/>\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin make -j<code>nproc<\/code><br \/>\n\u4e5f\u5c31\u662f\u8bf4\uff0c\u4f60\u9700\u8981\u5728make\u547d\u4ee4\u524d\u9762\u6dfb\u52a0PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin<\/p>\n<\/blockquote>\n<p>\u547d\u4ee4\u6267\u884c\u540e\u5373\u53ef\u5f00\u59cb\u6f2b\u957f\u7684\u7f16\u8bd1\uff0c\u9996\u6b21\u7f16\u8bd1\u4e00\u822c\u9700\u89811-2\u5c0f\u65f6\uff0c\u53d6\u51b3\u4e8eCPU\u6027\u80fd\u3002\u5982\u679c\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u51fa\u9519\u4e14\u627e\u4e0d\u5230\u9519\u8bef\u65e5\u5fd7\uff0c\u53ef\u6267\u884c<code>make V=s<\/code>\u5355\u7ebf\u7a0b\u548c\u8f93\u51fa\u5b8c\u6574\u65e5\u5fd7\u518d\u6267\u884c\u4e00\u6b21\uff0c\u6839\u636e\u65e5\u5fd7\u81ea\u884c\u6392\u9519\u3002<\/p>\n<h3>\u7f16\u8bd1\u5b8c\u6210<\/h3>\n<p>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u751f\u6210\u7684\u56fa\u4ef6\u5728<code>bin\/targets\/\u76ee\u6807\u5e73\u53f0\/\u5177\u4f53\u5e73\u53f0\u5b50\u7cfb\u7edf<\/code>\u4e0b\uff0c\u5982<code>\/bin\/targets\/ramips\/mt7621<\/code>\uff0c<code>\/bin\/targets\/x86\/x86_64<\/code><\/p>\n<p>\u5230\u8fd9\u91cc\uff0c\u7f16\u8bd1\u7684\u6b65\u9aa4\u5c31\u5b8c\u6210\u4e86\uff0c\u540e\u7eed\u7684\u914d\u7f6e\u548c\u4f7f\u7528\u73af\u8282\u5728\u4e0b\u7bc7\u6587\u7ae0\u4e2d\u66f4\u65b0\u3002<\/p>\n<p>\u4e0b\u4e00\u7bc7\uff1a<a href=\"\/?p=96\" title=\"\u57fa\u4e8eKVM\u865a\u62df\u5316\u7684\u8f6f\u8def\u7531DIY\uff08\u4e8c\uff09\uff1a\u7cfb\u7edf\u521b\u5efa\u4e0e\u914d\u7f6e\">\u57fa\u4e8eKVM\u865a\u62df\u5316\u7684\u8f6f\u8def\u7531DIY\uff08\u4e8c\uff09\uff1a\u7cfb\u7edf\u521b\u5efa\u4e0e\u914d\u7f6e<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u4e8eKVM\u7684\u8f6f\u8def\u7531DIY\uff08\u4e00\uff09\uff1a\u7f16\u8bd1OpenWrt \u4ec0\u4e48\u662f\u8f6f\u8def\u7531 \u8f6f\u8def\u7531\uff0c\u662f\u76f8\u5bf9\u4e8e\u4e00\u4e2a\u786c\u8def\u7531\u7684\u6982\u5ff5\uff0c\u786c\u8def\u7531\u5c31\u662f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":83,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,30],"tags":[28,5,26,27,25,29],"_links":{"self":[{"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=\/wp\/v2\/posts\/78"}],"collection":[{"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":13,"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":115,"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=\/wp\/v2\/media\/83"}],"wp:attachment":[{"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xiaotao2333.top:344\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}