### 下载repo索引文件 ###
chase@giga:~$ curl https://storage.googleapis.com/git-repo-downloads/repo -o repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29829 100 29829 0 0 21185 0 0:00:01 0:00:01 --:--:-- 21170
chase@giga:~$
chase@giga:~$ vi repo
### REPO_URL 替换成国内源 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
' ###
chase@giga:~$ chmod a+rx repo
chase@giga:~$ vi .bashrc
### 永久环境变量 最后一行添加 export PATH=$PATH:~/ ###
### 刷新立即生效 ###
chase@giga:~$ source .bashrc
chase@giga:~$
chase@giga:~$ echo $PATH
/home/chase/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/chase/
chase@giga:~$
chase@giga:~$
### 从开发板指定地址下载manifest清单以及repo工具, 都在.repo目录下###
chase@giga:~/projects/khadas-vims$ repo init -u https://github.com/khadas/android_manifest.git -b khadas-vims-pie
Get https://gerrit-googlesource.proxy.ustclug.org/git-repo/clone.bundle
Get https://gerrit-googlesource.proxy.ustclug.org/git-repo
Get https://github.com/khadas/android_manifest.git
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 201 (delta 2), reused 7 (delta 1), pack-reused 192
Receiving objects: 100% (201/201), 253.52 KiB | 377.00 KiB/s, done.
Resolving deltas: 100% (63/63), done.
From https://github.com/khadas/android_manifest
* [new tag] V180622 -> V180622
* [new branch] Mmallow -> origin/Mmallow
* [new branch] Nougat -> origin/Nougat
* [new branch] Oreo -> origin/Oreo
* [new branch] khadas-edge-nougat -> origin/khadas-edge-nougat
* [new branch] khadas-edge-pie -> origin/khadas-edge-pie
* [new branch] khadas-vim3-pie -> origin/khadas-vim3-pie
* [new branch] khadas-vims-nougat -> origin/khadas-vims-nougat
* [new branch] khadas-vims-pie -> origin/khadas-vims-pie
* [new branch] master -> origin/master
* [new branch] test -> origin/test
Your identity is: chase <[email protected]>
If you want to change this, please re-run 'repo init' with --config-name
repo has been initialized in /home/chase/projects/khadas-vims
chase@giga:~/projects/khadas-vims$
chase@giga:~/projects/khadas-vims$ cd .repo/manifests
chase@giga:~/projects/khadas-vims/.repo/manifests$ vi default.xml
### remote中的fetch和review都替换成国内镜像源 https://aosp.tuna.tsinghua.edu.cn
###
### 可以查看下远程服务器的分支版本 ###
chase@giga:~/projects/khadas-vims/.repo/manifests$ git branch -av
* default 17f19da Pie: V200103
remotes/origin/Mmallow 856410c update download link of svox repository to google
remotes/origin/Nougat 2f08215 Set function key adc value for VIM2 different versions
remotes/origin/Oreo b75302d fixup! Oreo: V171229
remotes/origin/khadas-edge-nougat 402b195 update to Edge_Nougat_V191115
remotes/origin/khadas-edge-pie 16f0d2b Fix compile error
remotes/origin/khadas-vim3-pie 33144e9 fixup! Pie: V190823
remotes/origin/khadas-vims-nougat 2f08215 Set function key adc value for VIM2 different versions
remotes/origin/khadas-vims-pie 17f19da Pie: V200103
remotes/origin/master f351208 fixup! update: V161211
remotes/origin/test 3142359 fixup! Pie: V190704
chase@giga:~/projects/khadas-vims/.repo/manifests$
### 从服务器同步aosp和project源码 ###
chase@giga:~/projects/khadas-vims$ repo sync -j4
......
Checking out projects: 100% (687/687), done.
### 建立新分支 ###
chase@giga:~/projects/khadas-vims$ repo start khadas-vims-pie --all