加速openwrt编译过程中的下载动作

openwrt编译下载各种源码在国内非常费时间,甚至是github上的东西都非常慢,还不用说是SourceForge上面那些,下载openwrt和它的几个feeds倒是可以用gitee来下

https://gitee.com/openwrt-mirror

这个镜像包含了openwrt,packages,luci几个比较大的东西。具体操作:

  • 克隆openwrt
https://gitee.com/openwrt-mirror/openwrt.git
  • 克隆下来后,修改默认的feeds.conf.default文件
diff --git a/feeds.conf.default b/feeds.conf.default
index 586e508440..de8f826973 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -1,4 +1,4 @@
-src-git packages https://git.openwrt.org/feed/packages.git^2e6bd4cb86682b224803325127d3f777d40b3231
-src-git luci https://git.openwrt.org/project/luci.git^fb2f36306756d0d0782dcab8413a8bb7ec379e54
+src-git packages https://gitee.com/openwrt-mirror/packages.git^2e6bd4cb86682b224803325127d3f777d40b3231
+src-git luci https://gitee.com/openwrt-mirror/luci.git^fb2f36306756d0d0782dcab8413a8bb7ec379e54
src-git routing https://git.openwrt.org/feed/routing.git^3f8571194c2765ed31aa73459e86c2ebf943d27d
src-git telephony https://git.openwrt.org/feed/telephony.git^036cd451c35b82b3d8cac519864986894d9f6958

这样./scripts/feeds update -a过程会快很多,在gitee上好像也找得到其他几个git仓库

https://gitee.com/add358/openwrt-routing.git
https://gitee.com/add358/openwrt-telephony.git

在make过程中,还会下载各种开源的源文件,这个更漫长,gitee也有活雷锋

https://gitee.com/tody_guo/openwrt-dl.git

我们只需要在openwrt目录下克隆一下即可

git clone https://gitee.com/tody_guo/openwrt-dl.git dl

可能因为版本差异,有些还是得去国外下载,这时就得合理上网,搭建过程就不介绍。主要是如何在终端下生效,如果是wget,这类工具下载的:

export http_proxy=http://127.0.0.1:12333
export https_proxy=http://127.0.0.1:12333

如果是git下载的

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

如果用完了要记得回滚环境,export的直接关了终端就没了,git设置的在~/.gitconfig下注释掉即可

posted @   thammer  阅读(2923)  评论(1编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2015-08-19 关于段错误的零星总结
点击右上角即可分享
微信分享提示