OpenCore

I spent the last couple of weeks fiddling around with OpenCore, and overall I’m pretty pleased.

This all started because I found this old, disused Dell XPS PC at work and then decided to see if I could get MacOS to load on it… Because why not?

It took a few days to figure out the ins and outs of OpenCore; it’s kind of complicated being as it can add / remove / modify / fake everything from the CPU and chipset to every peripheral on the motherboard in order to fool an operating system into thinking it’s running on some other kind of hardware.

But, once I had it figured out is was a pretty simple matter of building custom SSDTs (Secondary System Description Tables) from the DSDT (Differentiated System Description Table) residing in the motherboards ACPI (Advanced Configuration and Power Interface)… Which is about as complex as it sounds. But luckily I’ve been dinking with computer hardware since, well, the personal computer came to be – and nothing has really changed since the 80’s save that it’s all smaller and faster.

Oh, and they keep inventing new words for old things, so there’s always the day or two of syntax update I need to do to figure out what the new lingo is…

Following the manufacture of custom hardware descriptors it was a rather simple task to acquire linux kernel extensions and drivers for a few components from GitHub, and then modifying those sources to suit my macOS / Mach kernel needs so I could inject them into the OS at runtime…

It looks easy on paper, but my desk is covered in uEFI tables, IO translation information, address space assumptions, and reams of notes on the thousands of parameters that that glue it all together at boot.

But I should probably skip all of the boring deep-nerd stuff because this is more of a journal than an technical blog…

I got macOS to boot on the XPS Wednesday morning on an older version of OpenCore and macOS Mojave – because Mojave was the last “easy” OS to modify and runs both 32bit and 64 bit code. Everything after Mojave is “hard mode” due to various bits of Apple security, obfuscation, and proprietary hardware – but by Thursday afternoon I had finished my fully customized boot-loader for macOS Monterey on the 0.9.5 build of OpenCore.

Core i7-8700 on a Z370 motherboard and using my old RX 580 videocard.

I figure my boot loader will also run Ventura (macOS 13) being as there isn’t a lot of change under the hood; it’s mostly application space and UI – but I kinda dislike Ventura. Apple is slowly turning everyone’s desktop/laptop into an iPhone, and that irks me.

Anyway, with this mischief managed I decided to keep the XPS and take it home with me just to see what it could do in the longer term. And upon getting the XPS home I swapped the RX580 with the RX6600XT I had in the MacPro 5,1 – which quickly sent me back to the old days of computing…

See, back in the 80’s computers came with IO diagrams, pinout descriptions, and often complete schematics – because if you wanted to add something to the computer you were expected to figure it out. There were no standards really because we were still inventing everything everyone takes for granted these days.

And then the 90’s rolled around and while we finally standardized on a peripheral bus, PCI, you were still more often than not left on your own to configure the card for your system via IRQ jumpers and then compile (or write from whole cloth) your own drivers.

Back in the present day, when I swapped out the video card nothing worked – because while the 6600 is a PCIe card from AMD, just like the 580, it’s a different chipset with different frame-buffer needs which means different configuration requirements and a different driver…

Apple natively supports the 6600, but not on this hardware – so I needed a couple of hours to get the two talking to each other…

The above “About This Mac” claims the machine is a 2019 iMac because I’m faking the SMBIOS information from an iMac19,1. This is because the 2019 iMac used the same Intel “coffee lake” CPU and Intel 300-series north/south chipset as the XPS, so any macOS version that supports that iMac includes the drivers for this hardware.

The reason for this is pretty basic: Apple is a hardware company that also makes an OS, so the OS only contains drivers and config data for their hardware and makes it possible for Apple to support just that hardware really well, so things “just work”… This is the opposite of Microsoft, who is a software company and wants to support as much hardware as possible – so Windows tends to support anything that computes in some basic, generalized fashion. Which is why you really need to install manufacturer’s drivers instead of the generic Windows drivers whenever possible.

Anyway, faking this SMBIOS information also meant I needed to forge a system serial number, which involves forging a matching board serial and SmUUID. Luckily someone wrote a tool that can generate this data pretty easily, so it was a pretty simple issue in the scope of things.

And with that I have a working “hackintosh”.

There are a few more things I need to update in the XPS for daily use… The first was the SSD.

The XPS had a 500 gig Western Digital “blue” m.2 SSD stuck into it from the previous IT guy, and I used that for all of my testing and configuration… The problem is the WD Blue is an old 6gig SATA interface on an m.2 bus, and is therefore cheap and slow.

So slow that when macOS’ “Spotlight” kicked off to index the drive (and all of my email), the system basically became unresponsive.

I initially thought the SMC faking I was doing was preventing macOS from controlling the Dell system fans, and due to this everything was throttling – and I went down that rabbit hole for a few hours before figuring out that the culprit was that $20 SSD.

One quick trip to Microcenter later to get a 2tb WD “black” NVME drive (on sale for $150!) and a couple of hours of building a new installer with my EFI changes so that I could swap the drive and get to a restore partition to restore from TimeMachine. The machine is back up and running well on the new drive.

The WD “black” was kinda essential because Apple only natively supports like two third-party SSD controllers, and one of them happens to be Western Digital’s 750-series. So while I could put a Samsung SSD in the machine, I’d be modifying yet more drivers to make it work correctly…

The next update for the XPS will be an i9-9900KF CPU (K for unlocked, F meaning it has no iGPU) – the fastest thing that the 300-series chipset will run. One of these was a mere $250 from Amazon and will be here in a week.

And because I’m moving the XPS to a newer, faster – and hotter – CPU, a heatsink upgrade was in order… The problem is the XPS is a really nice looking machine from the outside, but it’s a mess inside. The power supply sits over the processor on this swing-out arm (see first picture), so the heatsink options are really limited as they need to be low-profile to fit under the PSU. And the case has has one fan; a 92mm in the top that sits over the CPU and tries valiantly to exhaust all of the heat – and mostly works okay until you really push the machine.

The fix for this came by way of figuring out the XPS is the same chassis as the Alienware Aurora r-series or the Precision 3600-series workstation wrapped in different plastic. So I can swap out the basic aluminum puck CPU cooler with the Precision’s blower style rig that works much better:

Precision 3600-series CPU cooling

And I can also add the 120mm top and front fans out of the Alienware to the XPS.

Aurora r-series case fans

So $100 later and I have all three fans coming in Wednesday.

The last update is the aforementioned power supply. The XPS, being a ‘business desktop’ has a paltry 460watt PSU in it. This is enough to run the 65watt CPU and the 6600 video card, but just barely. The i9 is a 95watt unit, and I want some PSU overhead, so I bought a Corsair RM850x for $150.

There’s one more thing I’ll be doing, and that’s adding this old Gigabyte Aorus wifi/bluetooth card to the system.

The onboard wifi/bluetooth the XPS came with is totally incompatible with macOS, so I removed the tiny card that was in there in order to replace it with something better… That something better is the Aorus card, which is based on an Intel AX210 chipset and something I can get working via some massaged linux drivers.

The problem is most PCIe wifi/bluetooth cards require a USB connection to make the bluetooth work, and the XPS has no internal USB headers for Dell reasons… So one more trip to Amazon for a USB-A to male USB Dupont header to fix this oversight…

Said cable will also be here Wednesday, and I’ll get the wifi and bluetooth working as well.

And that’s what I’ve been up to over the last week or two in my spare time…

The hackintosh is working well enough that I’m typing this entry on it right now, and later I’ll attempt to get Baldur’s Gate III to run on it. 🙂

Listening to "Fly for Your Life" by GUNSHIP