Android Miscellaneous
From OMAPpedia
Contents |
[edit] Manifest
The Android source is made up of many open-source projects. Each of these open-source projects uses Git as the source code management tool. Managing multiple Git trees is not a simple task and Google created the "repo" tool to help facilitate this. The Android Manifest file is used by the Google repo tool to understand what Git trees Android uses and where these Git trees are downloaded from. When you perform a "repo init" the manifest file is downloaded and when you perform a "repo sync", the manifest file is parsed and repo downloads or updates the appropriate Git trees described in the manifest file.
For the OMAP-Android derivative the manifest file can be viewed on the following webpage by viewing the "default.xml" file.
See: http://git.omapzoom.org/?p=repo/android/platform/omapmanifest.git;a=summary
If you view the default.xml file, you will see something like that following at the top of the file...
The above describes two "remote" locations where Git repositories are downloaded from. One remote is Google's Android git (located at git://android.git.kernel.org/) and the other remote is the TI OMAP Zoom git (located at git://git.omapzoom.org/). You will also see at the top of the manifest under the "remote" definitions that there is something called "default" (above), which defines the default remote to use for downloading Git repositories. Please note that Git repositories are usually referred to as "projects."
Once you identify the "remotes" and the default "remote", then if you can look through the remainder of the manifest for each "project" defined you will be able to identify where this project is being downloaded from.
For example, a project defined as follows is coming from the TI OMAP Zoom git trees as remote="omap":
Where as a project defined without a remote will default to the default remote which is Googles git. For example: 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. On the local server create a new directory that where the local mirror will reside. Create the mirror by executing the following commands, where branch name would be "eclair" or "froyo". If you omit the "-b For example, to create a mirror of the froyo branch execute the following. Assuming that the IP address of the server where the mirror resides is 192.168.0.100, then on a developer system on the same network as the server, users may make clones from the local mirror by executing the following steps. Note: If you are working on the server where the mirror exists then you may clone the manifest using the absolute path. Go to the directory where the manifest is located. Edit the manifest making the following changes (obviously changing the IP address to match your server's IP address) Note: If you are working on the server where the mirror exists then you may place the absolute path in the manifest. Finally commit this change to manifest git tree. Assuming that the IP address of the server where the mirror resides is 192.168.0.100, then on a developer system on the same network as the server, users may make clones of specific release from the local mirror by executing the following steps. Note: If you are working on the server where the mirror exists then you may clone the manifest using the absolute path. To view the release labels execute the following commands. To reset the manifest to a particular label execute the following commands. For example, to reset the manifest to Froyo release RLS27.6.1_Froyo execute the following commands. Contributing to the omapandroid project uses the same process defined by the OHA for contributing to the Android project. However, omapandroid introduces a second review site to handle changes specific to OMAP. Review the Android development process and how to use repo, gerrit, and git. Here are some usefull steps to help you get started. This information is out of date. Please do not use these instructions to sign up for review.omapzoom.org. you are good to go :) The “white-screen” issue is a problem associated with pre-production Zoom2 board, where the display/LCD remains white during boot-up. Although the screen is white, Android will usually boot up and can still be accessed using a console. In this note, we first describe the cause of the problem and the procedure to fix it for android version L25.12. To the best of our knowledge, the fix is already built into L25.13. Problem origin Issue# 1: As explained in the L25.12 release notes (https://omappedia.com/wiki/L25.12_Release_Notes#Limitations.2FKnown_Issues), “This is a known issue which happens due to change in GPIO pin muxing in beta and production boards." Issue# 2: There is a second issue which is due to the fact that in pre-production boards, the McBSP4_CLK is linked to LCD_RESET line. This cause a white screen if mcbsp4 is used for audio. Problem resolution I. Resolving Issue #1 The patch for issue# 1 is already included in L25.12. II. Resolving Issue #2 The patch for issue# 2 is designed for L25.13, and a little tinkering is needed to make it work with L25.12. Follow the following procedure: 1) In the Android directory, locate the file “board-zoom2.c”, which should be in “$YOUR_PATH/mydroid/kernel/android-2.6.29/arch/arm/mach-omap2/board-zoom2.c”. 2) Open the file “board-zoom2.c”, and look for the function 3) Replace the contents of static void __init omap_zoom2_init_irq(void) with the code found below: 5) Now, we need to recompile the Kernel and rebuild Android. Go to the “Android get started” page and follow the instruction to build the kernel. Then, rebuild Android. Essentially, repeat steps 7.3 through 10 in http://www.omappedia.org/wiki/Android_Getting_Started name="repo/android/hardware/ti/omap3" remote="omap" />
[edit] Creating an OMAP-Android Mirror
[edit] Prerequisites/Assumptions
NOTE: Setting up a Git server is only necessary if users are cloning the local git trees from other hosts on the network. If users are working on the same machine that the local mirror is created on, this setting up a git server to export the git trees is not necessary.
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 vist OMAP Platform Support Tools
[edit] Create an OMAP Android Mirror
Note that the Git server should be configured to export this directory. 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...
# mkdir /pub/gittrees/omapzoom-android/
# cd /pub/gittrees/omapzoom-android/
# repo init -u git://git.omapzoom.org/repo/android/platform/omapmanifest.git --mirror -b
# cd /pub/gittrees/omapzoom-android/
# repo init -u git://git.omapzoom.org/repo/android/platform/omapmanifest.git --mirror -b froyo
# repo sync
[edit] Clone the Local Mirror
Step 1: Clone the manifest, where branch name would be "eclair" or "froyo". If you omit the "-b
cd ~
mkdir mydroid
cd mydroid
repo init -u git://192.168.0.100/omapzoom-android/platform/omapmanifest.git -b
cd ~
mkdir mydroid
cd mydroid
repo init -u /pub/gittrees/omapzoom-android/platform/omapmanifest.git -b
Step 2: Edit the manifest to point to the local mirror.
cd mydroid/.repo/manifests
vim default.xml
diff --git a/default.xml b/default.xml
index 2bd9cff..6ae2ec3 100644
--- a/default.xml
+++ b/default.xml
@@ -1,7 +1,7 @@
diff --git a/default.xml b/default.xml
index 2bd9cff..6ae2ec3 100644
--- a/default.xml
+++ b/default.xml
@@ -1,7 +1,7 @@
git commit -a -m "update manifest to use local mirror"
Step 3: Clone entire Android software from the mirror.
cd mydroid/
repo sync
Step 4: From time to time you may wish to update your clone by re-sync'ing. Executing "repo sync" may update the manifest if changes have been made. Therefore, to ensure that the above change to the manifest does not get over-written execute the following commands when sync'ing to the latest code base.
cd mydroid/.repo/manifests
git pull --rebase
repo sync
[edit] Clone a Specific Release from the Local Mirror
Step 1: Clone the manifest.
cd ~
mkdir mydroid
cd mydroid
git clone git://192.168.0.100/omapzoom-android/repo/android/platform/omapmanifest.git
cd ~
mkdir mydroid
cd mydroid
git clone /pub/gittrees/omapzoom-android/repo/android/platform/omapmanifest.git
Step 2: Reset the manifest to the specific release you want.
cd mydroid/omapmanifest
git tag
cd mydroid/omapmanifest
git reset --hard
cd mydroid/omapmanifest
git reset --hard RLS27.6.1_Froyo
export MANIFEST=`pwd`
cd ..
repo init -u $MANIFEST
Step 3: To sync the entire code base perform steps 2-4 of the previous section.
[edit] Submitting Patches
[edit] Setting up your Account with Gerrit:
[~/.ssh]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/tom/.ssh/id_dsa):
[edit] SSH Proxy Setup:
Host review.omapzoom.org
port 29418
proxycommand
[edit] Testing the Connection:
ssh -p 29418
gerrit: no shell availableConnection to review.omapzoom.org closed.
[edit] Getting past the Zoom2 white screen issue
static void __init omap_zoom2_init_irq(void) in the file.
static void __init omap_zoom2_init_irq(void)
{
switch (omap_rev_id()) {
case OMAP_3420:
omap2_init_common_hw(mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table, omap3_dsp_rate_table_3420, omap3_l3_rate_table);
break;
case OMAP_3430:
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,omap3_mpu_rate_table, omap3_dsp_rate_table, omap3_l3_rate_table);
break;
case OMAP_3440:
omap2_init_common_hw(mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table, omap3_dsp_rate_table_3440,omap3_l3_rate_table);
break;
default:
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,omap3_mpu_rate_table, omap3_dsp_rate_table,omap3_l3_rate_table);
break;
}
/* Set Mcbsp only for Producton units */
/* Else you will see white screen on beta boards */
if (omap_rev() > OMAP3430_REV_ES3_0) {
/* Production board supports McBSP4 */
omap2_mux_register(&zoom2_mux_cfg);
} else {
/* McBSP4_CLK is linked to LCD_RESET line
* on Pre-Production zoom2's
* Hence a white screen seen
*/
printk(KERN_WARNING "Issue: McBSP4 not supported on this board");
}
omap_init_irq();
omap_gpio_init();
zoom2_init_smc911x();
}
4) Save file “board-zoom2.c”