安装完先更新
sudo apt-get update
配置网络
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.8.128
netmask 255.255.255.0
gateway 192.168.8.2
sudo vi /etc/resolvconf/resolv.conf.d/base
nameserver 192.168.8.2
sudo /etc/init.d/networking restart
配置samba
sudo smbpasswd -a phoenix(ex:your_username)
sudo chmod -R 777 /home/phoenix
sudo vi /etc/samba/smb.conf
[phoenix]
comment = Phoenix's share
path = /home/phoenix
public = yes
writeable = yes
browseable = yes
guest ok = no
安装gcc、g++、make等编译器
sudo apt-get install build-essential
sudo apt-get install gcc-multilib g++-multilib
改变shell为bash
sudo dpkg-reconfigure dash
选NO
安装编辑器
sudo apt-get install vim
安装Zlib
sudo apt-get install zlib1g
sudo apt-get install zlib1g-dev
安装openssl
sudo apt-get install openssl
安装ccache
sudo apt-get install ccache
sudo vi ~/.bashrc(个人用户)或/etc/bash.bashrc(系统用户),添加
export USE_CCACHE=1
再执行ccache -M 4G
sudo apt-get install bc
sudo apt-get install subversion
sudo apt-get install git
sudo apt-get install git-core
sudo apt-get install expat
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install curl
sudo apt-get install perl
sudo apt-get install gperf
sudo apt-get install gnupg
sudo apt-get install iperf
sudo apt-get install autoconf
sudo apt-get install texinfo
sudo apt-get install dos2unix tofrodos
sudo apt-get install tcl8.6
sudo apt-get install zip unzip
sudo apt-get install lzma
sudo apt-get install xsltproc
sudo apt-get install wine
sudo apt-get install mingw32
sudo apt-get install pkg-config
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install lib32z1-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libxml2-dev libxml2-utils
sudo apt-get install libfreetype6-dev
sudo apt-get install libx11-dev x11proto-core-dev
sudo apt-get install libncurses5-dev lib32ncurses5-dev
sudo apt-get install libreadline6-dev lib32readline6-dev
sudo apt-get install libstring-crc32-perl
sudo apt-get install python-lunch
sudo apt-get install lunch
安装gcc4.4
sudo vi /etc/apt/sources.list
添加
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
sudo apt-get update
sudo apt-get install gcc-4.4 gcc-4.4-multilib g++-4.4 g++-4.4-multilib
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50
sudo update-alternatives --config gcc
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 40
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 50
sudo update-alternatives --config g++
安装make3.82
下载make-3.82.tar.gz,解压,编译
将/usr/bin/make 改名make-4.1
将make-3.82/编译生成的make,拷贝到/usr/bin下,并改名为make-3.82
sudo update-alternatives --install /usr/bin/make make /usr/bin/make-3.82 40
sudo update-alternatives --install /usr/bin/make make /usr/bin/make-4.1 50
sudo update-alternatives --config make
修改
sudo vi /etc/apt/sources.list
把安装gcc添加的部分还原
使用umake 安装android将自动下载安装OpenJDK、 Android Studio ( 我这里安装的是 1.5) ,启动Android Studio 1.5后提示OpenJDK有问题,建议使用OracleJDK
# 1. oracle java jdk ppa source
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
JDK6 :
sudo apt-get install oracle-java6-installer
JDK 7:
sudo apt-get install oracle-java7-installer
JDK 8:
sudo apt-get install oracle-java8-installer
# 2. oracle openjdk ppa source
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk // OpenJdk 7安装:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javah
sudo update-alternatives --config jar
编译android6.0出现unsupported reloc 42 against global symbol art::Runtime错误
修改:Merlin2\kernel\android\marshmallow\art\build\Android.common_build.mk 75行
ifneq ($(WITHOUT_HOST_CLANG),true) ====> ifeq ($(WITHOUT_HOST_CLANG),false)
http://review.cyanogenmod.org/#/c/120824/2/build/Android.common_build.mk
编译bootcode或kernel时出现Can't use 'defined(@array)' (Maybe you should just omit the defined()?),因为perl v5.22.1bug导致编译出错
#if( defined(@ARGV) )改为if(@ARGV)