http://blog.chinaunix.net/uid-26990529-id-3396947.html
获取repo工具
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo获取正版的目录树
mkdir myandroid
cd myandroid
repo init --repo-url=git://github.com/MIPS/repo.git --repo-branch=stable -u git://github.com/MIPS/manifests.git -b mips-froyo-r9 --mirror
repo sync -j18建立自己的仓库
cd /var/lib/git
mkdir mipsandroid-xinzhen
cd mipsandroid-xinzhen
repo init --repo-url=file:///home/xinzhen/myandroid/repo.git --repo-branch=stable -u file:///home/xinzhen/myandroid/manifests.git -b mips-froyo-r9 --mirror
repo sync注:/var/lib/git是git-daemon 的 base-path
修改配置文件 /var/lib/git/mipsandroid-xinzhen/manifests.git/config
[daemon]
uploadpack=true
uploadarch=true
receivepack=true
修改 manifests 使之使用我们自己的路径
cd /tmp/
git clone git://192.168.1.51/mipsandroid-xinzhen/manifests.git
cd manifests/
vim default.xmlfetch="git://github.com/MIPS/" />改为fetch="git://192.168.1.51/mipsandroid-xinzhen" />
试试看从另一台电脑访问这个 repo 仓库:
repo init --repo-url=git://192.168.1.51/mipsandroid-xinzhen/repo.git --repo-branch=stable -u git://192.168.1.51/mipsandroid-xinzhen/manifests.git -b mips-froyo-r9
repo sync -j5
本文详细介绍了如何通过curl命令下载repo工具,并利用该工具初始化和同步Android源码。此外,还介绍了如何设置自己的git仓库及修改相关配置文件,以便于进行后续的开发工作。

3298

被折叠的 条评论
为什么被折叠?



