I have a Mac running Snow Leopard and I know that I cannot compile the Linux kernel. I have used a Linux VM (virtualbox) to compile the kernel but I was wondering if I could compile it on Eclipse (galileo).
As long as you have all of the headers and proper tools, Linux kernels can be compiled on other systems. Using Eclipse would not work well (if at all). In a Linux command-line, type "make config". Configure the options for your kernel that is to be made. Then, read the README file that comes with the source code. It will provide information on compiling and installing. For deep information on the kernel, read this article series (http://www.linux.org/threads/%EF%BB%BFthe-linux-kernel-introduction.4203/).
The info saying you can't build the kernel in Mac is innacurate. One can set up a cross compiler and have x86 as target architecture or build a kernel for power pc as Yellowdog Linux Distro has done. A sample of a procedure to setup a cross compiler for ARM7:
I’m starting a new embedded project with ARM7 processor in March so I wanted to play around with the GNU ARM toolchain. Basically I’m interested in doing cross development on my Macbook Pro on Mac OS X, using a GCC cross compiler together with Eclipse CDT. We’ll see if that works out. ;-)
So as a first step, here is how I built a GNU ARM toolchain on Mac OS X (this should be no different than building the toolchain on Linux):
First download and unpack the necessary packages: binutils, gcc, newlib and gdb.
The installation directory should be /usr/local/crossgcc.
First we build the binutils:
Build the gcc compiler with C/C++ support:
Build the gdb debugger:
In your case tou need a cross compiler to whatever target architecture you wan't your kernel to be. Notice as compilation will run nativelly in your machine it will be faster than building on VirtualBox.