{"id":2926,"date":"2023-12-26T17:40:11","date_gmt":"2023-12-26T09:40:11","guid":{"rendered":"http:\/\/www.51cos.com\/?p=2926"},"modified":"2024-11-17T11:55:30","modified_gmt":"2024-11-17T03:55:30","slug":"%e4%bb%8egithub%e4%b8%8b%e8%bd%bdopenwrt%e4%bb%a3%e7%a0%81%ef%bc%8c%e5%9c%a8windows%e7%bc%96%e8%af%91%e5%85%a8%e8%bf%87%e7%a8%8b","status":"publish","type":"post","link":"http:\/\/www.51cos.com\/?p=2926","title":{"rendered":"\u4eceGithub\u4e0b\u8f7dOpenWRT\u4ee3\u7801\uff0c\u5728Windows\u7f16\u8bd1\u5168\u8fc7\u7a0b"},"content":{"rendered":"<p>\nStep1\uff1a\u5728Windows 10\u6216\u800511\u7684\u5e94\u7528\u5546\u5e97\u91cc\u9762\uff0c\u641c\u7d22UBUNTU\u5e76\u5b89\u88c5\uff0c\u6211\u5b89\u88c5\u7684\u662f18.04\u7248\u672c\uff1b<\/p>\n<p>Step 2\uff1a\u5728Windows\u5f00\u59cb\u83dc\u5355\u4e2d\uff0c\u627e\u5230Ubuntu\u5e76\u6253\u5f00\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8fdb\u884c\u5347\u7ea7\uff1a<\/p>\n<p>sudo apt update<\/p>\n<p>sudo apt install build-essential ccache ecj fastjar file g++ gawk \\<br \/>\ngettext git java-propose-classpath libelf-dev libncurses5-dev \\<br \/>\nlibncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \\<br \/>\npython3-distutils python3-setuptools python3-dev rsync subversion \\<br \/>\nswig time xsltproc zlib1g-dev<\/p>\n<p>Step 3\uff1a\u4e0b\u8f7d\u6e90\u7801<\/p>\n<p>git clone https:\/\/github.com\/openwrt\/openwrt.git<\/p>\n<p>\u5982\u679c\u901f\u5ea6\u6162\uff0c\u5148\u4e0b\u8f7d\u538b\u7f29\u5305\uff0c\u518d\u89e3\u538b<br \/>\nwget -c https:\/\/github.com\/openwrt\/openwrt\/archive\/refs\/heads\/main.zip<br \/>\nunzip main.zip<br \/>\ncd openwrt-main\/<br \/>\ngit init<br \/>\ngit add .<br \/>\ngit remote add origin https:\/\/github.com\/openwrt\/openwrt.git<br \/>\ngit remote update<br \/>\ngit pull<\/p>\n<p>\u82e5\u9047\u5230\u95ee\u9898\uff1aconfigure: error: you should not run configure as root<\/p>\n<p>\u89e3\u51b3\u529e\u6cd5\uff1a\u5207\u6362\u5230root\u7528\u6237\u6267\u884c\uff1aexport set FORCE_UNSAFE_CONFIGURE=1<\/p>\n<p>\u82e5\u9047\u5230\u95ee\u9898\uff1afatal: unable to access &#8216;https:\/\/github.com\/openwrt\/openwrt.git\/&#8217;: gnutls_handshake() failed: The TLS connection was non-properly terminated.<br \/>\nerror: Could not fetch origin<\/p>\n<p>\u89e3\u51b3\u529e\u6cd5\uff0c\u5728\u547d\u4ee4\u884c\u6267\u884c\uff1a<br \/>\ngit config &#8211;global &#8211;unset https.https:\/\/github.com.proxy &amp;amp;&amp;amp; git config &#8211;global &#8211;unset http.https:\/\/github.com.proxy<\/p>\n<p>Step 4\uff1a\u5207\u6362\u5206\u652f<br \/>\n\/\/\u67e5\u770b\u6240\u6709\u5206\u652f<br \/>\ngit branch -a<br \/>\n\/\/\u53ef\u4ee5\u5229\u7528tag\u5207\u6362<br \/>\ngit tag<br \/>\ngit checkout v23.05.0<br \/>\n\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5229\u7528\u5206\u652f\u540d<br \/>\nsudo git checkout  remotes\/origin\/openwrt-18.06<\/p>\n<p>Step 5\uff1a\u7f16\u8bd1\u524d\u51c6\u5907<br \/>\nsudo .\/scripts\/feeds update -a &#038;&#038; .\/scripts\/feeds install -a<\/p>\n<p>Step 6\uff1abuild <\/p>\n<p>make j=1 <\/p>\n<p>\/\/\u5982\u679cOPENWRT WEB\u9875\u9762\u6253\u4e0d\u5f00\uff0c\u5982\u4f55\u5347\u7ea7\u56fa\u4ef6\uff1f<\/p>\n<p>\u8fd0\u884cmake,\u7f16\u8bd1\u4e4b\u540e\u628a\u751f\u6210\u7684\u56fa\u4ef6\uff0c\u5229\u7528winscp\u6216\u8005\u8fd0\u884c\u547d\u4ee4\u62f7\u8d1d\u5230\u673a\u5668\uff1ascp openwrt-ramips-xxx-squashfs-sysupgrade.bin root@192.168.1.1:\/tmp\/\uff0c\u4f7f\u7528sysupgrade\u547d\u4ee4\u5347\u7ea7sysupgrade \/tmp\/openwrt-ramips-xxx-squashfs-sysupgrade.bin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step1\uff1a\u5728Windows 10\u6216\u800511\u7684\u5e94\u7528\u5546\u5e97\u91cc\u9762\uff0c\u641c\u7d22UBUNTU\u5e76\u5b89\u88c5\uff0c\u6211\u5b89\u88c5\u7684\u662f18.04\u7248\u672c\uff1b  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2926","post","type-post","status-publish","format-standard","hentry","category-life"],"_links":{"self":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/2926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2926"}],"version-history":[{"count":6,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/2926\/revisions"}],"predecessor-version":[{"id":2970,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/2926\/revisions\/2970"}],"wp:attachment":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2926"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}