Posts Tagged ‘microsoft’

Hackintosh – it’s alive!

Monday, March 8th, 2010

My Core i7 950-based Hackintosh is alive.  I’m using a Gigabyte GA-X58A-UD5 motherboard, a D-Link DWA-556 wireless card, and an nvidia GTX 260 video card.  To install, I used Empire EFI 1.85 r2 to bootstrap the retail 10.6 DVD, which I own.  I had to provide the “GraphicsEnabler=Y PciRoot=1” options to the Empire EFI loader to successfully boot the DVD.  Once installed, I used the Chameleon 2.0 rc4 boot loader from a USB stick (Chameleon cannot boot DVDs directly, or else I’d have tried that first) to boot my machine.  As to be expected, there were several caveats along the way.

First, I had to patch my dsdt (basically, BIOS-level device description table) to be compatible with Chameleon and other EFI-translation layers to provide EFI services to Mac OS.  I followed the general guidelines for similar Gigabyte boards here.  I used the intel “iasl” compiler with Ubuntu 9.10 on my machine to retrieve the BIOS’s regular dsdt, decompile it, edit, and recompile.  With my edited dsdt, I have native power-management functionality (rather than using a null driver that effectively makes your CPU run at maximum power-consumption levels all the time).  I also have many of my motherboard’s devices working, including Ethernet, USB, and obviously SATA.  Shutdown works with just my patched dsdt, but rebooting does not.  For that, i had to install a snow-leopard compatible version of the OpenHaltRestart driver.  For sound, I used the open-source voodoohda driver, which works just fine.  My graphics “just work” with the GraphicsEnabler=Y option, though switching resolutions in games does not seem to function as desired.  That said, I don’t really care, because I only ever use my display at native resolution.  My wireless card is identified as an Airport Extreme, as I was very careful to get one with the exact same Atheros chipset as those used in Macintosh hardware.  I use the fakesmc 2.5 driver to enable some platform devices necessary for booting MacOS, but other than the OpenHaltRestart and voodoohda drivers, everything else is vanilla, stock MacOS with no other modifications.  I updated to 10.6.2 without issue.

I did note, however, that Chameleon seems to default to attempting to boot the 64-bit version of the MacOS kernel on my hardware, which is nonsensical.  I had to force the 32-bit kernel in order to make my wireless card work, as Apple does not provide a 64-bit version of the driver.  I do not understand the fascination with the 64-bit kernel within the hackintosh community.  You’ll find lots of people bitching about a lack of a 64-bit driver for this, that, or the other.  As people who are actively modifying OS-level software — especially the MacOS kernel — the people writing the software, at least, should know that the 64-bit kernel buys you very little in terms of functionality on MacOS.  MacOS can address more than 4 GB of RAM using the 32-bit kernel via PAE.  Further, MacOS seamlessly supports 64-bit applications (as well as 32-bit applications) with large-RAM support on its 32-bit kernel.  No benchmark data shows any advantage on MacOS with a 64-bit kernel compared to a 32-bit kernel.  (Yes, there is overhead switching between modes of execution, so syscall-heavy code can suffer, which is why Xserves default to having the 64-bit kernel on. However, my desktop — even with heavy graphics-card use — does not show this to be an issue).  Attempting to default to the 32-bit kernel only reduces compatibility with drivers, for no actual normal-use benefit.

I’m using the F4 version of the BIOS for my motherboard, which is the newest.  I did have quite the scare with updating my BIOS, however.  I flashed it from a USB stick that I’d installed FreeDOS on.  The flash appeared to be successful, according to the program’s results, but upon reboot my motherboard appeared totally dead.  It wouldn’t give me anything on screen, it wouldn’t provide any beeps, and just seemed utterly dead.  The on-board boot status code LED indicated that it was constantly resetting itself, going back and forth between reset and initial memory tests.  I reseated my add-in cards, reseated my RAM, and still, the same result.  Finally I reset the BIOS variables (“CMOS” — an outdated misnomer if there ever was one), and thankfully it worked.  I was not looking forward to the prospect of returning a motherboard to newegg, but thankfully, it didn’t come to that.

Also, I’m glad I decided to go with the 950 rather than the 920 processor.  Apparently newegg got burned with a batch of counterfeit 920 processors last week, which is when mine would have arrived.

On the Windows front, I installed 64-bit Windows 7 (which I bought on sale at launch, knowing I’d need a copy anyway eventually) later, which went smoothly.  I disabled the annoying aspects of the hideously unusable menu-bar, basically making the menu function like Windows Vista (which I actually like).  It does have some minor improvements versus Windows Vista, particularly with simplified network configuration.  That said, it’s really just Windows Vista and an annoying menu bar.  Yes, the compatibility-mode feature (running Windows XP sp3 in a VM for a program) is a nice new addition, but for most users, this is not a big deal.  Most programs have been updated to run with Vista, and so Windows 7 benefits from the perception that “everything runs better”.  Actually, everything runs the same as it did with Windows Vista, now that developers (both 3rd-party and Microsoft) have finally updated most everything to stop doing nasty things like scribble on global, machine-wide registry variables.  Regarding multibooting, I used 2 separate drives for MacOS and for Windows.  Windows still cannot boot a gpt-partitioned drive, and I wanted to use native gpt partitioning for MacOS.  During Windows installation, I disconnected my MacOS drive (which I have since installed the Chameleon bootloader on to, obviating the need for a USB stick on each boot) to avoid Windows writing into the MBR of my MacOS drive.  After successfully installing, I reconnected my drive, and Chameleon can correctly select and boot Windows 7 just fine (though you do have to select the “System Reserved” partition to boot, which contains the Windows 7 boot loader).  I still need to install FreeBSD on this beast, but overall, I’m quite happy with the machine and with the software results.

Windows 7 hype annoys me

Monday, October 12th, 2009

Windows 7’s launch is impending, and the review sites are frothing with praise (specifically, ZDNet).  You can’t swing a dead cat without hitting someone in technology talking about how awesome Windows 7 is, how it totally rights Microsoft’s ship after Vista.  I’ve run the RC version of Windows 7, and I gotta say, I don’t see the big deal — at all.  The interface is nothing short of irritating.  It looks like what the gnome folks would come up with if you asked them to copy KDE.  It’s seriously that bad.  The knock-off version of the dock/taskbar?  Lame.  Could they waste more space around taskbar icons, by the way?  It probably wouldn’t be as annoying if it wasn’t so goddamn huge, but it is.  But, that’s cosmetic.  What about the nuts and bolts?

Here’s the deal:  Windows 7 is Windows Vista plus 3 years and a shittier interface.  That’s it.  The driver model:  the same.  The security model:  the same.  64-bit compatibility requirements for software vendors?  (You can’t ship a program with a Windows 7 compatibility logo claim unless it works under both versions):  Check, same as Vista.  Graphical whiz-bang enhancements?  Same.  UAC?  Same.  Windows 7 is better about not having so many different versions (Vista Home Basic/Home Premium/Business/Ultimate/Enterprise?  Really?), but that’s not something I care about that much.  (Windows 7 Professional will do the trick for me — I can log on to my work domain if I need, and it has Windows Media Center).  The notable differences seem to be that they added “XP compatibility mode” (running your Windows XP-compatible programs in an XP Virtual Machine — only available on some versions of Windows 7), Digital Cable Tuners (cablecard-capable tuners) will no longer require OEM certification (ie, they will work on homebrew computers), and allegedly managing networks is more intuitive than Vista’s god-awful Network and Sharing Center.  Oh, and they fuglified the desktop interface.

Ok, so these are nontrivial differences.   But, they aren’t the focus of the hype, previews, and reviews of Windows 7.  Instead, the coverage mostly talks about how much more “streamlined” Windows 7 is, and how it won’t have the pitfalls of Vista.  Why?  Because drivers and applications have caught up to the new API requirements of Windows Vista, and these are the same requirements for Windows 7.  Applications can no longer write willy-nilly into the registry, and drivers have to comply with a newer version of Microsoft’s driver API (ie, the revision introduced for Vista).  In other words, the benefits that reviewers believe are the primary benefits of Windows 7 are available today in Windows Vista, for no other reason than applications & drivers are now compatible.

I actually like Windows Vista.  I’ve seen the compatibility problems that people complain about, but I knew that those were the hallmarks of poorly written applications.  Also, most applications seemed to be updated within 6 months of Vista’s launch.  I use Vista Enterprise at work every day, and things generally work fine.  (At home, wifi mysteriously craps out.  There are other general Windows annoyances.  As far as I can tell, none of that is dealt with in Windows 7).

Microsoft got destroyed in the press and in (followup) online reviews because people were used to their poorly written applications from Windows Version X working in Windows Version X + 1.  Vista changed all of that, and for the better.  The security measures implemented in Vista were badly needed, and they did break quite a few drivers and applications.  Users seem to have all decided this was Microsoft’s fault.  In a way, it was, but not because “Vista sucks”.  It was Microsoft’s fault because they rolled out bad solutions beforehand and reaped the rewards when they had to fix it.  Yeah yeah, Vista performance was slightly worse than XP — it ran like crap on old hardware.  That’s all true.  But that’s always been true for Windows upgrades.  (Good luck installing Windows XP on Windows 98-class hardware).  Windows 7 will likely be successful because it isn’t a major deviation from the prior version of Windows that every major vendor has been writing to.  This is exactly why all the “best version of Windows ever!” hype regarding Windows 7 is so frustrating, but I suppose I should expect it to continue.

Microsoft and the GPL

Thursday, July 23rd, 2009

Microsoft recently released several paravirtualization drivers under the GPL (version 2).  People are making way too big of a deal about this.  (I suppose that’s to be expected from “Linux Magazine”).  There are two primary reasons that Microsoft chose the GPL:  maintenance of their own code, and proliferation.  This is not an attack on Linux.  This is not a trick on the GPL.  This is not Microsoft experimenting with Linux.  This is not a patch to the Linux kernel.  (“Linux Magazine”, indeed).  Modules are not the kernel proper, people!  My nVidia driver is no more “a kernel patch” than are Microsoft’s paravirt drivers.  The difference is that Microsoft’s drivers will ship with the overall kernel tree and get built with it, but so do drivers for arcane capture cards from 1994.

This is a practical move given the realities of how Linux is structured and distributed, and it’s comical (if not annoying) to see people who are supposedly Linux advocates completely misunderstand and mischaracterize what’s going on.  Look, the way the Linux kernel is structured, almost all useful APIs are exported ONLY to GPL-declared code.  That means if Microsoft was to declare its module as any other license, it could not use a ton of high-level APIs, including basic stuff like, say, the entire devfs API or any of the IOMMU APIs. There are numerous other examples.  This means that Microsoft would be forced to implement their own versions of these APIs, based on low-level constructs in the kernel that are subject to frequent change.  This is a maintenance nightmare, and Microsoft would have to be insane to pursue this strategy.

The other major reason to use the GPL for their drivers is that, without it, Microsoft’s drivers won’t ship with the base Linux kernel + drivers distribution.  Microsoft wants to get these drivers out to as many people as possible so that Hyper-V’s paravirtualized features “just work” with as many Linux installations as possible.  This move by them increases those odds, so it’s a smart business decision.  It’s no different than Intel wanting their drivers to ship with the kernel.

I understand that Linux enthusiasts are (justifiably) leery of Microsoft, but making up crazy theories does not exactly make you look like a rational, reasoned critic.  Rather, it makes it easier for Microsoft to publicly discount any and all claims that the Linux community may ever have regarding Microsoft’s tactics, because they can point to previous nutty behavior.  Acting “shocked” that Microsoft would pursue its business interests is the juvenile equivalent of rolling one’s eyes.  And, claiming (even in jest) that this is a first step to Microsoft using a Linux kernel inside a Microsoft product does, indeed, count as nutty.  I’m reading this crap all over the Internet — it’s not funny, it’s not clever, and it makes OSS people look like idiots.