doc: sync README_EN.md to latest (#11466)

Co-authored-by: KKtheGhost <im@kivinsae.com>
This commit is contained in:
Kivinsae Fang 2023-08-20 23:30:25 +08:00 committed by GitHub
parent 38595344c2
commit 81565cb91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 276 additions and 52 deletions

View File

@ -1,6 +1,6 @@
# 欢迎来到 Lean 的 LEDE 源码仓库
如何编译自己需要的 LEDE 固件 [How to build your LEDE firmware](./README_EN.md)
I18N: [English](README_EN.md) | [简体中文](README.md)
## 官方讨论群
如有技术问题需要讨论或者交流,欢迎加入以下群:

View File

@ -1,88 +1,312 @@
Welcome to Lean's git source of OpenWrt and packages
=
# Welcome to Lean's git source of OpenWrt and packages
How to build your Openwrt firmware.
-
Note:
--
1. DO **NOT** USE **root** USER FOR COMPILING!!!
I18N: [English](README_EN.md) | [简体中文](README.md)
2. Users within China should prepare proxy before building.
## Official Channels
<!--
如有技术问题需要讨论或者交流,欢迎加入以下群:
1. QQ 讨论群: Op固件技术研究群 ,号码 891659613 ,加群链接:[点击加入](https://jq.qq.com/?_wv=1027&k=XL8SK5aC "Op固件技术研究群")
2. TG 讨论群: OP 编译官方大群 ,加群链接:[点击加入](https://t.me/JhKgAA6Hx1 "OP 编译官方大群")
3. Rockchip RK3568 预编译固件发布 Release 下载更新地址 (包括 H68K )<https://github.com/coolsnowwolf/lede/releases/tag/20220716>
-->
3. Web admin panel default IP is 192.168.1.1 and default password is "password".
If you have technical questions for discussion or sharing, feel free to join the following channels:
1. QQ Group: *OpenWRT Firmware Technical Research Group*, Group Number is `891659613`. Join the group: [Link](https://jq.qq.com/?_wv=1027&k=XL8SK5aC "Op固件技术研究群").
- [Click to download QQ client](https://im.qq.com/pcqq).
2. Telegram Group: *OpenWRT Firmware Technical Research Group*. Join the group: [Link](https://t.me/JhKgAA6Hx1 "OP 编译官方大群").
3. Rockchip **RK3568** precompiled firmware release (including H68K): [Click to download](https://github.com/coolsnowwolf/lede/releases/tag/20220716).
Let's start!
---
1. First, install Ubuntu 64bit (Ubuntu 20.04 LTS x86 is recommended).
<div align="left">
<a href="https://item.taobao.com/item.htm?spm=a230r.1.14.11.4bb55247rdHEAP&id=702787603594&ns=1&abbucket=17#detail
">
<img style="margin: 0px 0px 0px 40px;" src="https://github.com/coolsnowwolf/lede/blob/master/doc/h68k.jpg?raw=true" width=600 />
</a>
</div>
2. Run `sudo apt-get update` in the terminal, and then run
`
sudo apt-get -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
`
4. Rockchip **RK3588** precompiled firmware release (including H68K): [Click to download](https://github.com/coolsnowwolf/lede/releases/tag/20230609).
3. Run `git clone https://github.com/coolsnowwolf/lede` to clone the source code, and then `cd lede` to enter the directory
4. ```bash
## Notice
<!--
1. **不要用 root 用户进行编译**
2. 国内用户编译前最好准备好梯子
3. 默认登陆IP 192.168.1.1 密码 password
-->
1. **Never compile OpenWRT as `root`**
2. If you are living in mainland China, please make sure you could visit the **REAL** Internet.
3. Default login IP is `192.168.1.1`, password is `password`.
## How to Compile
<!--
1. 首先装好 Linux 系统,推荐 Debian 11 或 Ubuntu LTS
2. 安装编译依赖
```bash
sudo apt update -y
sudo apt full-upgrade -y
sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
vim wget xmlto xxd zlib1g-dev python3-setuptools
```
-->
1. Install a Linux distribution, Debian 11 or Ubuntu LTS is recommended.
2. Install dependencies:
```bash
sudo apt update -y
sudo apt full-upgrade -y
sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
vim wget xmlto xxd zlib1g-dev python3-setuptools
```
<!--
3. 下载源代码,更新 feeds 并选择配置
```bash
git clone https://github.com/coolsnowwolf/lede
cd lede
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
```
5. Run `make -j8 download V=s` to download libraries and dependencies (user in China should use global proxy when possible)
4. 下载 dl 库,编译固件
-j 后面是线程数,第一次编译推荐用单线程)
6. Run `make -j1 V=s` (integer following -j is the thread count, single-thread is recommended for the first build) to start building your firmware.
```bash
make download -j8
make V=s -j1
```
-->
This source code is promised to be compiled successfully.
3. Clone the source code, update `feeds` and configure:
You can use this source code freely, but please link this GitHub repository when redistributing. Thank you for your cooperation!
=
```bash
git clone https://github.com/coolsnowwolf/lede
cd lede
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
```
4. Download libraries and compile firmware
> (`-j` is the thread count, single-thread is recommended for the first build):
```bash
make -j8 download V=s
make -j1 V=s
```
<!--
本套代码保证肯定可以编译成功。里面包括了 R23 所有源代码,包括 IPK 的。
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
-->
These commands are supposed to compile the source code successfully.
All source code of R23 is included, including IPK.
You can use this source code freely, but please link this GitHub repository when redistributing.
Thank you for your cooperation!
<!--
二次编译:
Rebuild:
```bash
cd lede
git pull
./scripts/feeds update -a && ./scripts/feeds install -a
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make -j8 download
make -j$(($(nproc) + 1)) V=s
make download -j8
make V=s -j$(nproc)
```
If reconfiguration is need:
如果需要重新配置:
```bash
rm -rf ./tmp && rm -rf .config
make menuconfig
make -j$(($(nproc) + 1)) V=s
make V=s -j$(nproc)
```
Build result will be produced to `bin/targets` directory.
编译完成后输出路径bin/targets
-->
Special tips:
------
1. This source code doesn't contain any backdoors or close source applications that can monitor/capture your HTTPS traffic, SSL is the final castle of cyber security. Safety is what a firmware should achieve.
Rebuild:
2. If you have any technical problem, you may join the QQ discussion group: 297253733, link: click [here](https://jq.qq.com/?_wv=1027&k=5yCRuXL)
```bash
cd lede
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make V=s -j$(nproc)
```
3. Want to learn OpenWrt development but don't know how? Can't motivate yourself for self-learning? Not enough fundamental knowledge? Learn OpenWrt development with Mr. Zuo through his Beginner OpenWrt Training Course. Click [here](http://forgotfun.org/2018/04/openwrt-training-2018.html) to register.
If reconfiguration is need:
## Router Recommendation
Not Sponsored: If you are finding a low power consumption, small and performance promising x86/x64 router, I personally recommend the
EZPROv1 Alumium Edition (N3710 4000M): [Details](https://item.taobao.com/item.htm?spm=a230r.1.14.20.144c763fRkK0VZ&id=561126544764)
```bash
rm -rf ./tmp && rm -rf .config
make menuconfig
make V=s -j$(nproc)
```
![xm1](doc/xm5.jpg)
![xm2](doc/xm6.jpg)
Build artifacts will be outputted to `bin/targets` directory.
### If you are using WSL/WSL2 as your build environment
<!--
由于默认情况下,装载到 WSL 发行版的 NTFS 格式的驱动器将不区分大小写,因此大概率在 WSL/WSL2 的编译检查中会返回以下错误:
```txt
Build dependency: OpenWrt can only be built on a case-sensitive filesystem
```
一个比较简洁的解决方法是,在 `git clone` 前先创建 Repository 目录,并为其启用大小写敏感:
```powershell
# 以管理员身份打开终端
PS > fsutil.exe file setCaseSensitiveInfo <your_local_lede_path> enable
# 将本项目 git clone 到开启了大小写敏感的目录 <your_local_lede_path>
PS > git clone git@github.com:coolsnowwolf/lede.git <your_local_lede_path>
```
> 对已经 `git clone` 完成的项目目录执行 `fsutil.exe` 命令无法生效,大小写敏感只对新增的文件变更有效。
-->
NTFS-formatted drives mounted to a WSL distribution will be case-insensitive by default. This will cause the following error when compiling in WSL/WSL2:
```txt
Build dependency: OpenWrt can only be built on a case-sensitive filesystem
```
A simple solution is to create a case-sensitive directory for the repository before `git clone`:
```powershell
# Open a terminal as administrator
PS > fsutil.exe file setCaseSensitiveInfo <your_local_lede_path> enable
# Clone this repository to the case-sensitive directory <your_local_lede_path>
PS > git clone git@github.com:coolsnowwolf/lede.git <your_local_lede_path>
```
> For directories that have already been `git clone`d, `fsutil.exe` will not take effect. Case sensitivity will only be enabled for new changes in the directory.
### macOS Compilation
<!--
1. 在 AppStore 中安装 Xcode
2. 安装 Homebrew
```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
3. 使用 Homebrew 安装工具链、依赖与基础软件包:
```bash
brew unlink awk
brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep make ncurses pkg-config wget quilt xz
brew install gcc@11
```
4. 然后输入以下命令,添加到系统环境变量中:
```bash
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
```
5. 重新加载一下 shell 启动文件 `source ~/.bashrc`,然后输入 `bash` 进入 bash shell就可以和 Linux 一样正常编译了
-->
1. Install Xcode from AppStore
2. Install Homebrew:
```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
3. Install toolchain, dependencies and packages with Homebrew:
```bash
brew unlink awk
brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep make ncurses pkg-config wget quilt xz
brew install gcc@11
```
4. Update your system environment:
```bash
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
```
5. Reload your shell profile `source ~/.bashrc && bash`, then you can compile normally like Linux.
## Declaration
<!--
1. 源代码中绝不含任何后门和可以监控或者劫持你的 HTTPS 的闭源软件, SSL 安全是互联网最后的壁垒。安全干净才是固件应该做到的;
2. 想学习 OpenWrt 开发,但是摸不着门道?自学没毅力?基础太差?怕太难学不会?跟着佐大学 OpenWrt 开发入门培训班助你能学有所成
报名地址:[点击报名](http://forgotfun.org/2018/04/openwrt-training-2018.html "报名")
3. QCA IPQ60xx 开源仓库地址:<https://github.com/coolsnowwolf/openwrt-gl-ax1800>
4. 存档版本仓库地址:<https://github.com/coolsnowwolf/openwrt>
-->
1. This source code doesn't contain any backdoors or closed source applications that can monitor/capture your HTTPS traffic. SSL security is the final castle of cyber security. Safety is what a firmware should do.
2. Want to learn OpenWRT development but don't know how to start? Can't motivate yourself for self-learning? Do not have enough fundamental knowledge? Learn OpenWRT development with Mr. Zuo through his Beginner OpenWRT Training Course. Click [here](http://forgotfun.org/2018/04/openwrt-training-2018.html) to register.
3. QCA IPQ60xx open source repository: <https://github.com/coolsnowwolf/openwrt-gl-ax1800>
4. OpenWRT Archive repository: <https://github.com/coolsnowwolf/openwrt>
## Introduction to Software Routers
<!--
硬酷R2 - N95/N300迷你四网HomeLab服务器
(商品介绍页面 - 硬酷科技(支持花呗))
[预售链接](https://item.taobao.com/item.htm?ft=t&id=719159813003)
[![r1](doc/r1.jpg)](https://item.taobao.com/item.htm?ft=t&id=719159813003)
-->
Yingku R2 - N95/N300 Mini Four-Network HomeLab Server
(Introduction page - Yingku Technology (support AliPay Huabei)):
[Pre-sale link](https://item.taobao.com/item.htm?ft=t&id=719159813003)
<div align="left">
<a href="https://item.taobao.com/item.htm?ft=t&id=719159813003">
<img src="doc/r1.jpg" width = "600" alt="" align=center />
</a>
</div>
<br>
## Donation
If this project does help you, please consider donating to support the development of this project.
<!--
如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善
### Alipay
![star](doc/star.png)
-->
If this project did helped you, please consider donating to support the development of this project.
![alipay](doc/alipay_donate.jpg)
### WeChat
![wechat](doc/wechat_donate.jpg)
## 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.
<div align="left">
<img src="./doc/star.png" width = "400" alt="" align=center />
</div>
<br>