29 July 2010

Anatomy of HP Mini 311 EFI Boot Setup (OSx86 EFI Setup)

I should be doing a ton of things other than post on my blog today. I should be working for one, or two, I should be catching up with the readings for my MA class (I flunked our recent quiz). But instead of burying my nose in my photocopied and ring-bound book “La littérature française de l’entre-deux-guerres”, I found myself doing some cyber stalking over yonder Facebook.

That’s when I thought I’d write on my blog which I’ve decided is of a lesser evil between these two things I should not be doing right now.

So what could I talk about today that will merit your readership?

My HP Mini 311 is happily trodding on with its Snow Leopard + Windows 7 dual-boot and I haven't gotten round to updating the install guide. My MSI Wind feels rejuvinated now that I’ve updated its Mac OS X 10.5.6 Leopard + Windows XP Home Edition SP2 dualboot setup into Mac OS X 10.6.4 Snow Leopard + Windows 7 Professional, and yes I'm too lazy to write a guide (I sue myself for being a sloppy blogger). Then there’s my HP Mini 1001TU who’s currently disemboweled (for the nth time) and I’ve yet to decide what to do with it other than put it up on e-bay. I can't talk about it either unless I wanna bore people with my frustrations on getting its DSDT.aml fixed for Mac OS X 1.6.4 Snow Leopard.

It's now one of those lull periods, I've to admit. But I've decided to take this time to share some info about OSx86/Hackintosh. So without further ado, I present you:

Anatomy of HP Mini 311 EFI Boot Setup
1. Boot - which we know in the form of Chameleon. Chameleon is an open-source bootloader which originates from the boot-132 project by David Elliott and this in turn, came from none other than Apple itself for the Darwin Project. In essence, it enables BIOS based PC systems to interact with the Mac OS X kernel, mach_kernel.
What we're using right now is the version created by meklort. It patches the mach_kernel on the fly during boot up so that the Atom processor passes off as an Intel Core Solo. Remember that 10.6.2 and up causes a reboot loop because the mach_kernel version is incompatible with the Atom. But with this auto-patching Chameleon, it means we no longer need to have modifications directly made to the mach_kernel (ex. tea's mach_kernel)

2. Extra folder - contains the ff. stuff:
  1. com.apple.Boot.plist - contains boot parameters for Chameleon; where to find mach_kernel; kernel flags (-v, -x, debugmode, etc.); quiet boot or not; show grey apple logo (what we call legacy boot logo). You can also specify which theme to use for Chameleon (more on this later). The goal is that you no longer have to manually specify these parameters each and every time you boot up. 
  2. dsdt.aml - Differentiated System Description Table. In my noob and less graceful explanation, it's that stuff that translate your Mini 311's otherwise obscure hardware in Mac OS X acceptable parlance. If configured correctly, it can help you shave off some kexts to make hardware work - ex. Ion graphics chpset recognized as NVidia 9400M on the 311. For a more technical and worthwhile explanation, click here.
  3. "Extensions" folder - where your kexts are located and are loaded as Chameleon boots up Mac OS X on your 311. I've written some about kexts in a previous post.
  4. Extensions.mkext - aka "kextcache" and by that alone, it's easy to see that it's a cache, a storage, for kexts. This makes kexts easier and faster to load. There are many ways to create this kextcache and those variations may or may not potentially affect sleep function as in the specific case of the HP Mini 311 but, again, that's for another time's discussion.
  5. smbios.plist - contains parameters to identify your hackintosh as one of the Mac's models. The HP Mini 311 is defaulted, at least when you install following the HP Mini 311 Darwin Project release, as a MacBookPro5,1 (why an MBP5.1? that we'll talk about in another post). If you wanna edit the serial no, RAM details, this is the place to do those.
  6. Themes folder - as per #1 com.apple.Boot.plist, this contains the theme for Chameleon. Themes are packaged in folders. The one supplied by HF6RC4.pkg only has a Default theme - one from MowgliBook's Retail Pack 0.9. As you can notice, no theme parameter is specified in the stock com.apple.Boot.plist supplied by HF6RC4. What Chameleon does is automatically look for the Themes folder and load whatever's Default in there. Or if nothing is found, Chameleon loads the theme it's been compiled directly with.
3. Kexts (Kernel Extensions- are roughly the equivalent of "drivers" that we know for PC, on the Mac platform. These are what the HP Mini 311 currently uses:
  1. AppleACPIBatteryManager - as the name suggests, controls battery. The current version we're using is by no means perfect - reports only 2 hours battery light when some have reported it's longer than that. Without this kext, Mac OS X won't be able to detect the 311's battery.
  2. AppleACPIPS2Nub - works hand in hand with
  3. ApplePS2Controller - to enable the 311's keyboard and trackpad to work. Note though that this does not provide full support for the Alps GlidePoint trackpad of the 311 and that's why it's seen as a PS2 mouse by Mac OS X. The trackpad works fine just the same - well, that's "fine" by its own standards (ahem).
  4. CPUIDOverride - this together with
  5. CPUIDSymbols - enable the 311 to use the vanilla Apple kext for power management (sleep, speedstep, etc.) "AppleIntelCPUPowerManagement.kext" - with the proper DSDT fixes, i.e. HPET, of course. VoodooPowerMini, SleepEnabler, Disabler/NullCPUPowerManagement as all the functionalities covered by the kexts mentioned are taken care of by vanilla AppleIntelCPUPowerManagement.kext. Courtesy of meklort again.
  6. CPUInjector - makes the Intel Atom processor as an "Intel Core Solo" chip.
  7. fakesmc - emulates SMC device for real Macs. (And you wondered what "SMC Firmware update" is all about, huh ;-) ?). Netkas, the creator of this kext, provides a better explanation for what fakesmc does, click here. From how I see it, if before we had to use AppleDecrypt and DSMOS kexts, now we only need fakesmc. You can actually do some modifications to fakesmc to change that "SMC System version" you see in System Profiler but again, more on that later.
There. I hope you enjoyed reading this.

1 comment:

Ann said...

I havent any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.