If the unable to locate package appears, use sudo apt-get update
installation JDK6
Start installing the JDK below:
Some of the information on the Internet is to install the JDK under the/USR/LIB/JVM/JDK, but also installed under the/opt, I am here to introduce it is installed under the/OPT,
Terminal under entry you store Jdk-6u45-linux-x64.bin
$sudo chmod 777 Jdk-6u45-linux-x64.bin
$ sudo-s./jdk-6u45-linux-x64.bin/opt
Go all the way to the car until you ask if it's installed, enter Yes to go (directly knocking a capital a plus cart better,)
[If this command completes, the installation directory is not under/OPT, but under your own account directory, please move the entire folder to/OPT and give the appropriate permissions]
$ sudo mv jdk1.6.0_45/opt
OK, installation complete, the following configuration environment variables
Configure CLASSPATH, modify environment variables for all users
$ Gksudo Gedit/etc/profile
Added at the end of the file
#set Java Environment
Java_home=/opt/jdk1.6.0_45
Export JRE_HOME=/OPT/JDK1.6.0_45/JRE
Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $JRE _home/bin: $PATH
Refresh/etc/profile
$source/etc/profile
View Java version
$java –version
Show:
[Email protected]:~$ java-version
Java Version "1.6.0_45"
Java (TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot (TM) 64-bit Server VM (build 20.45-b01, Mixed mode)
To install the compilation library: ( preferably one-to-one installation, or several installations, do not install all at once , to prevent some libraries from invalidating )
sudo apt-get install Git-core GnuPG Flex Bison gperf build-essential\
Zip curl Zlib1g-dev Libc6-dev lib32ncurses5-dev \
X11proto-core-dev Libx11-dev Lib32z1-dev Libgl1-mesa-dev g++-multilib\
Mingw32 Tofrodos Python-markdown Libxml2-utils
Final installation Ia32-libs
New version of Ubuntu cannot be updated by Ia32-libs, replaced by Lib32z1 lib32ncurses5 lib32bz2-1.0
Because ubuntu64-32 compatibility is not very good, you are missing a 32-bit runtime
Install the required 32-bit library yourself
$ sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386
However, the following error was encountered during the installation process:
Errors were encountered while processing:
Libc6-dev:i386
E:sub-process/usr/bin/dpkg returned an error code (1)
Here's how to fix it:
$ sudo apt-get install linux-libc-dev:i386
$ sudo apt-get install libc6-dev:i386
At this point, even if the build environment is complete, at least on my computer, so we can start to download the Android code to compile.
Final installation Ia32-libs
$ sudo apt-get install Ia32-libs
Ubuntu 14.04 x64 Configuring the Android 4.4 KitKat compilation environment is not much different from Ubuntu 12.04-13.10 and Jellybean Build environment configuration
Modify GCC and the g++ version
Change the default version of GCC to 4.4.
Installing gcc4.4 and g++4.4
sudo apt-get install gcc-4.4
sudo apt-get isntall g++-4.4
Modify the default GCC and g++ versions of 4.4
sudo update-alternatives--remove-all gcc
sudo update-alternatives--INSTALL/USR/BIN/GCC gcc/usr/bin/gcc-4.4 40
sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-4.4 40
Configuring the default GCC and g++
sudo update-alternatives--config gcc
sudo update-alternatives--config g++
With command: ls/usr/bin/gcc*-L
Display, GCC version, change version,
#sudo apt-get Install gcc-4.4 g++-4.4
Remove version 4.7 Soft connect: sudo rm/usr/bin/gcc
sudo rm/usr/bin/gcc
New 4.4 version Connection: sudo ln–s/usr/bin/gcc-4.4/usr/bin/gcc
sudo ln–s/usr/bin/g++-4.4/usr/bin/gcc
Execute find lichee/linux-3.4/modules/-type l under A80_optimus before compiling the kernel | Xargs RM-FV
The compilation appears:
"Mkimage" command not found-u-boot images won't be built
Workaround:
If you are using Ubuntu 9.10 and later, you can install mkimage using the following command:
#apt-get Install Uboot-mkimage
If you have already installed the JDK , or a hint JDK Errors ,
Workaround
Make sure your JDK is under/USR/LIB/JVM
sudo update-alternatives--install/usr/bin/java Java/usr/lib/jvm/jdk1.6.0_45/bin/java 300
sudo update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.6.0_45/bin/javac 300
sudo update-alternatives--install/usr/bin/javah javah/usr/lib/jvm/jdk1.6.0_45/bin/javah 300
sudo update-alternatives--install/usr/bin/javap JAVAP/USR/LIB/JVM/JDK1.6.0_45/BIN/JAVAP 300
sudo update-alternatives--install/usr/bin/javaws javaws/usr/lib/jvm/jdk1.6.0_45/bin/javaws 300
sudo update-alternatives--install/usr/bin/javadoc javadoc/usr/lib/jvm/jdk1.6.0_45/bin/javadoc 300
sudo update-alternatives--install/usr/bin/jar Jar/usr/lib/jvm/jdk1.6.0_45/bin/jar 300
Recompile the kernel
installation Samba shared,
#sudo Apt-get Install System-config-samba
#运行samba图形界面
#sudo System-config-samba
Select the folder you want to share, with the permissions set to everyone readable and writable
#映射电脑硬盘,
View Virtual Machine IP
#ifconfig
Desktop on my Computer, right-click on the map to disk,
Enter the IP address to complete the samba share
CCache Ubuntu Configuration
Setup method (Ubuntu):
① installation CCache
Download or apt install sudo apt-get install CCache
②$ which CCache
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, put ~/.bin/in front of the original path.
Gedit ~/.BASHRC Add export path= "/home/<user>/.bin:/usr/bin", then reboot
⑥ Test Commands
Which g++
which GCC
⑦$ ccache-m 2G
Hard disk space is not enough to mount a new hard drive
Mount/dev/sdb1/home/danquan/a80-t EXT4
Android after compiling the source code, re-compile if you need to do cleanup work
1, in the source directory of the root directory, make clean;
2, into the source code \linux\kernel\ directory, the implementation of make mrproper;
3, return to the root directory, follow the instructions in order to execute the source Build/envsetup.sh,lunch, select products, extrat-bsp,make–j8 and other operations.
Note: Output logs from the compilation process to the specified file, and the last step makes the instructions
Make–j8 2>build_log.txt (Output the error log in the compilation process to the Build_log.txt file)
Make–j8 1>build_log.txt (output the correct log generated during compilation to Build_log.txt)
Make-j8 >build_log.txt 2>&1 (output all logs generated during compilation to Build_log.txt)
Construction of A80 compilation environment under ubuntu12.04 platform