R C-R wrote:
The file "mach_kernel" in the root directory is the one containing the core of the kernel. Its name is derived from the Mach microkernel, which in reality is only a part of the OSX kernel (XNU).
Can I assume you know the derivation of XNU & how that applies here?
It depends on what you mean with "derivation". If for derivation of it you mean "XNU = X is Not Unix", yes I know about it. But that's just an acronym. X may not be Unix (what's X anyhow? X window like X11?), but XNU (or better Darwin) is.
One of the major problems on discussing about OSX is that it has far too many definitions:
- It's based on the microkernel Mach
- The kernel is not actually a microkernel because it's Mach with FreeBSD (and OpenBSD like NextStep?) extensions. That would make it an hybrid kernel
- It's kernel it's called XNU
- OSX is commercial name for the OS but the real (Unix) name is Darwin
- Or maybe OSX is Darwin + Finder + Aqua + Cocoa + whatever.
In other words OSX is built taking pieces from here and there, making the whole identification pretty confusing. Still, that's irrelevant in this discussion.
What's relevant is that no matter the OS or the kernel the process of bootstrapping (i.e loading the kernel and transfer the execution to it) is similar in any architecture. Thus, the answer to your question:
"so, all kernels are the same??" is
"no, but they all bootstrap in more or less the same way".
Which is the main reason why PCs with BIOS (32bits) can effectively load (and run) OSX (with k64) even if they are not designed for it.
For future reference you may check:
http://en.wikipedia.org/wiki/Booting#Boot_loader
Don't worry. Wikipedia is very good when regarding technical subjects. As you said there is no the need to rediscover the wheel every time.