buildroot加速下载

1、背景
buildroot编译过程中需要下载大量软件,由于国内网络环境原因,国外很多软件下载速度较慢,需要使用国内开源的镜像源加速下载,现把操作记录下来。
2、国内镜像源现状
国内开源镜像站列举如下几家:
中国科学技术大学: https://mirrors.ustc.edu.cn/
清华:https://mirrors.tuna.tsinghua.edu.cn/
阿里云:https://developer.aliyun.com/mirror/

3、配置过程
有两种方法修改:1、修改配置文件,2、menuconfig中配置;
注意:BR2_KERNEL_MIRROR的网址,每家镜像源可能稍有区别,
阿里云的网址:https://mirrors.aliyun.com/linux-kernel (暂时没验证)
清华的网址:https://mirrors.tuna.tsinghua.edu.cn/kernel
中国科学技术大学的网址:https://mirrors.aliyun.com/kernel.org

3.1 修改配置文件
修改配置文件中的网址即可,
BR2_BACKUP_SITE="http://sources.buildroot.net"
BR2_KERNEL_MIRROR="https://mirrors.aliyun.com/linux-kernel"
BR2_GNU_MIRROR="https://mirrors.aliyun.com/gnu"
BR2_LUAROCKS_MIRROR="https://luarocks.cn"
BR2_CPAN_MIRROR="https://mirrors.aliyun.com/CPAN"
3.2 图形界面修改
路径如下:
Symbol: BR2_PRIMARY_SITE [=] │
│ Type : string │
│ Prompt: Primary download site │
│ Location: │
│ -> Build options │
│ -> Mirrors and Download locations │
│ Defined at Config.in:212

修改对应网址,保存退出即可。
3.3 修改规则
除了内核有所区别外,其他网址规则如下:镜像源网址+软件模块
示例:
(https://mirrors.ustc.edu.cn/CPAN) CPAN mirror (Perl packages)

4、结束语
目前仅知道这几项的含义,有可能理解有误,此随笔仅作为备忘。

posted @ 2022-07-08 17:31  HelloWorldyd  阅读(2516)  评论(0编辑  收藏  举报