Repo下载使用记录

#1.  安装Git

# ubuntu系统直接使用sudo apt-get install git-core就能完成安装。
# 安装完成之后可以顺便配置一下个人信息:  
  git config --global user.email "youremail@xxx.com"
  git config --global user.name "Your Name"

 

#2.  设置环境变量和repo安装目录

# 将下载repo的路径加入环境变量
mkdir ~/bin
vim ~/.bashrc
+export PATH=~/bin:$PATH
source ~/.bashrc

 

#3.  repo工具的安装

###网上已知可以下载repo的网址
#1. git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo  (Try OK)
#2. git clone https://aosp.tuna.tsinghua.edu.cn/tools/repo          (Try OK)
    
    

 

#4.  建立工作目录  &&  初始化仓库

建立工作目录:
mkdir sourcecode && cd sourcecode

初始化仓库:
repo init -u git://codeaurora.org/quic/qsdk/releases/manifest/qstak -b release \
-m caf_AU_LINUX_QSDK_NHSS.QSDK.11.1_TARGET_ALL.12.0.4170.001.4476.xml \
--repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

 

 #5.  repo sync同步下载

repo sync -j8 --no-tags -qc  #一般是这样用的。

 

#6.  加快repo下载速度 - 建立本地mirror-(待尝试)

### 初始化本地mirror  
mkdir /home/mirror && cd /home/mirror    //注意首次初始化mirror需在一个空目录下

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest \
-b android-4.0.1_r1 \
--repo-url=https://aosp.tuna.tsinghua.edu.cn/tools/repo \
--mirror

这样就初始化好本地镜像了。然后执行repo sync命令。网络不好的情况请多执行 repo sync 几次。
repo sync -cdj 4 --no-tags



### 下载sourcecode时使用本地mirror 
cd  {DIR}/sourcecode

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest \
-b android-4.0.1_r1 \
--repo-url=https://aosp.tuna.tsinghua.edu.cn/tools/repo \
--reference  /home/mirror

repo sync -cdj 4 --no-tags

 

#7.  总结 

初次使用repo下载sdk,各种注意点尚未完善,以待日后补全。 

 

#8.  参考博客 

感谢: 

[1]  Android下的配置管理之道之repo的使用  -  马哥私房菜

[2]  repo下载QSDK代码全记录 - openwrt技术开发网 

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值