mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
README: add missing build dependencies
Closed: #9213 Also fix all markdown formatting issues.
This commit is contained in:
parent
ad34521be6
commit
7581661eb8
65
README
65
README
@ -1,65 +0,0 @@
|
||||
Welcome to Lean's git source of OpenWrt and packages
|
||||
|
||||
中文:如何编译自己需要的 OpenWrt 固件
|
||||
|
||||
注意:
|
||||
1. 不要用 root 用户进行编译!!!
|
||||
2. 国内用户编译前最好准备好梯子
|
||||
3. 默认登陆IP 192.168.1.1, 密码 password
|
||||
|
||||
编译命令如下:
|
||||
|
||||
1. 首先装好 Ubuntu 64bit,推荐 Ubuntu 14 LTS x64
|
||||
|
||||
2. 命令行输入 sudo apt-get update ,然后输入
|
||||
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 linux-libc-dev:i386
|
||||
|
||||
3. git clone https://github.com/coolsnowwolf/lede 命令下载好源代码,然后 cd lede 进入目录
|
||||
|
||||
4. ./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
make menuconfig
|
||||
|
||||
5. 最后选好你要的路由,输入 make -j1 V=s (-j1 后面是线程数。第一次编译推荐用单线程,国内请尽量全局科学上网)即可开始编译你要的固件了。
|
||||
|
||||
本套代码保证肯定可以编译成功。里面包括了 R9 所有源代码,包括 IPK 的。
|
||||
|
||||
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
|
||||
|
||||
特别提示:
|
||||
1.源代码中绝不含任何后门和可以监控或者劫持你的 HTTPS 的闭源软件,SSL 安全是互联网最后的壁垒。安全干净才是固件应该做到的;
|
||||
2.如有技术问题需要讨论,欢迎加入 QQ 讨论群:OP共享技术交流群 ,号码 297253733 ,加群链接: 点击链接加入群聊【OP共享技术交流群】:https://jq.qq.com/?_wv=1027&k=5yCRuXL
|
||||
3. 想学习OpenWrt开发,但是摸不着门道?自学没毅力?基础太差?怕太难学不会?跟着佐大学OpenWrt开发入门培训班助你能学有所成
|
||||
报名地址:http://forgotfun.org/2018/04/openwrt-training-2018.html
|
||||
|
||||
去广告订阅地址默认内置来自以下源,如有去广告的误杀漏杀问题可以到这里报告:
|
||||
|
||||
https://github.com/privacy-protection-tools/anti-AD
|
||||
|
||||
|
||||
Please use "make menuconfig" to choose your preferred
|
||||
configuration for the toolchain and firmware.
|
||||
|
||||
You need gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers installed.
|
||||
|
||||
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/.
|
||||
|
||||
Use "make menuconfig" to configure your image.
|
||||
|
||||
Simply running "make" will build your firmware.
|
||||
It will download all sources, build the cross-compile toolchain,
|
||||
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.
|
||||
|
||||
|
||||
|
||||
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.
|
||||
|
153
README.md
153
README.md
@ -1,117 +1,116 @@
|
||||
欢迎来到Lean的Openwrt源码仓库!
|
||||
=
|
||||
# 欢迎来到 Lean 的 Openwrt 源码仓库
|
||||
|
||||
[English](./README_EN.md)
|
||||
如何编译自己需要的 OpenWrt 固件 [English](./README_EN.md)
|
||||
|
||||
QCA IPQ6000 (GL.iNet GL-AX1800)系列固件仓库地址:
|
||||
[https://github.com/coolsnowwolf/openwrt-gl-ax1800](https://github.com/coolsnowwolf/openwrt-gl-ax1800)
|
||||
-
|
||||
## 注意
|
||||
|
||||
如何编译自己需要的 OpenWrt 固件
|
||||
-
|
||||
注意:
|
||||
-
|
||||
1. **不**要用 **root** 用户进行编译!!!
|
||||
1. **不要用 root 用户进行编译**
|
||||
2. 国内用户编译前最好准备好梯子
|
||||
3. 默认登陆IP 192.168.1.1 密码 password
|
||||
|
||||
## 编译命令
|
||||
|
||||
编译命令如下:
|
||||
-
|
||||
1. 首先装好 Ubuntu 64bit,推荐 Ubuntu 20.04 LTS x64
|
||||
1. 首先装好 Linux 系统,推荐 Debian 11 或 Ubuntu LTS
|
||||
|
||||
2. 命令行输入 `sudo apt-get update` ,然后输入
|
||||
`
|
||||
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
|
||||
`
|
||||
2. 安装编译依赖
|
||||
|
||||
3. 使用 `git clone https://github.com/coolsnowwolf/lede` 命令下载好源代码,然后 `cd lede` 进入目录
|
||||
```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-pip qemu-utils \
|
||||
rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
|
||||
```
|
||||
|
||||
4. ```bash
|
||||
3. 下载源代码,更新 feeds 并选择配置
|
||||
|
||||
```bash
|
||||
git clone https://github.com/coolsnowwolf/lede
|
||||
cd lede
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
make menuconfig
|
||||
```
|
||||
|
||||
5. `make -j8 download V=s` 下载dl库(国内请尽量全局科学上网)
|
||||
4. 下载 dl 库,编译固件
|
||||
(-j 后面是线程数,第一次编译推荐用单线程)
|
||||
|
||||
6. 输入 `make -j1 V=s` (-j1 后面是线程数。第一次编译推荐用单线程)即可开始编译你要的固件了。
|
||||
```bash
|
||||
make download -j8
|
||||
make V=s -j1
|
||||
```
|
||||
|
||||
本套代码保证肯定可以编译成功。里面包括了 R21 所有源代码,包括 IPK 的。
|
||||
|
||||
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
|
||||
=
|
||||
|
||||
二次编译:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
如果需要重新配置:
|
||||
|
||||
```bash
|
||||
rm -rf ./tmp && rm -rf .config
|
||||
make menuconfig
|
||||
make -j$(($(nproc) + 1)) V=s
|
||||
make V=s -j$(nproc)
|
||||
```
|
||||
|
||||
编译完成后输出路径:bin/targets
|
||||
|
||||
如果你使用WSL或WSL2进行编译:
|
||||
------
|
||||
由于wsl的PATH路径中包含带有空格的Windows路径,有可能会导致编译失败,请在将make -j1 V=s或make -j$(($(nproc) + 1)) V=s改为
|
||||
### 如果你使用 WSL/WSL2 进行编译
|
||||
|
||||
由于 WSL 的 PATH 中包含带有空格的 Windows 路径,有可能会导致编译失败,请在 `make` 前面加上:
|
||||
|
||||
首次编译:
|
||||
```bash
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make -j1 V=s
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
```
|
||||
二次编译:
|
||||
```bash
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make -j$(($(nproc) + 1)) V=s
|
||||
```
|
||||
------
|
||||
macOS 原生系统进行编译:
|
||||
------
|
||||
1.在 AppStore 中安装 Xcode
|
||||
|
||||
### macOS 原生系统进行编译
|
||||
|
||||
1. 在 AppStore 中安装 Xcode
|
||||
|
||||
2. 安装 Homebrew:
|
||||
```bash
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
```
|
||||
|
||||
```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
|
||||
```
|
||||
```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.重新加载一下 shell 启动文件
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
```
|
||||
4. 然后输入以下命令,添加到系统环境变量中:
|
||||
|
||||
然后输入 bash 命令,进入bash shell,就可以和 Linux 一样正常编译了
|
||||
```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. 源代码中绝不含任何后门和可以监控或者劫持你的 HTTPS 的闭源软件, SSL 安全是互联网最后的壁垒。安全干净才是固件应该做到的;
|
||||
|
||||
2. 如有技术问题需要讨论,欢迎加入 QQ 讨论群: OP 共享技术交流群 ,号码 297253733 ,加群链接: 点击链接加入群聊【 OP 共享技术交流群】:[点击加入](https://jq.qq.com/?_wv=1027&k=5yCRuXL "OP共享技术交流群")
|
||||
@ -119,21 +118,19 @@ source ~/.bashrc
|
||||
3. 想学习 OpenWrt 开发,但是摸不着门道?自学没毅力?基础太差?怕太难学不会?跟着佐大学 OpenWrt 开发入门培训班助你能学有所成
|
||||
报名地址:[点击报名](http://forgotfun.org/2018/04/openwrt-training-2018.html "报名")
|
||||
|
||||
## 软路由介绍
|
||||
友情推荐不恰饭:如果你在寻找一个低功耗小体积性能不错的 x86 / x64 路由器,我个人建议可以考虑
|
||||
小马v1 的铝合金版本 ( N3710 4千兆):[页面介绍](https://item.taobao.com/item.htm?spm=a230r.1.14.20.144c763fRkK0VZ&id=561126544764 " 小马v1 的铝合金版本")
|
||||
4. QCA IPQ60xx 开源仓库地址:<https://github.com/coolsnowwolf/openwrt-gl-ax1800>
|
||||
|
||||

|
||||

|
||||
5. 稳定版仓库地址:<https://github.com/coolsnowwolf/openwrt>
|
||||
|
||||
## 软路由介绍
|
||||
|
||||
友情推荐不恰饭:如果你在寻找一个低功耗小体积性能不错的 x86 / x64 路由器,我个人建议可以考虑小马v1 的铝合金版本
|
||||
(N3710 4千兆):[页面介绍](https://item.taobao.com/item.htm?spm=a230r.1.14.20.144c763fRkK0VZ&id=561126544764)
|
||||
|
||||
 
|
||||
|
||||
## 捐贈
|
||||
|
||||
如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善
|
||||
|
||||
### 支付宝
|
||||
|
||||

|
||||
|
||||
### 微信
|
||||
|
||||

|
||||
支付宝  微信 
|
||||
|
Loading…
Reference in New Issue
Block a user