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下注释掉即可

  • 相关阅读:
    select2插件用法
    MVC htmlAttributes and additionalViewData
    Log4Net 配置详解
    Windows10搭建ASP.NET MVC5 IIS局域网(外网可以访问的)服务器
    网络连接状态指示器(NCSI ,Network Connectivity Status Indicator)
    微软官方开发文档结构WPF
    旋转编码器,无限旋转的音量按钮
    Steam Dota2 安装方法以及一些设置·
    Windows资源管理器打开文件夹卡顿原因及解决办法
    字幕变集合制作工具
  • 原文地址:https://www.cnblogs.com/thammer/p/13531058.html
Copyright © 2011-2022 走看看