展会信息港展会大全

android 编译环境on x64_ubuntu
来源:互联网   发布日期:2015-09-24 16:32:49   浏览:2865次  

导读:repo sync0. setup complie env on local ubuntu:The Android build is routinely tested in house on recent versions of Ubuntu (10.04 and later), but most distributions should......

repo sync

0.setup complie env on local ubuntu:

The Android build is routinely tested in house on recent versions of Ubuntu (10.04 and later), but most distributions should have the required build tools available.

In general you will need:

* Python 2.4, which you can download from python.org.

* JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download either from java.sun.com.

* Git 1.5.4 or newer. You can find it at http://git.or.cz/.

The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"

sudo apt-get update

sudo apt-get install sun-java6-jdk

sudo update-java-alternatives -s java-6-sun

Java 5: for Froyo and older

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper main multiverse"

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper-updates main multiverse"

sudo apt-get update

sudo apt-get install sun-java5-jdk

sudo update-java-alternatives -s java-1.5.0-sun

To set up your development environment, install the following required packages:

$ sudo apt-get install libssl-dev uboot-mkimage

Export java path

$ export JAVA_HOME=<your java path>

$ export PATH=${JAVA_HOME}/bin:${PATH}

Ubuntu Linux (32-bit)

$ sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev lib32readline5-dev

Ubuntu Linux (64-bit)

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libpng12-dev

You might also want Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.

SCM FAQ:

Q: How to generate ssh key?

A: use command below, and leave passphrase empty.

$ cd ~

$ ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/liujq/.ssh/id_rsa):

Created directory '/home/liujq/.ssh'.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/liujq/.ssh/id_rsa.

Your public key has been saved in /home/liujq/.ssh/id_rsa.pub.

The key fingerprint is:

1c:78:d0:8f:69:d5:a4:3d:13:99:a7:36:54:be:24:e0 kinki@kinki-desktop

The key's randomart image is:

+--[ RSA 2048]----+

|...oo+.|

|o...+=o.|

|. o=E.=oo|

|o+.. += . |

|.S. ..|

||

||

||

||

+-----------------+

$ cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

save your ssh key use command:

$ tar cvf ssh_<name>.tar ~/.ssh/

Q: Why always ask me for the passowrd when I sync code?

A: Copy the rigth pair of keys to ~/.ssh and make a copy of the id_rsa.pub named authorized_keys under ~/.ssh.

Q: I met error like below when I do repo init or sync :

mark v1.6.9.6 as used by technicolor and sign it

gpg: Signature made Thu 13 May 2010 09:02:38 AM CST using RSA key ID 7B04DCDA

gpg: Can't check signature: public key not found

error: could not verify the tag 'technicolor'

A: $ rm -fr ~/.repoconfig/

Q: I can sync code, but when I upload changes, it shows permission denied like below:

$repo upload .

Permission denied (publickey).

fatal: The remote end hung up unexpectedly

A: 1. Make sure you have the right ssh public and private keys under your ~/.ssh folder.

2. Make sure you have add your ssh public key in gerrit (Settings->SSH Public Keys).

3. Make sure you have configurated your user name and email in ~/.gitconfig file.

If not you can configurate using:

git config --global user.name "your name"

git config --global user.email "xx.yy@technicolor.com"

Make sure the email prefix is the same as your gerrit login user name.

Q: I got error in repo init.

Error info :

url = preurl + username + '@' + serverUrl

UnboundLocalError: local variable 'preurl' referenced before assignment

A: Make sure you have configurated your user name and email in ~/.gitconfig file.

If not you can configurate using:

git config --global user.name "your name"

git config --global user.email "xx.yy@technicolor.com"

Make sure the email prefix is the same as your gerrit login user name.

Q: I met error like below when I do repo init or sync :

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Someone could be eavesdropping on you right now (man-in-the-middle attack)!

It is also possible that the RSA host key has just been changed.

The fingerprint for the RSA key sent by the remote host is

00:c5:f6:df:c6:13:38:6a:cb:fd:ab:b3:6e:6f:0b:33.

Please contact your system administrator.

Add correct host key in /home/liujq/.ssh/known_hosts to get rid of this message.

Offending key in /home/liujq/.ssh/known_hosts:1

RSA host key for 10.11.71.32 has changed and you have requested strict checking.

Host key verification failed.

fatal: The remote end hung up unexpectedly

A: $ rm ~/.ssh/known_hosts

Q:when I repo init a branch met this errors:

Getting repo ...

from git@10.11.72.13:android/repo.git

fatal: 'android/repo.git': not a Gerrit project

fatal: The remote end hung up unexpectedly

A:copy latest repo from the server to your environment

Q: When I use git commit, the editor is difficult to use.

A: $ git config --global core.editor vim

Q: I got error when I do repo sync:

$ repo sync .

error: external/linphone/: branch sht/imx51_r9/hou_dev is published (but not merged) and is now 3 commits behind

A: If the current branch contents commit which is submited but not merged, you can not use 'repo sync' to sync your workspace.

1. If you want to use the old branch, use 'git rebase <masterbranch>' instead of 'repo sync'.

2. create a new branch for the bugfix or feature using 'repo start'.

Q: I got below error when I do 'repo upload'

$ repo upload .

Rebase before upload!

Please resolve conflicts if necessary.

sync done!

Upload project projects/sht/technicolor/:

branch SHT/feature/OTA ( 1 commit, Tue Dec 21 17:42:46 2010 +0800):

365a9cc1 Project: TVA200SHT BugID: N/A Description: add the upgrade ota feature to 10.11.72.13:8080 (y/n)? y

--------------------------------------------

[FAILED] projects/sht/technicolor/ SHT/feature/OTA(Cannot guess Gerrit version)

A: Check your proxy first, unset http_proxy if necessary.

Q: I work on no branch, and commit my changes, after I do 'repo sync', I can not find my commit.

A: use 'git reflog' can help you find your previous commit, then 'repo start' a new branch,

use 'git cherry-pick <commit-id>' to pick your commit to your new branch.

Q: I get below error when I do 'repo sync'

error: cannot run git-proxy: No such file or directory

fatal: cannot start proxy git-proxy

A: $vim ~/.gitconfig

remove line 'gitproxy = git-proxy'

Q: Which branch do the developers work on?

A: Private branches or feature branches.

Commit changes on master and master_release is strictly forbidden.

Q: What, how if the submitted changes being rejected?

A: If the developer doesn t agree the reason of rejecting the changes,

developer should give feedback immediately, discuss with technical leader and project leader if needed.

If the developer accepts the rejection, developer should give feedback including a draft target time.

Q: What should integrators do when they receive changes from developers?

A: Give feedback, do integration test, and record the test result in integration logs.

If the submitted code doesn t meet the quality requirement, reject it with clear reason.

Q: How integrator deal with the case when a change can t be validated for lacking software testability,

especially for those changes related to internal function, not exposed as user cases?

A: Communicate with the developer first, if need, with technical leader.

Record the final decision in integration logs.

Q: Who is the final decision maker about whether to release a formal product version?

A: First of all, every role could express their opinion. Consider only in R&D context.

Both the project integrator and the system validation leader have the one ballot veto,

the finally decision MUST be derived from them.

Q: When push some branch to gerrit server.Error message is : ![remote rejected] head->remotehead(failed to lock)

A: If you are creating the branch .check if the branch name contains an exist branch name.

If you are push to the branch, please make sure you have both the push right and read right.

Q: After invoke repo upload . to upload my commits, it reports message like "discards 5 commits" and the work branch returnes to none branch. How to find my discarded commit?

A:

1)git fsck --lost-found:

After you invoke above command, you will find linke "dangling commit 2e43cd56ee4fb08664cd843cd32836b54fbf594a" information.

2)git show 2e43cd56ee4fb08664cd843cd32836b54fbf594a

Show these commits to ensure which commit is your latest.

3)git rebase 2e43cd56ee4fb08664cd843cd32836b54fbf594a

Rebase that commit

4)git log

To ensure if you commits are pulled back.

Q: SVN server db error

A: sudo svnadmin recover /home/svn/repos

sudo chown -R svnuser:group __db.001(keep the svndb owner is the same with svnuser)

In general you will need:

* Python 2.4, which you can download from python.org.

* JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download either from java.sun.com.

* Git 1.5.4 or newer. You can find it at http://git.or.cz/.

Java 6: for Gingerbread and newer

To set up your development environment, install the following required packages:

$ sudo apt-get install libssl-dev uboot-mkimage

Export java path

$ export JAVA_HOME=<your java path>

$ export PATH=${JAVA_HOME}/bin:${PATH}

Ubuntu Linux (32-bit)

$ sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev lib32readline5-dev

Ubuntu Linux (64-bit)

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libpng12-dev

repo 获取源码

repo sync

make uboot =>compile the uboot

make kernel => compile the kernel

make bbg => compile the android

make fw => generate wt2_fw_emmc_normal.signed.zip

get android source code and make the frmeware:

1.Get Source Code

mkdir android_

cd android_

repo init -u [user on gerrit]@192.168.xx.xx:/android/manifests -b pccw/imx51_r10.2/master

For example:

repo init -u abc.def@ip:/android/manifests -b pccw/imx51_r10.2/master

repo sync

2.Compile

make uboot =>compile the uboot

make kernel => compile the kernel

make bbg => compile the android

make fw => generate wt2_fw_emmc_normal.signed.zip

3. some command:

$ repo start branch0212 .

$ git diff

$ git status

$ git commit xxxx

$ repo upload .

add missing file:

$ git add xxx

$ git commit --amend

$ repo upload .

赞助本站

人工智能实验室

相关热词: 编译环境 ubuntu

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港