Install, configure, and build the android Source Code compiling environment for Linux mint 13

Source: Internet
Author: User
Tags linux mint

Http://www.cnblogs.com/tnxk/archive/2012/08/30/2663146.html

I have used Ubuntu and want to change it to linuxmint. The following describes how to install and configure linuxmint13.

1. Installation

When I installed linuxmint13, I tried many methods and failed. Finally, hard disk installation is selected. The hard disk installation of linuxmint is the same as the installation of ubuntu.

1.1 preparations

1. http://www.linuxmint.com/download Linux mint 13 from the official website of Linux mint.

2. Download grub4dos, http://www.linuxidc.com/Linux/2009-01/18027.htm.

1.2 Installation Steps

1. Copy the downloaded linuxmint-13-mate-dvd-64bit.iso to the c root directory of the system.

2. Extract the vmlinuz and initrd. LZ files from the Casper folder of the linuxmint-13-mate-dvd-64bit.iso. And put it in the C root directory.

3, decompress the grub4dos compressed package, will get a folder named grub4dos-0.4.4, copy the following files to the C disk (the first two files are required, the last two files online some information that do not need, put it for the sake of insurance, and there is no harm to it anyway ~) :

  Grldr Menu. lstGrldr. MBR grub.exe

4. Modify the menu. LST file and add the following content to the end of the file:

TitleInstall
Linux mint

Root (hd0, 0)

Kernel (hd0, 0)/vmlinuz boot = Casper iso-Scan/filename =/Linuxmint-13-mate-dvd-64bit.isoLocale = zh_CN.UTF-8

Initrd (hd0, 0)/initrd. LZ

Specifically, the content after the title is written as needed. The highlighted image file after the kernel is the Linux mint image file, which must correspond to the file name in drive C.

5. Modify the hidden boot. ini in the root directory of the C drive. open the file and add the following content at the end of the file:

C: \ grldr = "Linux mint install"

After the above work is completed, restart the system to start the installation of Linux mint on the XP hard disk!

 

However, it took me a long time to install it. It was mainly a waste of time on system partitions. Operations on each partition had to wait for a long time. It hurts!

Note: After the Linux mint interface is restarted, uninstall isodevices.

Umount-L/isodevices

This step is very important. If this step is not executed, the partition will fail.

 

2. Configuration

After the installation is complete, you can configure it. Because the installation is not linked to the network, the update package and Language Pack are not downloaded. Now the first thing is to install the Language Pack.

The default update source in mint 13 is really slow, so the first step is to handle the problem of updating the source first.

2.1 Update Source

The linuxmint image is built on the Image site of the Chinese Emy of science and technology. linuxmint: http://mirrors.ustc.edu.cn/linuxmint/this is only the main image.

The specific steps are as follows:

1. log on to Linux mint and open the terminal.

2. Type The sudo nano/etc/APT/sources. LIST command. We recommend that you back up the file first.

3. It should look like this after opening the text
Deb http://packages.linuxmint.com/Maya main upstream Import
Deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ precise-Updates main restricted universe multiverse
Deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
Deb http://archive.canonical.com/ubuntu/ precise partner
Deb http://packages.medibuntu.org/precise free non-free
We can see that there is no Chinese server shadow.

4. Next we will add the Chinese source
Add the following text
Deb http://mirrors.ustc.edu.cn/linuxmint/ Maya main upstream import universe multiverse
Deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
Deb http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
Deb http://mirrors.163.com/ubuntu/ precise-Updates main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse


And comment out all the original sources (that is, block them, don't use them)
Deb http://packages.linuxmint.com/Maya main upstream Import
Deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ precise-Updates main restricted universe multiverse
Deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
Deb http://archive.canonical.com/ubuntu/ precise partner
Deb http://packages.medibuntu.org/precise free non-free
Note that you just need to add a # at the beginning.
Note: The Linux mint 13 Maya is used as an example. Actually, you just need to change the link. After
The text above must be unchanged.

5. Update Apt
Enter the sudo apt-Get update command on the terminal
Wait until the execution is complete. At this time, you will find that Linux mint is so lightweight!

 

2.2 installation Input Method

Here I installed fcitx

Search for fcitx from the software manager and install it.

After the installation is complete, go to control center --- "language support's keyboard input mode system and select fictx

Restart the system.

 

2.3 install QQ

1. Download the Deb installation package from the following URL;

Latest 6-1 Updated: http://www.longene.org/download/WineQQ2012-20120531-Longene.deb
Several bugs have been fixed!

2. Open the terminal and enter it to the directory to run the command to install it:

Sudo dpkg-I *. Deb

3. The 64-bit system also needs to run the following command:

Sudo apt-Get install ia32-libs

4. Run the following command to uninstall:

Dpkg-r QQ-for-wine

 

2.4 install Google Chrome

1. Chrome

Download the latest installation package from the https://www.google.com/intl/en/chrome/browser/index.html. You can also run the following command to install

32-bit system:

Wget-O google-chrome_i386.deb http://goo.gl/itppy

Sudo dpkg-I google-chrome_i386.deb

64-bit system:

Wget-O google-chrome_amd64.deb http://goo.gl/iXDWk

Sudo dpkg-I Google-chrome *. Deb

2. Chromium

Sudo apt-Get install chromium-Browser

How to fix the expiration of the chromium flash plug-in:

Find flash plug-in

$ Sudo locate libflashplayer. So

/Usr/lib/Adobe-flashplugin/libflashplayer. So

Copy the flash plug-in to the chromium-browser plug-in directory.
$ Sudo CP/usr/lib/Adobe-flashplugin/libflashplayer. So
/Usr/lib/chromium-Browser/plugins

 

2.5 install a wireless network card

My network card is bcm4312. I have been searching for it online for a long time. I have tried either of the two methods. Finally, find the following solution:

1. Go to the official Broadcom website to carefully check the specific link address as follows:
Http://www.broadcom.com/support/802.11/linux_sta.php

You can first view the model of your Nic and download the corresponding driver. Enter "lspci | grep network" under the terminal to confirm the NIC model.

2. Extract
Tar-xzf hybrid-portsrc-x86_32-v5.60.48.36.tar.gz

3. Compile
Make

The following error occurs during compilation:

/Home/lgq/hybrid_wl/src/WL/sys/wl_linux.c: 388: 2: Error: an unknown field 'ndo _ set_multicast_list 'is found in the Initial Value Setting item'
/Home/lgq/hybrid_wl/src/WL/sys/wl_linux.c: 388: 2: Warning: incompatible pointer type initialization [enabled by default]
/Home/lgq/hybrid_wl/src/WL/sys/wl_linux.c: 388: 2: Warning: (near 'wl _ netdev_ops.ndo_validate_addr 'initialization) [enabled by default]

After Google found that ndo_set_multicast_list was replaced by ndo_set_rx_mode

The code is compiled again.

4. sudo make install

5. sudo depmod

6. sudo modprobe WL

Give Ubuntu a few seconds after loading the "WL" kernel module, then eventually the network manager will start looking for wireless networks.

 

Reference: http://blog.csdn.net/cs090506/article/details/7300526

 

2.6 install the dictionary interstellar Translator

Install stardict.

Dictionary download path: http://abloz.com/huzheng/stardict-dic/

Or enter the terminal:

Apt-Get install stardict sdcv stardict-common stardict-English-Czech stardict-tools stardict-xmlittre dictzip

2.7 compile and install the latest ALSA driver.

After the Linux mint is installed and the headset is plugged in, the built-in Speaker of the notebook still has sound.

1. view the codec model of your sound card.

Enter alsamixer to view the displayed chip value. Or CAT/proc/asound/card0/codec #0 to view the first line of the displayed result.

2. Download the driver from the official website for installation.

 

3. Build an android source code Development Environment

In this section, we set up the source code development environment for android4.0.

Linux mint 13 has installed GNU make 3.81, Python 2.7.3, and git 1.7.9.5.

Therefore, you also need to install JDK 6.

3.1 install JDK 6

Linux mint 13 comes with openjdk, but this is not what I want, we want sun-java6.

1. Before installing Sun's JDK, delete openjdk, open the new version, search for openjdk, and delete all packages.

Or execute sudo apt-Get autoremove openjdk-6-jre

2. download the latest Installation File (such as: http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html) on Sun's official website ).

Add execution permission: sudo chmod U + x jdk-6u34-linux-x64.bin

Copy the installation file to the/usr/lib/Java/directory.

Run the installation command./jdk-6u34-linux-x64.bin

After the JDK is successfully installed, We will configure the JDK.$ Sudo gedit/etc/environmentModify the environment file and add the following code:

Path = "/usr/lib/Java/jdk1.6.0 _ 34/bin"

Classpath = "/usr/lib/Java/jdk1.6.0 _ 34/lib"

Java_home = "/usr/lib/Java/jdk1.6.0 _ 34"

If path already exists, use the colon as the interval to add the bin directory address of JDK, so that the Java environment variable is configured successfully, however, the JDK used by default may not have been installed just now, Because ubuntu may also have a default JDK, such as openjdk; therefore, in order to make the JDK installed by default, you also need to execute the following command:

$ Sudo Update-alternatives -- install/usr/bin/Java/usr/lib/Java/jdk1.6.0 _ 34/bin/Java 300

$ Sudo Update-alternatives -- install/usr/bin/javac/usr/lib/Java/jdk1.6.0 _ 34/bin/javac 300

$ Sudo Update-alternatives -- config Java

After the command is successfully executed, the JDK we installed is the default one. You can run $ Java-version to view the JDK information, for example:

Java version "1.6.0 _ 34"

Java (TM) se Runtime Environment (build 1.6.0 _ 34-b04)
Java hotspot (TM) 64-bit server VM (build 9-b04, mixed mode)

3.2 install necessary software packages

Install the Toolkit required for Android compilation. This step is critical and must be installed. Otherwise, an inexplicable error will be reported during compilation !!!!!!!!!!!!!!!!

Sudo apt-Get install Git-core GnuPG flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z1-dev gcc-multilib g ++-multilib mingw32
Tofrodos Python-markdown libxml2-utils extends tproc

3.3 configure USB

Lgq-laptop bin # lsusb
Bus 001 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub
Bus 002 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub
Bus 003 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 004 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 005 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 006 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 007 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 002 device 003: Id 04f2: b008 chicony Electronics Co., Ltd USB 2.0 camera
Bus 006 device 002: Id 1ea7: 000b
Bus 002 device 004: Id 05c6: 9025 Qualcomm, Inc.

$ Sudo Vim/etc/udev/rules. d/70-android.rules

Add the following content

Subsystem = "USB", attrs {idvendor} = "05c6", attrs {idproduct} = "9025", mode = "0666"

Run the following command to restart udev:

$ Sudo chmod A + Rx/etc/udev/rules. d/70-android.rules
$ Sudo service udev restart

 

3.4 install SVN

1. Install Subversion

Apt-Get install Subversion

2. Install rabbitvcs

sudo add-apt-repository ppa:rabbitvcs/ppa

Sudo apt-Get update

Sudo apt-Get install rabbitvcs-nautilus3

Nautilus-Q

Nautilus

The interface of rabbitvcs is quite a habit, but it is very difficult.

3. rapidsvn

Sudo apt-Get install rapidsvn

4. esvn

 

3.5 set ccache ① To install the ccache official website or apt to install sudo apt-Get install ccache ② $ which ccache to view the installation path,/usr/bin/ccache ③ $ mkdir ~ /. Bin ④ $ Cd ~ /. Bin/$ ln-S/usr/bin/ccache GCC $ ln-S/usr/bin/ccache g ++ $ ln-S/usr/bin/ccache arm-Linux- GCC $ ln-S/usr/bin/ccache arm-Linux-G ++ ⑤ path settings, change ~ /. Bin/is placed in front of the path such as arm-Linux-GCC. Original: Path =/usr/local/arm-linux_pre4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin: /bin: Path =/home/<user> /. bin:/usr/local/arm-linux_pre4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin: /bin gedit ~ /. Bashrc add export Path = "/home/<user> /. bin: $ paht ", and then restart the instance to run the command $ which arm-Linux-gcc/home/<user> /. bin/ARM-Linux-GCC confirm 7⑦ ccache-M 30g

 

3.6 install the latest eclipse

Eclipse method reference: http://www.cnblogs.com/tnxk/archive/2012/07/09/2583800.html

The update speed of eclipse is quite slow. Here we collect a method to speed up the update.

The solution can only be changed to the mirror site. The specific steps are as follows:

1. Find a domestic site-Great http://mirror.bjtu.edu.cn/eclipse of North Jiaotong University

2. Change the eclipse update server to download the site windows-> preferences-> install/update-> available software sites

3. FindAllThe start line. Note that:All,Because official eclipse projects of different versions, such as web tools projects, also need to be changed to mirror sites. Otherwise, only some plug-in sites will be updated, and the speed issue can only be partially solved.

4. Click Edit, edit location, replace http://download.eclipse.org with http://mirror.bjtu.edu.cn/eclipse

 

Reference: http://blog.csdn.net/chenxihua/article/details/6423168

 

4. Problem and Solution 4.1. After the restart, the waiting for network configuration problem occurs. Now, when dialing in Ubuntu 12.04, if you use the sudo pppoeconf command to configure dialing, after the computer is restarted, the system displays waiting for network configuration, and then waiting up to 60 more
The Booting System without full network configuration is displayed at the end of the seconds for network configuration. after entering the desktop, the network connection status icon disappears. Cause:

When you use the sudo pppoeconf command, information is written into the/etc/Network/interfaces file, which directly causes the above problem.

Solution:

After the sudo gedit/etc/Network/interfaces file is opened

Auto Lo

Iface lo Inet loopback
After all the other content is deleted, restart the system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.