Loading... 搭建OpenWRT的编译环境,应该首选用的人比较多的Linux发行版,并且选择LTS版本,本文选择Ubuntu22.04作为编译环境。具体的实体机或者虚拟机选择以及安装系统则不详细介绍。本文只要介绍系统准备好之后的操作。 ## 环境依赖 [OpenWRT 官方手册](https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem#linux_gnu-linux_distributions) ``` sudo apt install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev python3-distutils rsync unzip zlib1g-dev file wget ``` ## 下载代码 这部分就看个人选择了,有很多可选,例如官方版本、民间版本(LEDE)或者开发板的厂商版本。 ## 加速方法 鉴于在git代码或者一些操作时候,经常会因为`You know What`的原因导致速度极慢,所以我们需要一些加速的方法。那么就配置一下代理吧。 ```shell shell使用代理(一次性,关闭端口后会消失) export all-proxy=socks5://172.0.0.1:1080 git代理 git config --global https.proxy socks5://127.0.0.1:1080 git config --global https.proxy socks5://127.0.0.1:1080 git取消代理 git config --global --unset http.proxy git config --global --unset https.proxy ``` 还有一种方法,我认为会起作用,但是我发现并没有,其原理是修改git源地址,具体参考:[](https://www.cnblogs.com/thammer/p/13531058.html) # [加速openwrt编译过程中的下载动作](https://www.cnblogs.com/thammer/p/13531058.html) Last modification:July 16, 2023 © Allow specification reprint Like 0 If you think my article is useful to you, please feel free to appreciate