Ubuntu 12.04搭建MTK 6577 安卓开发环境

   Ubuntu 12.04搭建 MTK 6577安卓开发环境

1.       下载并安装Vmware虚拟机;

2.       下载并在虚拟机上安装Ubuntu 12.04 iso 安装包:下载地址: http://releases.ubuntu.com/12.04/ 

3.       更新Ubuntu 源:

①     sudo cp /etc/apt/sources.list /etc/apt/source.list.bak

     sudo gedit /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ quantal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ quantal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ quantal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ quantal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse

     sudo apt-get update

4.安装jdk

   ①先下载相应的jdk版本:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

jdk-6u31-linux-x64.bin

    sudo jdk-6u31-linux-x64.bin /usr

    cd /usr

     sudo ./jdk-6u31-linux-x64.bin

     sudo gedit /home/adam/.bashrc

     sudo gedit /etc/profile

JAVA_HOME=/usr/jdk1.6.0_31

JAVA_BIN=/usr/jdk1.6.0_31/jre/bin

PATH=$PATH:$JAVA_HOME/bin

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOME JAVA_BIN PATH CLASSPATH

     将默认jdk改过来

sudo update-alternatives --install /usr/bin/java java /usr/jdk1.6.0_31/bin/java 300

sudo update-alternatives --install /usr/bin/javac javac /usr/jdk1.6.0_31/bin/javac 300

sudo update-alternatives –config java

sudo update-alternatives –config javac

    ⑧测试

       echo $JAVA_HOME

       java –version

5.

     sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32z-dev

 

sudo apt-get install lib32readline-gplv2-dev

sudo apt-get install g++-4.4-multilib

sudo apt-get install uboot-mkimage

sudo apt-get install libxml2-utils

6.gcc g++

sudo apt-get install gcc-4.4

sudo apt-get install g++-4.4

cd /usr/bin

ls –l gcc*

sudo mv gcc gcc.bak

sudo ln -s gcc-4.4 gcc

ls –l g++*

sudo mv g++ g++.bak

sudo ln -s g++-4.4 g++

gcc -v

g++ -v

7.到以上六步完成了ubuntu12.04上编译android的开发环境,以下还有一步为了方便windowsubuntu间互相通信使用的samba服务器:

①安装samba服务器

   sudo apt-get install samba

   sudo apt-get install smbclient

   sudo apt-get smbfs

②配置samba 服务器

   sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

   sudo gedit /etc/samba/smb.conf

     ;security user修改为 security user,然后在配置文件末尾添加

     [ShareFiles]
     
comment = Shared Folder require password
     path = /home/mtk/share
     public = yes  
     writable = yes
     valid users = adam
     create mask = 0777
    directory mask = 0777
    force user = nobody
    force group = nogroup
    available = yes
    browseable = yes

保存后重新启动samba,这一步很重要,sudo /etc/init.d/smbd restart

   设置用户和密码

      sudo smbpasswd –a adam

   通过命令行 \\相应ip就可以登录共享

8.SVN工具安装,用于版本管理

sudo apt-add-repository ppa:dominik-stadler/subversion-1.7

sudo apt-get update

sudo apt-get install subversion

至此MTK6577的开发环境基本搭建好

9.接下来就是编译,编译过程中出现问题的解决

   

 

 

 

参考如下:

http://blog.csdn.net/tonywgx/article/details/8030695

posted on 2014-07-09 08:30  王亮1  阅读(126)  评论(0编辑  收藏  举报

导航