Difference between revisions of "CyanogenMod"

From MILEDROPEDIA
Jump to: navigation, search
(Build kernel)
m (moved MOTOROFL to CyanogenMod: obsolete)
(No difference)

Revision as of 19:44, 12 July 2011

What you need

You can download it here: [1]

$ mkdir ~/bin
$ export PATH=$PATH:~/bin
$ curl http://android.git.kernel.org/repo > ~/bin/repo
$ chmod +x ~/bin/repo
$ mkdir ~/motorofl
$ cd ~/motorofl
$ repo init -u git://gitorious.org/motorofl/android_manifest.git
$ repo sync

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/kernel.mk

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:

./init.rc
./default.prop
./proc
./dev
./init
./sys
./sbin
./sbin/adbd
./system
./data

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