User Tools

Site Tools


compile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
compile [2019/06/23 06:04] – [编译] mangogeekcompile [2025/10/14 06:22] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +=====做好的虚拟机=====
 +https://pan.baidu.com/s/1HyuF0Oe-rvca8KoufMXemg
 +分卷解压,系统密码:111111
  
 =====搭建编译环境===== =====搭建编译环境=====
-编译OpenWrt需要Linux环境或mac环境,不支持Windows如果要在Windows上开发,那么肯定是要装虚拟机+编译OpenWrt需要Linux环境或mac环境,或win10下的WSL(Ubuntu16.04)或者安装虚拟机。
  
-===若不想折腾,下载虚拟机(vmdk格式,默认virtualbox,可能需要重新安装增强功能)=== 
-[[http://dl.widyun.com/Ubuntu14.04x64.vmdk.zip|Ubuntu14.04x64.vmdk]]虚拟机用户名:widora 密码:111111 
  
  
-=== Linux(建议使用Ubuntu14.04/16.04 32位/64位版本) ===+=== Linux,WSL(建议使用Ubuntu16.04)===
 <wrap hi>注意1: 在Ubuntu18.04上编译将无法通过,所以推荐使用低版本编译</wrap>  \\ <wrap hi>注意1: 在Ubuntu18.04上编译将无法通过,所以推荐使用低版本编译</wrap>  \\
 <wrap hi>注意2: 如果提示找不到openjdk-8-jdk,可以试试openjdk-7-jdk</wrap>  \\ <wrap hi>注意2: 如果提示找不到openjdk-8-jdk,可以试试openjdk-7-jdk</wrap>  \\
Line 21: Line 22:
   $ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386   $ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
 </code> </code>
-===macOS===+ 
 +===macOS(未测试Catalina)===
 首先从APP Store中安装Xcode command line tools,再安装[brew]工具,接下来使用brew安装依赖: 首先从APP Store中安装Xcode command line tools,再安装[brew]工具,接下来使用brew安装依赖:
 <code bash> <code bash>
Line 47: Line 49:
 Written by David MacKenzie. Written by David MacKenzie.
 </code> </code>
- 
-===Windows=== 
-Windows的话只能用虚拟机了,可以看这篇文章:{{ ::ubuntu环境搭建.pdf |}} 
 =====下载源码===== =====下载源码=====
-Download the code,master branch+下载代码,master分支
 <code bash> <code bash>
   $ git clone https://github.com/widora/openwrt_widora.git   $ git clone https://github.com/widora/openwrt_widora.git
-  //or +如果太慢就用镜像地址 
-  $ git clone https://dev.tencent.com/u/widora/p/openwrt_widora+  $ git clone https://github.com.cnpmjs.org/widora/openwrt_widora.git 
 </code> </code>
  
Line 64: Line 64:
 更新完后,由于本地编译环境有上次的残留,会造成异常,最好做如下清理工作(在openwrt_widora文件夹目录内): 更新完后,由于本地编译环境有上次的残留,会造成异常,最好做如下清理工作(在openwrt_widora文件夹目录内):
   - make clean   - make clean
-  - rm .config 
-  - rm -r tmp/ 
   - /scripts/feeds update -a   - /scripts/feeds update -a
   - /scripts/feeds install -a   - /scripts/feeds install -a
 +  - rm -r tmp/
 +  - rm .config
 重启ubuntu系统后 重启ubuntu系统后
   - make menuconfig   - make menuconfig
 =====编译===== =====编译=====
-因为众所周知的原因,在国内编译OpenWrt很困难,有很多包被墙无法下载。 +下载依赖 
-我们提供了一个dl镜像的地方,推荐如果编译过程中发现某些包找不到,那么就来[[http://dl.widyun.com/dl]]找一下,下载后放到openwrt_widora根目录中的dl文件夹内即可,减少编译时间。+  $make download V=s 
 +  
 + 
 +因为众所周知的原因,在国内编译OpenWrt很困难,有很多包被墙无法下载。我们提供了一个dl镜像的链接:https://pan.baidu.com/s/1j9qZ2G7zyF7h5YF3nQJ4SA 
  
 更新并安装软件包 更新并安装软件包
Line 80: Line 83:
 </code> </code>
 配置OpenWrt 配置OpenWrt
 +  $ rm .config
   $ make menuconfig   $ make menuconfig
 选择项 选择项
Line 109: Line 113:
 快速编译命令是$ make -j4 \\ 快速编译命令是$ make -j4 \\
 可能会由于环境或网络问题出错,想查看错误信息需要用 $ make V=s 命令 \\ 可能会由于环境或网络问题出错,想查看错误信息需要用 $ make V=s 命令 \\
-整个编译在dl文件夹完整的情况下持续1个小时左右,编译完会在bin/ramips目录生成固件,名字类似:  \\+整个编译在dl文件夹完整的情况下持续1个小时左右,编译完会在bin/ramips目录生成固件,大概6MB,名字类似如下:  \\
   openwrt-ramips-mt7688-WIDORAxxxx-squashfs-sysupgrade.bin    openwrt-ramips-mt7688-WIDORAxxxx-squashfs-sysupgrade.bin 
      
 =====U-Boot编译(环境仅支持LINUX)===== =====U-Boot编译(环境仅支持LINUX)=====
 +
 +<html>
 +<iframe src="//player.bilibili.com/player.html?aid=36011142&cid=63217359&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" style="width: 640px; height: 430px; max-width: 100%" allowfullscreen="true"> </iframe>
 +</html>
 使用git工具下载u-boot-mt7688源码 使用git工具下载u-boot-mt7688源码
   $git clone https://github.com/widora/u-boot-mt7688.git   $git clone https://github.com/widora/u-boot-mt7688.git
compile.1561269844.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki