1. During the compilation of Linuxkernel, the original Android2.1 can be passed, but this android2.2 won't work, and the operations are the same. Even if two operations are performed to compile the Android Application in advance:. build/envsetup. shlunch, the following error CHKinclude/linux/version. hma is still returned.
1. When compiling Linux kernel, the original Android 2.1 can pass, but this android 2.2 won't work, and the operations are the same.
Even if two operations are performed before the Android Application is compiled:
. Build/envsetup. sh
Lunch
Also, the following error occurs:
CHK include/linux/version. h
Make [1]: "include/asm-arm/mach-types.h" is up to date.
CHK include/linux/utsrelease. h
SYMLINK include/asm-> include/asm-arm
CC kernel/bounds. s
C0: error: unrecognized command line option "-mlittle-endian"
C0: error: unrecognized command line option "-mabi = aapcs-linux"
C0: error: unrecognized command line option "-mno-thumb-interwork"
Kernel/bounds. c: 1: error: bad value (armv5t) for-march = switch
Kernel/bounds. c: 1: error: bad value (strongarm) for-mtune = switch
The above problem is caused by incorrect CROSS_COMPILE settings.
Later, it was found that CROSS_COMPILE In The makefile of linux kernel in version 2.2 was not set, but it was set in version 2.1.
Therefore, CROSS_COMPILE in 2.2 should be obtained by setting other related environment variables.
Later, we found that after creating the root command using sudo passwd root, we can perform the above compilation with the root command.
2. An error occurred while compiling the android program.
There are many phenomena, mainly because java is abnormal.
Enter java-version
The following error may occur:
The program "java" is included in the following software packages:
* Gcj-4.4-jre-headless
* Openjdk-6-jre-headless
* Cacao
* Gij-4.3
* Jamvm
* Kaffe
Or java cannot be found.
If java is installed normally and version 1.5 is correct, only one possible issue is the environment variable.
Because I use the external sh to set the environment variable (source android. sh ). The bash settings of the system are not modified.
Android. sh has the following settings:
Export JAVA_HOME =/usr/java/jdk1.5.0 _ 22
Export CLASSPATH = $ JAVA_HOME/lib/tools. jar: $ {JAVA_HOME}/lib/dt. jar: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ PATH
After setting, it seems right to view the page with env.
Multiple parties found a phenomenon. If you create an android. sh file under linux and write these settings, everything will work normally after the file is referenced by source android. sh.
At this time, you can also see the java-version.
If you create an android. sh file in Windows and write the settings to it, you can call source android. sh in linux.
However, comparing these two files with file comparison tools is the same.
It seems that Windows and linux file systems are quite different!