ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2012年7月13日 星期五

localize android repo -- more more..

現在 repo 好像有點修改了,所以上次那篇: http://r40eubuntu.blogspot.tw/2011/05/code-default.html
要作一些修改...


複習:

要把整個 android source 都納入 repo 管理,並且放在 local server 中。

首先 repo init, sync 時,一定要用 --mirror 參數,否則 manifest.xml 的內容 (path) 不會正確。

這次 manifest.xml 的內容有點改變,以往 remote server name:address 是寫在 manifest.xml 裡。
現在好像會在 repo init 時,依照 init -u 的 source 改變。

所以一旦 mirror 到 local server 後,不用修改 manifest.xml。
之後 從 local server 作 repo init 的,都會從 local server clone。
關鍵好像是在 .repo/manifests.git/config

以前的 bsp 會提供一個修改過的 default.xml。現在(10.4)沒了,要自己刪檔,所以刪完 project 後, repo 就會 fail -- folder 與 manifest.xml 內容不一致。



次序錯了,一開始 manifest 開 branch 時,要用 imx_r10.4,所以那些新加的 project,也要tag imx_r10.4。

這樣 c_patch 完後,那些修改都可以直接 push (?)。


避免 雞 - 蛋 問題, test repo 的 client folder (就是完整 clone repo 的 folder) 最好有兩個。
一個測試用。一個是用來上 patch。


現在 google 都教人作 mirror 了...http://source.android.com/source/downloading.html#using-a-local-mirror

copy:



When using several clients, especially in situations where bandwidth is scarce, it is better to create a local mirror of the entire server content, and to sync clients from that mirror (which requires no network access). The download for a full mirror is smaller than the download of two clients, while containing more information.

These instructions assume that the mirror is created in /usr/local/aosp/mirror. The first step is to create and sync the mirror itself, which uses close to 13GB of network bandwidth and a similar amount of disk space. Notice the --mirror flag, which can only be specified when creating a new client:
$ mkdir -p /usr/local/aosp/mirror
$ cd /usr/local/aosp/mirror
$ repo init -u https://android.googlesource.com/mirror/manifest --mirror
$ repo sync
Once the mirror is synced, new clients can be created from it. Note that it's important to specify an absolute path:
$ mkdir -p /usr/local/aosp/master
$ cd /usr/local/aosp/master
$ repo init -u /usr/local/aosp/mirror/platform/manifest.git
$ repo sync
Finally, to sync a client against the server, the mirror needs to be synced against the server, then the client against the mirror:
$ cd /usr/local/aosp/mirror
$ repo sync
$ cd /usr/local/aosp/master
$ repo sync
It's possible to store the mirror on a LAN server and to access it over NFS, SSH or Git. It's also possible to store it on a removable drive and to pass that drive around between users or between machines.

沒有留言:

標籤

網誌存檔