3 days from the company's intermittent download, finally the CM-11.0 code to download, share the download of the compilation ROM package process.
One pre-condition
1 Ubuntu 13.04 System, while configuring the Android build Environment
Configuration method See http://source.android.com/source/initializing.html Web page
2 Download the source code
Special attention:
Because the cm-11.0 code is huge, the download is complete. Repo hidden folder about 10G, and then a git fetch real
Code files, probably nearly 30G, and then compiled, and estimated to be more than 20G, the author prepared a 100G
Partition to make this compilation. For later unnecessary trouble, it is recommended to have enough hard disk space.
Curl Http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Repo tools that need to be supplied with CyanogenMod
Repo Init-u git://github.com/cyanogenmod/android.git-b cm-11.0
Download the appropriate branch
Repo Sync
Download
3 Samsung Google Nexus S ("Crespo") mobile phone,
On my phone
About Mobile phones
Model: Nexus S
Baseband version: I9020XXKL1
4 Brush machine tools, such as the perfect brush machine
Two important pages
1 http://wiki.cyanogenmod.org/w/Devices#vendor=;
This page contains all the models supported by CM, and the corresponding driver
2 Http://wiki.cyanogenmod.org/w/Crespo_Info
This page contains all kinds of information that Crespo needs before compiling this device.
The most important of these is
Device Https://github.com/cyanogenmod/android_device_samsung_crespo
Kernel Https://github.com/cyanogenmod/android_kernel_samsung_crespo
Both of these packages need to be downloaded,
Where the driver package:
After downloading unzip, put in Cm-11/device/samsung/crespo which Crespo this folder if you do not want to create a new
Kernel Package
After downloading unzip, put in Cm-11/kernel/samsung/crespo which Crespo this folder if you do not want to create a new
Also note that there is another hardware package to download
Hardware Https://github.com/CyanogenMod/android_hardware_samsung
After download unzip, put in Cm-101hardware/samsung where Samsung this folder if not to create a new
3 Http://wiki.cyanogenmod.org/w/Build_for_crespo
This page tells how to compile Crespo cm-10.2 This version of the code
Three compiled source code
1 Pre-compilation preparations
CD ~/android/system/vendor/cm
./get-prebuilts
2./extract-files.sh
Connect the Samsung Nexus S phone first, then go to the CM-10/DEVICE/SAMSUNG/CREPSO directory and execute the instructions above.
The main purpose of this script is to pull out the drive so library in the phone, then create a new Cm-10/vendor/samsung/crespo directory, and then put the corresponding library file inside.
My phone in the execution of this command, a mistake did not report, if the lack of any documents, see the previous article, the so library can be filled.
3 really start compiling
The previous lunch command to choose which version to compile is not required, CyanogenMod has encapsulated these into simpler commands.
After you return to the root directory
Export use_ccache=1
This is said to speed up the compilation speed
Unset ndk_root
Fix a bug in Android source code compilation itself
. build/envsetup.sh
After this important execution succeeds, the following commands can continue to execute
Croot
Brunch Crespo
OK, start compiling.
4 Brush machine, this should be noted that the original default recovery program is not compatible
The latest Android 4.4 ROM package, so you need to use a wire brush to update the recovery program
Update method:
1 The ROM Zip package will be generated first, via ADB push upload to the phone's/sdcard/directory, it is recommended
Change into Update.zip name
2 simultaneously press the power on key and the volume add key, enters the fastboot mode, this time the USB is the initialization good
And then run
FastBoot boot/cm11disk/cm-11/out/target/product/crespo/recovery.img
This command
3 reboot into recovery mode, update the Update.zip package with the latest recovery program.
Error resolution in the four compilation process
The following error was encountered when compiling the first
Make: * * * No rule to make target '/cm11disk/cm-11/out/target/product/crespo/obj/shared_libraries/libs3cjpeg_ Intermediates/export_includes ', needed by '/cm11disk/cm-11/out/target/product/crespo/obj/shared_libraries/ Camera.herring_intermediates/import_includes '. Stop.
The reason for the mistake was that it was less libs3cjpeg this library file
A bit of a search on GitHub and found this
Https://github.com/android-ia/platform_external_libs3cjpeg
After the download is added to the External/libs3cjpeg directory, the following error is still found in the recompile
Make: * * * No rule to do target '/cm11disk/cm-11/out/target/product/crespo/obj/lib/libs3cjpeg.so ', needed by '/cm11disk /cm-11/out/target/product/crespo/obj/shared_libraries/camera.herring_intermediates/linked/camera.herring.so '. Stop.
There's no way to pull it out of the phone with the ADB pulls a libs3cjpeg.so the product/crespo/obj/lib/libs3cjpeg.so directory, but it will still appear
Device/samsung/crespo/libcamera/seccamera.h:38:31:fatal error:videodev2_samsung.h:no such file or directory
Compilation terminated.
In file included from device/samsung/crespo/libcamera/seccamerahwinterface.h:22:0,
From device/samsung/crespo/libcamera/seccamerahwinterface.cpp:23:
Device/samsung/crespo/libcamera/seccamera.h:38:31:fatal error:videodev2_samsung.h:no such file or directory
Compilation terminated.
Make: * * * [/cm11disk/cm-11/out/target/product/crespo/obj/shared_libraries/camera.herring_intermediates/ SECCAMERA.O] Error 1
Such a mistake, this time began to doubt that the previous solution was wrong, and looked
Device/samsung/crespo/libcamera/android.mk this file and understand the real reason for the mistake.
Local_c_includes + = Hardware/samsung/exynos3/s5pc110/include
Local_c_includes + = Hardware/samsung/exynos3/s5pc110/libs3cjpeg
Local_c_includes + = Frameworks/native/include/media/hardware
The original is hardware less download a project, and this project itself is not on the trunk, repo sync can't download it
Find this project on GitHub download cm-11.0 version hardware then compile again
https://github.com/CyanogenMod/android_hardware_samsung/tree/cm-11.0