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).

What does eclipse have to do with compiling linux? You need a toolchain, not an ide.
–
vh4x0rMar 7 '13 at 15:05

1

You need a Linux-style environment to build the kernel (I very much doubt anybody has built it on anything but Linux, for a long, long time now, so trying to build on MacOS could be an interesting experience...).
–
vonbrandMar 7 '13 at 20:50

2 Answers
2

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 start­ing a new embed­ded project with ARM7 proces­sor in March so I wanted to play around with the GNU ARM tool­chain. Basi­cally I’m inter­ested in doing cross devel­op­ment on my Mac­book Pro on Mac OS X, using a GCC cross com­piler together with Eclipse CDT. We’ll see if that works out. ;-)

So as a first step, here is how I built a GNU ARM tool­chain on Mac OS X (this should be no dif­fer­ent than build­ing the tool­chain on Linux):

First down­load and unpack the nec­es­sary pack­ages: binu­tils, gcc, newlib and gdb.

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.

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/).

This is false -- the Linux kernel can be cross-compiled on many other systems. As long as you use a cross-compiler toolchain and have the right headers, it should be fine. I know for a fact it built on OSX, because I did it before in a particularly desperate situation.
–
Chris DownAug 28 '13 at 13:35

1

Also this comment about "case-sensitive" filesystem makes no sense.
–
vfbsilvaSep 2 '13 at 18:28

@DevynCollierJohnson also the instructions for building the kernel do not differ when using a compiler or a cross compiler, the toolchains behave equally. I.e. if this is gcc same flags will apply (usually this is the case). Notice this has already been long poitend out by vh4x0r.
–
vfbsilvaSep 3 '13 at 13:51