{"id":2376,"date":"2018-10-27T14:40:19","date_gmt":"2018-10-27T06:40:19","guid":{"rendered":"http:\/\/www.51cos.com\/?p=2376"},"modified":"2018-10-30T12:23:02","modified_gmt":"2018-10-30T04:23:02","slug":"openwrt-v18-06-1%e4%b8%8b%e8%bd%bd%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=2376","title":{"rendered":"OpenWrt v18.06.1\u4e0b\u8f7d\u7f16\u8bd1\u5168\u8fc7\u7a0b(MT7628AN+MT7612EN+64MB DDR+8M SNOR\u8def\u7531\u5668)"},"content":{"rendered":"<p>\u6211\u7528\u4e00\u53f0ubuntu 12.04\u4f5c\u4e3a\u670d\u52a1\u5668\uff0c\u4e00\u53f0windows\u7535\u8111\u5f00\u53d1\u7528\uff0c\u4e24\u53f0\u7535\u8111\u8fde\u63a5\u5230\u540c\u4e00\u4e2a\u8def\u7531\u5668\u4e0a\u3002<\/p>\n<p>\u4e3a\u4e86\u8282\u7701\u7cfb\u7edf\u8d44\u6e90\uff0c\u6211\u51b3\u5b9a\u5728windows\u7aef\u7528ssh\u8fdc\u7a0b\u767b\u5f55\u3002<\/p>\n<p>\u628aubuntu\u7684SSH\u529f\u80fd\u6253\u5f00\uff0c<\/p>\n<p> #\u8bbe\u7f6eroot\u6743\u9650<br \/>\nsudo passwd root #\u8f93\u5165\u65b0\u5bc6\u7801<br \/>\nsu &#8211;\u00a0\u00a0\u00a0\u00a0\u00a0  #\u5207\u6362\u5230root\u7528\u6237\u4e0b<\/p>\n<p>apt-get install openssh-server<\/p>\n<p>ps -e | grep ssh #\u6709sshd,\u8bf4\u660essh\u670d\u52a1\u5df2\u7ecf\u542f\u52a8\uff0c\u5982\u679c\u6ca1\u6709\u542f\u52a8\uff0c\u8f93\u5165\uff1a<\/p>\n<p>service ssh start<\/p>\n<p>#\u4fee\u6539\/etc\/rc.local\u6587\u4ef6\uff0c\u5728exit 0\u8fd9\u4e00\u53e5\u7684\u524d\u9762\uff0c\u6dfb\u52a0\/etc\/init.d\/ssh start\u53ef\u8ba9\u6b64\u670d\u52a1\u5f00\u673a\u81ea\u52a8\u542f\u52a8<\/p>\n<p>#\u6253\u5f00\u4e0b\u9762\u7684\u6587\u4ef6\uff0c\u5c06PermitRootLogin\u7684\u503c\u6539\u4e3ayes<br \/>\ngedit \/etc\/ssh\/sshd_config<\/p>\n<p>#\u56e0\u4e3aroot\u8d26\u6237\u8bbe\u7f6e\u4e86\u5bc6\u7801\uff0c\u6240\u4ee5\u8fd8\u8981\u66f4\u6539PermitEmptyPasswords\u4e3ano\uff0c\u7136\u540e\u4fdd\u5b58\u6587\u4ef6\u3002<\/p>\n<p>services ssh restart #\u91cd\u542fssh\u670d\u52a1<\/p>\n<p>\u5728Windows\u7535\u8111\u4e0a\uff0c\u7528SecureCRT\u7b49\u5de5\u5177\uff0c\u53ef\u8fdc\u7a0b\u767b\u5f55SSH\u670d\u52a1\u5668\u3002<\/p>\n<p>\u4e0b\u8f7dOpenWRT\u6700\u65b0\u6e90\u7801\uff1a<\/p>\n<p>git clone https:\/\/github.com\/openwrt\/openwrt.git<\/p>\n<p>#\u67e5\u770b\u6240\u6709\u7684tag<br \/>\ngit tag<\/p>\n<p>#\u67e5\u770b\u6700\u65b0\u7a33\u5b9a\u7248\u672c\u5bf9\u5e94\u7684\u7248\u672c\u53f7<br \/>\ngit show v18.06.1<\/p>\n<p>commit 70255e3d624cd393612069aae0a859d1acbbeeae<br \/>\nAuthor: Jo-Philipp Wich <jo@mein.io><br \/>\nDate:   Thu Aug 16 18:36:48 2018 +0200<\/p>\n<p>    OpenWrt v18.06.1: adjust config defaults<\/p>\n<p>    Signed-off-by: Jo-Philipp Wich <jo@mein.io><\/p>\n<p>diff &#8211;git a\/feeds.conf.default b\/feeds.conf.default<br \/>\nindex 763a269..9dddc19 100644<br \/>\n&#8212; a\/feeds.conf.default<br \/>\n+++ b\/feeds.conf.default<\/p>\n<p>#\u5c06\u6700\u65b0\u6e90\u7801\u5207\u6362\u5230v18.06.1\u7a33\u5b9a\u7248\u672c\u5bf9\u5e94\u7684\u7248\u672c\u53f7<br \/>\ngit reset &#8211;hard 70255e3d624cd393612069aae0a859d1acbbeeae<\/p>\n<p>\/config : configuration files for menuconfig<br \/>\n\/include : makefile configuration files<br \/>\n\/package : packages makefile and configuration<br \/>\n\/scripts : miscellaneous scripts used throughout the build process<br \/>\n\/target : makefile and configuration for building imagebuilder, kernel, sdk and the toolchain built by buildroot.<br \/>\n\/toolchain : makefile and configuration for building the toolchain<br \/>\n\/tools : miscellaneous tools used throughout the build process<\/p>\n<p>\u7f51\u4e0a\u7684\u7f16\u8bd1\u6559\u7a0b\u5f88\u591a\uff0c\u4e3a\u4e86\u907f\u514d\u8d70\u5f2f\u8def\uff0c\u6211\u8fd8\u662f\u4ee5openwrt\u5b98\u7f51\u7684\u53c2\u8003\u8d44\u6599\u4e3a\u51c6\uff1a<\/p>\n<p>#\u7f16\u8bd1\u524d\uff0c\u5b89\u88c5\u4f9d\u8d56\u7684\u5e93\u548c\u5de5\u5177\uff0cBuild system \u2013 Installation<br \/>\nhttps:\/\/openwrt.org\/docs\/guide-developer\/build-system\/install-buildsystem<\/p>\n<p>#Ubuntu 12.04 LTS\uff1a<\/p>\n<p>sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip  <\/p>\n<p> #Updating Feeds\uff1ahttps:\/\/openwrt.org\/docs\/guide-developer\/build-system\/use-buildsystem<br \/>\n#Installing in context of .\/scripts\/feeds script means \u201cmaking package available in make menuconfig\u201d rather than really installing or compiling package.<\/p>\n<p>#Update feeds:<br \/>\n.\/scripts\/feeds update -a<\/p>\n<p>#Make downloaded package\/packages available in make menuconfig:.\/scripts\/feeds install &lt;PACKAGENAME&gt;<\/p>\n<p>.\/scripts\/feeds install -a -p luci<\/p>\n<p>#\u5b89\u88c5all packages\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5b89\u88c5\u5305\u8fc7\u5927\uff0c\u8fd9\u91cc\u6211\u5148\u4e0d\u6267\u884c:<br \/>\n.\/scripts\/feeds install -a<\/p>\n<p>#\u63a5\u4e0b\u6765\u662fImage Configuration<br \/>\n#Typical actions:<\/p>\n<p>#run make menuconfig and set target;<br \/>\n#run make defconfig to set default config for build system and device;<br \/>\n#run make menuconfig and modify set of package;<br \/>\n#run make download (download all dependency source files before final make, enables multi-core compilation);<br \/>\n#run scripts\/diffconfig.sh &gt;mydiffconfig (save your changes in the text file mydiffconfig);<\/p>\n<p>Target System (MediaTek Ralink MIPS)  &#8212;><br \/>\nSubtarget (MT76x8 based boards)  &#8212;><br \/>\nTarget Profile (MediaTek MT7628 EVB)  &#8212;><br \/>\nLuCI\u2014>Collections\u2014\u2013 <*> luci #\u6dfb\u52a0Luci<br \/>\nLuCI\u2014>Translations\u2014- <*> luci-i18n-chinese   #\u6dfb\u52a0\u4e2d\u6587<\/p>\n<p>#\u6700\u540e\u662f\u7f16\u8bd1\uff0c\u4e00\u822c\u60c5\u51b5\uff0c\u4f7f\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u547d\u4ee4\uff1a<br \/>\nmake    #\u9ed8\u8ba4\u5b89\u88c5\uff0c\u65e0\u63d0\u793a<br \/>\n#\u6216\u8005make  V=99   #V=99\u8868\u793a\u8f93\u51fadebug\u4fe1\u606f\uff0cV\u4e00\u5b9a\u8981\u5927\u5199<br \/>\n#\u6216\u8005make -j V=99  #\u5982\u679c\u8981\u8ba9CPU\u5168\u901f\u7f16\u8bd1\uff0c\u5c31\u52a0\u4e0a -j \u53c2\u6570\uff0c\u7b2c\u4e00\u6b21\u7f16\u8bd1\u6700\u597d\u4e0d\u5e26-j\u53c2\u6570\uff0c\u5e38\u89c4\u7528\u6cd5\u4e3a <\u60a8cpu\u5904\u7406\u5668\u7684\u6570\u76ee + 1><\/p>\n<p> #\u7f16\u8bd1\u9519\u8bef\u4e0e\u89e3\u51b3\u529e\u6cd5\uff1a<br \/>\nconfigure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)<br \/>\n#\u89e3\u51b3\u65b9\u6cd5\uff1aexport FORCE_UNSAFE_CONFIGURE=1<\/p>\n<p>#\u7f16\u8bd1\u9519\u8bef:openwrt-ramips-***-XXX-squashfs-sysupgrade.bin is too big,failed to build firmware.<\/p>\n<p>#\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<p> git diff  target\/linux\/ramips\/image\/mt76x8.mk<br \/>\ndiff &#8211;git a\/target\/linux\/ramips\/image\/mt76x8.mk b\/target\/linux\/ramips\/image\/mt76x8.mk<br \/>\nindex 21c5357..79b9680 100644<br \/>\n&#8212; a\/target\/linux\/ramips\/image\/mt76x8.mk<br \/>\n+++ b\/target\/linux\/ramips\/image\/mt76x8.mk<br \/>\n@@ -84,7 +84,7 @@ TARGET_DEVICES += miwifi-nano<br \/>\n define Device\/mt7628<br \/>\n   DTS := MT7628<br \/>\n   BLOCKSIZE := 64k<br \/>\n&#8211;  IMAGE_SIZE := <span class=\"katex math inline\">(ralink_default_fw_size_4M)<br \/>\n+  IMAGE_SIZE :=<\/span>(ralink_default_fw_size_8M)<br \/>\n   DEVICE_TITLE := MediaTek MT7628 EVB<br \/>\n   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport<br \/>\n endef<\/p>\n<p> \u53c2\u8003\u6587\u6863\uff1a<br \/>\nhttps:\/\/openwrt.org\/docs\/guide-developer\/build.wndr3700<br \/>\nBuilding, deploying and testing your application\uff1ahttps:\/\/openwrt.org\/docs\/guide-developer\/helloworld\/chapter5<br \/>\n\u4f7f\u7528\u955c\u50cf\u751f\u6210\u5de5\u5177 (Image Builder)\uff1ahttps:\/\/openwrt.org\/zh\/docs\/guide-user\/additional-software\/imagebuilder?s[]=build<br \/>\nOpenWrt\u7f16\u8bd1 \u2013 \u8bf4\u660e\uff1ahttps:\/\/openwrt.org\/zh-cn\/doc\/howto\/build?s[]=build<br \/>\n\u786c\u4ef6\u5217\u8868\uff1a\u56fa\u4ef6\u4e0b\u8f7d\uff1ahttps:\/\/openwrt.org\/zh\/toh_fwdownload  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u7528\u4e00\u53f0ubuntu 12.04\u4f5c\u4e3a\u670d\u52a1\u5668\uff0c\u4e00\u53f0windows\u7535\u8111\u5f00\u53d1\u7528\uff0c\u4e24\u53f0\u7535\u8111\u8fde\u63a5\u5230\u540c\u4e00\u4e2a\u8def\u7531\u5668\u4e0a\u3002 \u4e3a\u4e86 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2376","post","type-post","status-publish","format-standard","hentry","category-router"],"_links":{"self":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/2376","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=2376"}],"version-history":[{"count":7,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/2376\/revisions"}],"predecessor-version":[{"id":2384,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/2376\/revisions\/2384"}],"wp:attachment":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2376"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}