Android on OMAP
Creating an OMAP-Android Mirror
This article describes how to create a mirror of the OMAP-Android repositories on a local server. This allow users working on the local server to create clones of the OMAP-Android repositories locally rather than over the internet.
This article assumes that you already have repo, git and a git server installed on the local server. If you do not please refer to the following articles.
Installing Repo: "http://source.android.com/download"
Installing Git: http://wiki.omap.com/index.php?title=Git#Installing_Git
Setting up a Git Server: http://wiki.omap.com/index.php?title=Git#Setting_up_a_Git_Server
IMPORTANT! If you are working behind a firewall, you will need to use corkscrew in order to create the mirror. When you configure corkscrew it is important that you configure git to only use corkscrew when cloning from kernel.org and omapzoom.org sites. If you do not then when you attempt to perform a local clone of the mirror, git will try to go through the firewall and will not find your local server. For instructions on installing corkscrew and configuring git to use corkscrew click here
HOWTO Create an OMAP-Android Mirror
On the local server create a new directory that where the local mirror will reside. Note that the Git server should be configured to export this server. See reference above for installing a Git server on the Linux host. For example, if the Git server was configured to export the directory "/pub/gittrees" on the Linux host, then the following directory could be create for the OMAP-Android mirror...
Create the mirror by executing the following commands.
cd /pub/gittrees/omap-android/ repo init -u git://git.omapzoom.org/repo/android/platform/omapmanifest.git --mirror repo sync
Once the "sync" has completed it is then necessary to modify the OMAP-Android manifest , so that when users attempt to create clones of the OMAP-Android git trees it directs them to the local server and not to the external servers. To do this create a clone of the OMAP-Android manifest as shown below. The clone may be created as "user" and so long as the user has write permission in the directory where the mirror is located. Please note that in this example the IP address of the local server is 192.168.0.100 and assumes the Git server is configured with the option --base-path=/pub/gittrees.
cd ~ git clone git://192.168.0.100/omap-android/repo/android/platform/omapmanifest.git
Edit the file "~/omap-android-manifest.git/default.xml" in "and replace the "fetch" location for the remote korg and omap with the IP address and directory name of the OMAP-Android mirror. The below illustrates the changes made to the default.xml file for this example...
<?xml version="1.0" encoding="UTF-8"?> <manifest> <remote name="korg" - fetch="git://android.git.kernel.org/" + fetch="git://192.168.0.100/omap-android/" review="review.source.android.com" /> <remote name="omap" - fetch="git://git.omapzoom.org/" /> + fetch="git://192.168.0.100/omap-android/" /> <default revision="master" remote="korg" />
Finally, commit this change to the Git repository and push this change back to the parent Git tree. Please note that "user" is the username of the person that has modifed the manifest.
cd ~/omap-android-manifest.git git commit -a git push email@example.com:/pub/gittrees/omap-android/repo/android/platform/omapmanifest.git
The setup of the mirror is now complete.
IMPORTANT! Please note that if you update the mirror by executing "repo sync" sometime later, if the manifest has been updated, sync'ing the mirror will overwrite the changes you have made. Hence, when updating the mirror check to see if the manifest has been updated.
HOWTO Clone from the Local Mirror
On a developer system on the same network as the host, users may make clones from the local mirror by executing the following commands.
cd ~ mkdir mydroid cd mydroid repo init -u git://192.168.0.100/omap-android/repo/android/platform/omapmanifest.git repo sync
|Item ID||Associated Item||Comment|
|No Associated Items Found|