第二次编译日记 2014-03-14

继续,初始化编译环境,参考文档
http://source.android.com/source/initializing.html

http://wiki.cyanogenmod.org/w/Build_for_mako

http://862123204-qq-com.iteye.com/blog/1992973

关于需不需要开启 root ,不需要使用普通账户即可,
关于 mkdir ~/bin 
刚开始以为 ~ 就是代表root,其实不然,~ 代表当前用户的根目录


Installing the JDK

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk


Installing required packages

$ sudo apt-get install git-core gnupg flex bison gperf build-essential  zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs  x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev  libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown  libxml2-utils xsltproc

可能需要先安装 apt-get install glapi

官方的 repo 下载地址不可访问,可以从这下载
https://code.google.com/p/git-repo/downloads/list?can=1&q=

---------error 1------------------------
edroid@ubuntu:/mnt/hgfs/Shard/src$ . repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2

REPO_URL: command not found
REPO_REV: command not found
bash: repo: line 23: syntax error near unexpected token `('
bash: repo: line 23: `VERSION = (1, 20)'

说明 repo 没有执行权限,chmod a+x repo

---------- error2 --------------------------------
Get https://gerrit.googlesource.com/git-repo
error: Failed to connect to 2404:6800:4005:c00::52: Network is unreachable while accessing https://gerrit.googlesource.com/git-repo/info/refs
fatal: HTTP request failed

打开 repo 文件第5行,把 https 改为 http 即可

REPO_URL='https://gerrit.googlesource.com/git-repo'

改为

REPO_URL='http://gerrit.googlesource.com/git-repo'


好,init repo
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0

-------- 如果提示这个,请多试几次 ----------
fatal: Cannot get http://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 111] Connection refused

提示输入账户名秘密,这个随便
Your Name  [edroid]: edroid
Your Email [edroid@ubuntu.(none)]: [email protected]


Your identity is: edroid <[email protected]>
is this correct [y/N]? 

提示更新 repo 文件
... A new repo command ( 1.21) is available.
... You should upgrade soon:

    cp /home/edroid/android/src/.repo/repo/repo /home/edroid/bin/repo



你可能感兴趣的:(第二次编译日记 2014-03-14)