zoukankan      html  css  js  c++  java
  • 加速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下注释掉即可

  • 相关阅读:
    20190919-4 单元测试,结对
    20190919-3 效能分析
    20190919-2 功能测试
    git 和conding.net 超详细超简单安装
    html元素contenteditable属性如何定位光标和设置光标
    【分享】WeX5的正确打开方式(6)——数据组件初探
    从零开始开发一款H5小游戏(二) 创造游戏世界,启动发条
    分享一个自己写的基于canvas的原生js图片爆炸插件
    基于 HTML5 的 WebGL 技术构建 3D 场景(一)
    从零开始开发一款H5小游戏(三) 攻守阵营,赋予粒子新的生命
  • 原文地址:https://www.cnblogs.com/thammer/p/13531058.html
Copyright © 2011-2022 走看看