So long as you have the kernel source (in which companies like HTC release the kernel source code for most of their Android smartphones), you can compile you own Android kernel (as it is linux-based) and play with it.
Last night I had the pleasure of compiling my very first Android kernel. It wasn’t awfully hard as it took me about 20 minutes to compile my first Android kernel.
Of course, the best OS to compile an Android kernel is on linux, I used Ubuntu but you can also use Ubuntu running on top of VirtualBox if you want, there’s no problem with that as Android kernel compilation isn’t all that power-hungry or anything.
I’ve actually written a detailed step-by-step instructions on how to compile Android kernel for an HTC Evo 4G but it should be nearly identical for all other Android systems except change in the directory names.
If you want to start learning how easy it is to compile your own Android kernel, head over to my HTCEvoHacks blog!