一、编译环境搭建
Ubuntu Linux (64-bit x86)
This has not been as well tested. Please send success or failure reports to android-porting@googlegroups.com .- Required Packages:
- Git, JDK, flex, and the other packages as listed above in the i386 instructions:
- JDK 5.0, update 12 or higher.Java 6 is not supported, because of incompatibilities with @Override.
- Pieces from the 32-bit cross-building environment
- X11 development
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
注:这里会有几个已经安装的包,和找不到的包(sun-java5-jdk),在命令行中去掉等下自己离线安装一个。
- Set the system to use the right version of java by default:
$ sudo update-java-alternatives -s java-1.5.0-sun
注:android 目前主干代码编译好像是需要jdk1.6了。
- X11: Ubuntu doesn't have packages for the X11 libraries, but that can be worked around with the following command:
$ sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so - 配置环境变量:
在~/.bashrc文件中添加下面内容:
export PATH=$JAVA_HOME/bin:/usr/local/arm/4.2.2-eabi/usr/bin:$PATH
export CLASSPATH=/opt/jdk1.5.0_22/lib
export ANDROID_JAVA_HOME=$JAVA_HOME
二、远程连接
1. 终端工具访问(open ssh)
在ubuntu服务器端的终端执行下面的命令安装ssh服务端工具:
$sudo apt-get install ssh
然后下载一个XP下的终端工具,如putty直接用ssh方式登录就可以了。
2. 以资源管理器的形式访问ubuntu服务器(samba)
执行下面的命令安装samba:
$apt-get install samba
$apt-get install smbfs
给samba服务器添加用户 :
说明:登陆samba的用户必须已经是linux中的用户
#smbpasswd -a username
配置samba:
然后修改samba配置文件/etc/samba/smb.conf
[global]
workgroup=workgroup
server string=ubuntu
security=share
[ubuntu]
path=/home/xxx
valid users=xxx
public=yes
writable=yes
配置完成以后重启一下samba:
$ service smbd restart
经过这样简单配置一下就可以开始使用啦。
附:
1. ubuntu下还有一个图形化的samba配置工具:system-config-samba
2. 配置samba可以参考http://www.linuxidc.com/Linux/2008-01/10763.htm