文章转载地址:https://www.codeaurora.org/xwiki/bin/QAEP/
Detailed Build Instructions
Make sure that the environment has been completely and correctly as described by the Android Open Source Project instructions before attempting to build. If you get build errors about clearsilver.jni, verify the Java version and path. (javac version 1.5.0_16 is verfied as working).
Once the environment has been configured build Android as follows
$ cd <android-source-tree> $ source build/envsetup.sh |
The envsetup.sh script is responsible for setting Bash environment variables required by the Android build system.
Now use choosecombo to set the desired build by specifying Build, Type, Product and Variant.
$ choosecombo |
Choosecombo is interactive or it can take arguments on the commandline
$ choosecombo 1 1 msm7201a_surf eng |
Start the build
$ make -j4 |
By default, the build system uses the tip of kernel source from <platform>/kernel directory, including any modifications you've made.
If you want to compile the kernel with a specific configuration file other than the one defined in vendor/qcom/<product>/AndroidBoard.mk (e.g. msm7201a_defconfig) pass the KERNEL_DEFCONFIG flag on the Make command line.
$ make -j4 KERNEL_DEFCONFIG=your_defconfig |
The kernel objects, vmlinux and zImage will be at <platform>/out/target/product/msm7201a_surf/obj/KERNEL_OBJ and its subdirectories.
You can override the TARGET_PREBUILT_KERNEL flag with your own kernel image to build android with your kernel, as follows:
$ make -j4 TARGET_PREBUILT_KERNEL="<your_kernel_tree>/arch/arm/boot/zImage" |
You can also build ''tiny android'' which is an Android build with a limited user-space environment useful for kernel development and verification. The ''tiny android'' build will not boot into the full UI. It will stay at one of the loading screens. ADB will be active, allowing you to run unit tests, etc. The build time for ''tiny android'' is significantly less than a full Android build.
$ BUILD_TINY_ANDROID=true make -j4 |
You can also tell the build system to echo to stdout the full commands and parameters that it would use in building each file without actually building the file. This is useful to see all the compiler options provided
$ make --just-print |