Jump to: navigation, search

What you need

You can download it here: [1]

$ mkdir ~/bin
$ export PATH=$PATH:~/bin
$ curl > ~/bin/repo
$ chmod +x ~/bin/repo
$ mkdir ~/cmod
$ cd ~/cmod
$ repo init -u git://
$ repo sync
$ vendor/cyanogen/get-rommanager
$ . build/
$ lunch cyanogen_umts_sholes-eng
$ make -j2 otapackage
$ vendor/cyanogen/tools/squisher

Build kernel

Firstly, you need your own cross-toolchain. See Toolchain

Then copy mapphone_defconfig from kernel_sources_root_directory/arch/arm/configs/ and edit it:

cd arch/arm/configs
cp mapphone_defconfig motorofl_defconfig
vim motorofl_defconfig
cd ../../../
make motorofl_defconfig
make -f kernel/

Build ramdisk

A ramdisk is basically a small filesystem containing the core files needed to initialize the system. It includes the critical init process, as well as init.rc, which is where you can set many system-wide properties. If you really want to know more about it, here is the documentation (Documentation/filesystems/ramfs-rootfs-initramfs.txt). Here's a list of files on a typical ramdisk:


Then pack them all in cpio archive:

find . | cpio -o -H newc | gzip > ../ramdisk.cpio.gz

The final step is to combine the kernel and your new ramdisk into the full image, using the mkbootimg program (which you should download and compile from the git repository):

mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel your-kernel-file --ramdisk ramdisk.cpio.gz -o boot.img