You compile a kernel on a PS3 like you would any other kernel. See this guide:
http://www.suseforums.net/index.php?showtopic=46836
Just change any reference to x86 to PPC and you should be set. You may need to Google hardware information, though.
~~ Andrew D.