- 论坛徽章:
- 0
|
本帖最后由 bxfqing 于 2011-08-10 17:52 编辑
1.0 INSTALL CYGWIN
First ,install cygwin 1.5, You can find at this page:
http://cygwin.org/win-9x.html
Don't mind the page title, just grab setup-legacy.exe and it will works just fine
under XP or Vista.
- When installing Cygwin, set Default Text File Type to Unix/binary, not DOS/text.
This is really important, otherwise you will get errors when trying to
checkout code using git.
- Packages that you must install or not:
- Required packages: autoconf, bison, curl, flex, gcc, g++, git, gnupg, make,
mingw-zlib, python, zip, unzip.
- Suggested extra packages: diffutils, emacs, openssh, rsync, vim, wget.
- Packages that must not be installed: readline.
Attention 1:
安装cygwin要分为两步, a ) install default packages b) install required packages by android
否则,会提示一大堆的错误, e.g.- autoconf.sh exit code -6
- autoconf2.1.sh exit code -6
- autoconf2.5.sh exit code -6
- base-files-mketc.sh exit code -6
- base-files-profile.sh exit code -6
- bash.sh exit code -6
- coreutils.sh exit code -6
- cygwin-doc.sh exit code -6
复制代码 就算增量的安装,也会提示一个错误: autoconf2.5.sh exit code -6,or autoconf2.5.sh exit code 1
目前我未发现对下载,编译有影响;
Attention 2:
安装完成后,运行时windows系统会提示:
16位 MS-DOS子系统,cygwin.pif XXX程序文件名无效
解决方法: 第一 确认command.com程序是否存在于你的windows系统中,包括目录:
c:\windows and C:\WINDOWS\system32
如果2个目录都有,还是存在此问题:
把系统盘(Windows XP安装盘)放入光驱,然后启动CMD(开始—运行—输入CMD),
在CMD命令行里输入以下命令(假设你的系统安装在C:下面,光驱为F:)
expand F:\i386\config.nt_ C:\WINDOWS\system32\config.nt
expand F:\i386\autoexec.nt_ C:\WINDOWS\system32\autoexec.nt
expand F:\i386\command.co_ C:\WINDOWS\system32\command.com
expand F:\i386\command.co_ C:\WINDOWS\command.com
我到此,cygwin就可以使用了
2.0 DOWNLOAD ANDROID SOURCE
2.1 如果你的环境存在代理,那么请这样做
$vim ~/.bash_profile
adding:
export http_proxy=http://www.XXX.com:80
export https_proxy=https://www.XXX.com:80
export ftp_proxy=ftp://www.XXX.com:80
$source ~/.bash_profile
2.2 由于瓷器国环境,repo 使用git方式,经常失败,所以我使用http方式,试用可正常访问android.git.kernel.org,方法如下:
参考 :http://source.android.com/source/downloading.html
2.2.1 Installing Repo
$curl http://android.git.kernel.org/repo > ~/bin/repo #使用http和https,
$chmod a+x ~/bin/repo
$ vim ~/bin/repo
将 REPO_URL='git://android.git.kernel.org/tools/repo.git'
修改为 REPO_URL='http://android.git.kernel.org/tools/repo.git'
2.2.2 Initializing a Repo client
cd ~/my-android-git
$python ~/bin/repo init -u http://android.git.kernel.org/platform/manifest.git -b android-2.3.4_r1 #使用http
$vim .repo/mainfest.xml
modify fetch="git://android.git.kernel.org/"
with fetch="http://android.git.kernel.org/"
python ~/bin/repo sync
漫长的等待... ... ... ... |
|