[XPERIA X8 General] B.Jay:
Okay, since eagleeyetom decided to make his research about how to build CM7 public, here are a few thoughts of my own to accompany his guide...

If you're a Windows user and don't want to go through the hassle of dual-booting Linux with Windows XP/Vista/7 it's highly recommended that you install VirtualBox as your virtualization software (also download and install the Extensions Pack if you want to connect to your phone through USB right out of the VM!). Stay clear from VMware Player or VMware Workstation. Things like 3D acceleration will not work with VMware! A important aspect if you're opting to install a Gnome3/GTK3 based distribution release, or you simply want the eye-candy to make work more fun.

This means ... the specs of your system should be above "average". Since the Virtual Machine, into which you're going to install Linux, will need some RAM for its own don't even think about this approach if your system is at, or well below, 3GB RAM. Especially with Windows Vista or Windows 7 being your OS upon which VirtualBox will run you will find yourself in the situation very quickly that Windows sucks up a good Gigabyte of RAM just for itself - and keep in mind that VirtualBox will need a wee bit more than just the 1.5GB RAM (or whatever you're going to assign) + 8MB VRAM to run.

Of course you also need some spare space on your hard drive(s) as you need to create a Virtual Hard Drive for the Virtual Machine. 80GB should be considered the minimum here as you're going to need quite some space for the source, the temp files that get created during the compile, and the finalized ROM.

I'd recommend you partition your virtual hard drive this way...

~1GB ext4 as /boot

2* the amount of RAM you assigned to your VM as swap (3GB swap if your VM runs on 1.5GB RAM)

The rest ext4 as /

Stay away from btrfs as it will give terrible performance in a VM.

A better partitioning would be to keep / and /home separated in case you plan to upgrade the Linux installation in your VM...

~1GB ext4 as /boot

2* the amount of RAM you assigned to your VM as swap (3GB swap if your VM runs on 1.5GB RAM)

~10-15GB ext4 as /

The rest ext4 as /home

That way you won't lose your stuff in /home in case things go wrong at an dist-upgrade.

Once you got Linux Installed install the Guest Additions ... it'll make working with your Virtual Machine and switching back and forth between the host OS and your VM way easier. In case the build of the kernel modules bombs out with a error message open a terminal and issue "sudo apt-get install build-essentials" ... that should solve the problem.

While you should get by with 1.5GB RAM to build CM7 (aka "Gingerbread") Google specifies the use of a 64-Bit Linux Distribution and at least 8GB RAM to tinker around with Ice Cream Sandwich. If you want to play around with the CM9 sources once they become available to the masses you better keep the aforementioned system requirements in mind.

If you happen to have questions about setting up VirtualBox feel free to post.

Value added Links:

Linux Mint 10 (as used by eagleeyetom)

Download here

Linux Mint 12 (latest version at the time of writing)

Download here

Ubuntu Linux 10.04 LTS or 11.10

Download here