[XPERIA X8 General] viper001:
part 3. Revenge of the Code

or that "insert profanity here" ramdisk!!!

Never before in the history of Noobiness has anything been more complicatedly crazy than the ramdisk. i mean, compiling the base kernel image is easy compared to this monster.

But we'll not let this stop us! Crash Helmets ON!!!!

What's the 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. This is also where the chargemon (off-line charging) and the recovery systems are located.

we built our kernels using Blagus's ramdisk which is included with the bootloader unlock. so let's start with that:

1. get back to your Home folder. make a working folder for the ramdisk. lets call it "ramdisk" for the sake of this tutorial.

2. in the terminal, type "exit". it's a good idea now to get out of root access or we'll run into trouble later by having different access priorities as we switch between the GUI Home folder explorer and the Terminal based command line.

3. still in terminal, get into the ramdisk folder.

(hint: cd /home/(your username)/ramdisk)

4. copy Blagus's ramdisk into the ramdisk folder. you can rename it to ramdisk.cpio.gz or leave it as is.

5. let's upack the ramdisk by: gunzip -c ramdiskfilename | cpio -i

6. :D YAY!. now you can edit the ramdisk as you like it. I'll not go into this since it would take another tutorial in itself. :p

7. once you're done messing around with it:rolleyes:. remove all the other stuff from the directory that you don't need, like the original ramdisk file.

re-pack the ramdisk with: find . | cpio -o -H newc | gzip > ../ramdisk.cpio.gz

you'll find the packed ramdisk.cpio.gz file in /Home.

8. rename this as ramdisk again and use as your ramdisk along with the kernel image you've compiled and make a kernel.sin as explained earlier in the tutorial.

:D:D:D

We've now come full circle. Thank you for your time. i'll post more as i discover more and update the tutorial as i learn more.

Better yet, it would be great if you guys post something that would benefit all of us.

Additional Stuff that's good to know/have:

Well, that covers the basics of the kernel. but there's a few more things you might need. you know just in case.

Update your JAVA: you need these if your compiling for Froyo or later.

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

sudo apt-get update

sudo apt-get install sun-java6-jdk

If your planning to build android rom, you'll need these:

(As noted by Dioxanh: for froyo and below, use a 32 bit system and a 64 bit system for gingerbread and above.)

32-bit linux installations:

sudo apt-get install git-core gnupg flex bison gperf build-essential \

zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \

libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \

libxml2-utils

64-bit linux installation:

sudo apt-get install git-core gnupg flex bison gperf build-essential \

zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \

x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \

libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \

libxml2-utils