Initailize

Code Server Usage

=1. Initialize a Build Environment=

1.1. Login to the code server for the first time
If you don't have a Elastos ID (OpenID), please register for one.Once you have an account, open your internet browser and visit http://elastos.org/review/. Sign in with your Elastos ID. After login, the browser will redirect you to the welcome page. Fill in your full name in in the Full Name box and Save Changes. Fill in a unique Username(for example: li.bin) which will be your email prefix, and click Select Username. Click Continue. SSH Public keys will be provided at a later time.

1.2. Set up your Ubuntu console
Login to your Ubuntu 10.04 Desktop and click Applications -> Accessories menu to open a Terminal.

Get a wizard script and invoke it. The script will prepare your development environment automatically. For example, it will install any required programs, set up ssh the keys and shortcuts to the code server. Code server-side settings:

Open your internet browser and visit http://elastos.org/review/#/settings/. Click SSH Public Keys, click Add Key ... ,and paste your ssh public keys and Add.

1.3. Test connection to the code server
$ ssh elastos.org

****   Welcome to Gerrit Code Review    ****

Hi Li Bin, you have successfully connected over SSH.

Unfortunately, interactive shells are disabled. To clone a hosted Git repository, use:

git clone ssh://li.bin@elastos.org:29418/review/REPOSITORY_NAME.git

Connection to elastos.org closed. List all projects

$ ssh elastos.org $ ssh elastos.org gerrit ls-projects Clone a test repository

$ git clone e:test TODO: OpenID integration with http://username.elastos.net

TODO: Make a screenshot

=2. Developing for Elastos=

2.1. Download the Source Tree
$ cd ~ $ git clone e:Elastos TODO: Add ElastosRDKforUbuntu & ElastosRDKforWindows

2.2. Build the System
TODO: To be added

2.3. Run and Test
TODO: To be added

2.4. Modify, Commit and Upload
cd ~ cd Elastos git commit -a -m "Adding a killer feature to Elastos" git push =3. Developing for Android=

3.1. Download the Source Tree
Make your workspace.

$ mkdir ~/android $ cd ~/android Get erepo

$ curl http://192.168.7.99/tmp/erepo >erepo $ chmod a+x erepo Sync source code

./erepo init -u ssh://li.bin@review.elastos.org:29418/platform/manifest.git ./erepo sync -j1 ./erepo forall -c git config remote.aosp.review http://review.elastos.org/ Tips: The process will download 8GB data and will take around 40 minutes.

TODO: Download in Eclipse

3.2. Build the System
$ source build/envsetup.sh

$ lunch full_x86-eng

$ make -j4

Tips: This process will take 2 to 4 hours depending on your CPU power.

TODO: For vbox_x86-eng, set up a new VM and started it in VirtualBox automatically

TODO: Use emake to build all Android

3.3. Run and Test in VirtualBox
$ emulator TODO: Add debuging method

3.4. Modify, Commit and Upload
Push Source Code to our code review server.

$ ./erepo upload Answer 'y' to all questions.

Ref: Version Control with Repo and Git

Ref: Life of a Patch

© Kortide Corp 2007-2012. All rights reserved. Updated: 2012-06-27