2022-05-23 09:29:02 +08:00

56 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 此源码适用于瑞芯微OpenWrt SDK
如何编译自己需要的 OpenWrt 固件
-
注意:
-
1. **不**要用 **root** 用户进行编译!!!
2. 国内用户编译前最好准备好梯子
3. 默认登陆IP 192.168.1.1 密码 password
编译命令如下:
-
1. 首先装好 Ubuntu 64bit推荐 Ubuntu 20.04 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 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
`
3. 使用 `git clone https://github.com/coolsnowwolf/lede` 命令下载好源代码,然后 `cd lede` 进入目录
4. ```bash
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
```
5. `make -j8 download V=s` 下载dl库国内请尽量全局科学上网
6. 输入 `make -j1 V=s` -j1 后面是线程数。第一次编译推荐用单线程)即可开始编译你要的固件了。
本套代码保证肯定可以编译成功。里面包括了 R21 所有源代码,包括 IPK 的。
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
=
二次编译:
```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
```
编译完成后输出路径bin/targets