内置的是ubuntu16.04,适合构建交叉编译环境。
首先先安装包管理器有的库
sudo apt-get install build-essential g++-multilib libc6-dev lib32ncurses5 lib32ncurses5-dev lib32z1 flex bison gperf curl zlib1g zlib1g-dev tofrodos libxml2-utils由于官方源已经没有jdk源,所以我们需要添加ppa源安装。安装JDK7:
sudo add-apt-repository ppa:webupd8team/java #添加ppasudo apt-get update sudo apt-get install oracle-java7-installer #安装oracle-java-installersudo update-java-alternatives -s java-7-oracle #设置系统默认jdk最后来看看JDK是否安装成功
java -versionjavac -version安装REPO先在/home目录新建~/bin
然后下载repo脚本
curl <a href="https://storage.googleapis.com/git-repo-downloads/repo">https://storage.googleapis.com/git-repo-downloads/...</a> > ~/bin/repo赋予权限chmod a+x ~/bin/repo配置环境变量export PATH=~/binPATH测试$ repo –helpYou should see a message similar to the following:usage: repo COMMAND [ARGS]repo is not yet installed. Use “repo init” to install it here.The most commonly used repo commands are as follows:init -> Install repo in the current working directoryhelp -> Display detailed help on a command
至于是否下载SDK,看看是选择安卓进行二次开发,还是选择嵌入式Linux进行二次开发了。
附上两种平台地址。
1. AOSPrepo init -u https://android.googlesource.com/platform/manifest -b android-6.0.0_r1Repo sync –j162. Linuxhttps://github.com/helio-x20/linux/tree/helio-x20
至此编译环境搭建完毕。