2020-03-23 11:55:43 +08:00
欢迎来到Lean的Openwrt源码仓库!
=
Welcome to Lean's git source of OpenWrt and packages
=
中文:如何编译自己需要的 OpenWrt 固件
-
注意:
-
2020-03-23 17:20:01 +08:00
1. **不**要用 **root** 用户 git 和编译!!!
2020-03-23 11:55:43 +08:00
2. 国内用户编译前最好准备好梯子
3. 默认登陆IP 192.168.1.1, 密码 password
编译命令如下:
-
2020-03-26 23:17:44 +08:00
1. 首先装好 Ubuntu 64bit, 推荐 Ubuntu 18 LTS x64
2020-03-23 11:55:43 +08:00
2020-03-23 17:20:01 +08:00
2. 命令行输入 `sudo apt-get update` ,然后输入
`
2020-04-06 23:28:54 +08:00
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 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
2020-03-23 17:20:01 +08:00
`
2020-03-23 11:55:43 +08:00
2020-03-26 23:17:44 +08:00
3. 使用 `git clone https://github.com/coolsnowwolf/lede` 命令下载好源代码,然后 `cd lede` 进入目录
2020-03-23 11:55:43 +08:00
2020-03-23 17:20:01 +08:00
4. ```bash
2020-03-26 23:17:44 +08:00
./scripts/feeds update -a
2020-03-23 11:55:43 +08:00
./scripts/feeds install -a
2020-03-26 23:17:44 +08:00
make menuconfig
2020-03-23 17:20:01 +08:00
```
2020-03-23 11:55:43 +08:00
2020-03-26 23:17:44 +08:00
5. `make -j8 download v=s` 下载dl库( 国内请尽量全局科学上网)
2020-03-25 11:06:38 +08:00
2020-03-26 23:17:44 +08:00
6. 输入 `make -j1 V=s` ( -j1 后面是线程数。第一次编译推荐用单线程)即可开始编译你要的固件了。
2020-03-23 11:55:43 +08:00
2020-03-26 23:17:44 +08:00
本套代码保证肯定可以编译成功。里面包括了 R20 所有源代码,包括 IPK 的。
2020-03-23 11:55:43 +08:00
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
=
2020-03-25 11:06:38 +08:00
二次编译:
2020-03-26 23:17:44 +08:00
```bash
cd lede
git pull
./scripts/feeds update -a & & ./scripts/feeds install -a
make defconfig
make -j8 download
make -j$(($(nproc) + 1)) V=s
```
如果需要重新配置:
```bash
rm -rf ./tmp & & rm -rf .config
make menuconfig
make -j$(($(nproc) + 1)) V=s
```
2020-03-25 11:06:38 +08:00
编译完成后输出路径:/lede/bin/targets
2020-03-23 11:55:43 +08:00
特别提示:
------
2020-03-26 23:17:44 +08:00
1.源代码中绝不含任何后门和可以监控或者劫持你的 HTTPS 的闭源软件, SSL 安全是互联网最后的壁垒。安全干净才是固件应该做到的;
2020-03-23 11:55:43 +08:00
2.如有技术问题需要讨论,欢迎加入 QQ 讨论群: OP共享技术交流群 ,号码 297253733 ,加群链接: 点击链接加入群聊【OP共享技术交流群】: [点击加入 ](https://jq.qq.com/?_wv=1027&k=5yCRuXL "OP共享技术交流群" )
2020-03-23 14:37:37 +08:00
3.想学习OpenWrt开发, 但是摸不着门道? 自学没毅力? 基础太差? 怕太难学不会? 跟着佐大学OpenWrt开发入门培训班助你能学有所成
2020-03-23 11:55:43 +08:00
报名地址:[点击报名 ](http://forgotfun.org/2018/04/openwrt-training-2018.html "报名" )
2020-03-23 14:37:37 +08:00
## Donate
如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善
### Alipay 支付宝

### Wechat 微信
2020-03-26 23:17:44 +08:00
2020-03-23 14:37:37 +08:00

------
2020-03-23 17:20:01 +08:00
English Version: How to make your Openwrt firmware.
2020-03-23 11:55:43 +08:00
-
Note:
--
2020-03-23 17:20:01 +08:00
1. DO **NOT** USE **ROOT** USER TO CONFIGURE!!!
2020-03-23 11:55:43 +08:00
2020-03-23 17:20:01 +08:00
2. Login IP is 192.168.1.1 and login password is "password".
2020-03-23 11:55:43 +08:00
Let's start!
---
2020-03-23 17:20:01 +08:00
First, you need a computer with a linux system. It's better to use Ubuntu 18 LTS 64-bit.
2020-03-23 11:55:43 +08:00
Next you need gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers installed.
2020-03-26 23:17:44 +08:00
To install these program, please login root users and type
2020-03-23 17:20:01 +08:00
`
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 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
`
in terminal
2020-03-23 11:55:43 +08:00
2020-03-23 17:20:01 +08:00
Third, logout of root users. And type this `git clone https://github.com/coolsnowwolf/lede` in terminal to clone this source.
2020-03-23 11:55:43 +08:00
2020-03-23 17:20:01 +08:00
After these please type `cd lede` to cd into the source.
2020-03-23 11:55:43 +08:00
2020-03-23 17:20:01 +08:00
Please Run `./scripts/feeds update -a` to get all the latest package definitions
defined in `feeds.conf` / `feeds.conf.default` respectively
and `./scripts/feeds install -a` to install symlinks of all of them into
`package/feeds/` .
2020-03-26 23:17:44 +08:00
2020-03-23 17:20:01 +08:00
Please use `make menuconfig` to choose your preferred
2020-03-23 11:55:43 +08:00
configuration for the toolchain and firmware.
2020-03-23 17:20:01 +08:00
Use `make menuconfig` to configure your image.
2020-03-23 11:55:43 +08:00
2020-03-23 17:20:01 +08:00
Simply running `make` will build your firmware.
2020-03-26 23:17:44 +08:00
It will download all sources, build the cross-compile toolchain,
2020-03-23 11:55:43 +08:00
the kernel and all choosen applications.
To build your own firmware you need to have access to a Linux, BSD or MacOSX system
(case-sensitive filesystem required). Cygwin will not be supported because of
the lack of case sensitiveness in the file system.
2020-03-23 17:20:01 +08:00
## Note: Addition Lean's private package source code in `./package/lean` directory. Use it under GPL v3.
## GPLv3 is compatible with more licenses than GPLv2: it allows you to make combinations with code that has specific kinds of additional requirements that are not in GPLv3 itself. Section 7 has more information about this, including the list of additional requirements that are permitted.