Hacker News new | ask | show | jobs
by userbinator 2051 days ago
The fact that he even got that far with emulating what is essentially completely undocumented hardware is a very good sign, adding the rest of the hardware to QEMU might not be as hard as initially thought.

This approach will help with none of these

Don't underestimate the community -- a lot of Hackintosh (and emulation) stuff is done for the "just because I can" reasons, and getting a fully emulated ARM Mac working enough for any sort of actual use would be a huge win even if it's slower than their hardware and not 100% complete (just like Hackintoshes usually are.)

5 comments

I created a mac in a vm and then I used system migration tool to sort of upload my old macbook pro's consciousness into the cloud.

https://youtu.be/86XqF5dqjYc

pretty cool

I've been thinking about resurrecting my machines with older versions of osx - I'll have to figure out how to boot say 10.11 or 10.12

FYI The person who created that video I believe followed this other person's website devoted to all the details of getting it to work:

https://www.nicksherlock.com/2020/04/installing-macos-catali...

one cool thing is - once you have it installed, you can clone it freely and even remote log into several at once.

I believe they even figured out how to run them on those 32-core or 64-core amd threadrippers.

I love the wording and the concept, thank you for the chuckle
I still do it when I want to test things quickly even though I have a mac mini in the same room.
It might not be fast or pretty but I agree there will be emulation. Anyone remember PearPC?
I remember running (I think) Jaguar on PearPC; mind you, Leopard was probably out by that point, I just had old disks handed down to me and no actual Macintosh. It was a lot of fun digging into the OS like that, especially at a young age, but definitely slow considering it’s emulating another instruction set.

Not long after I got a relatively successful hackintosh going (read: accelerated graphics and working audio), which, besides Linux, helped brew my respect for Unix, BSD, and unique macOS internals.

Altogether it lead me to purchase roughly 5 Macs over the years. I recently got back into it for fun, and the scene is thriving. Will be interesting to see what happens post-AS.

Doing things for the heck of it is, for some reason, a great motivator and educator.

Not surprised given their attempt to run AIX on QEMU as well. That's slightly more documented but still a pain to do - as it requires specific versions of AIX(7.2 TL3 SP1/7.1 TL5 SP5).
I'd really like to see someone run IBM i (formerly known as OS/400) on QEMU. Has anyone tried?
Even the PowerPC version of OS/400 uses custom instructions pretty heavily. It's a tagged memory architecture with another hidden 65th bit. I don't think QEMU has support for that, and it'd be extremely slow to emulate.
I don't believe QEMU emulates tagged memory on POWER, but it does emulate tagged memory on ARM (MTE), so there is no reason why it couldn't be added.

PowerPC AS only requires 1 tag bit for every 16 bytes. (1 tag bit for every 128 data bits, 1 tag byte for every 128 data bytes, etc.) That's 8MB of tags for every 1GB of memory. So the overhead isn't massive [1].

Do recent IBM i versions still rely on hardware enforcement of tagged memory?

[1] https://www.devever.net/~hl/ppcas

IBM i tends to be picky about disks, as well. At least as of a couple years ago, the only way to use local disks with standard 512-byte or 4096-byte sector sizes was through VIOS or similar* storage virtualization mechanisms, so unless QEMU supports 520- or (4096+mumble)-byte virtual SAS disks, you also need to emulate enough of the IBM POWER hypervisor architecture to support running VIOS (IBM's AIX-derived virtual I/O appliance) concurrently in a separate logical partition within the same QEMU VM.

Even if QEMU does support odd-sized virtual sectors, given the integral support for logical partitioning included within modern IBM i releases, various system management and RAS features, etc., I'd be entirely unsurprised to learn that significant firmware support isn't also required to boot the OS at all, regardless of I/O device support.

In which case, you'd either need to reimplement a significant bit of IBM firmware functionality from scratch, or else you'd need to emulate POWER system hardware convincingly enough to fool (possibly hacked) authentic IBM firmware.

Finally, given that AFAIK IBM has never sold unbundled licenses for IBM i (or OS/400), the only potentially legal way to do any of this would be to run QEMU a POWER system already licensed to run IBM i (no technical problem, as all recent POWER systems have excellent Linux support).

*Where, by "similar", I'm thinking of virtual disks used by virtual instances running within an existing IBM i instance, which wouldn't be helpful here.

Oh wow. Imagine a Hackintosh Raspberry Pi! Now that would be a cheap way to run macOS!
I know you said this sarcastically. The custom GPU is going to be a huge roadblock to get anything graphical to render. Probably never going to happen.

Add: actually never say never. Consoles with custom GPUs have been very successfully emulated. So maybe someday.

You don't have to emulate the hardware directly. Since apples kernel is opensource, there's a good chance one could write a kernel driver for another GPU offering a sufficiently compatible interface. Nearly all GPU code will have software rendering fallbacks too, so the driver might just be enough to trigger those fallbacks.
Has anyone ever successfully written a custom GPU driver for macOS? Perhaps there would be more incentive to do so now, but... seems like a pretty massive undertaking.

You could of course use the software renderer—I'd guess that probably still exists on Apple Silicon Macs for safe mode and such—but it wouldn't be pleasant...

Edit: Well, anyone besides nVidia, I suppose. But they're a big company, not a Hackintosh side project.

At least with the previous versions of macOS you didn't have to do anything special, the software renderer would just work if you don't have a supported GPU.
And that doesn't change in Big Sur.
I run MacOS as cheapest as possible....inside a Vmware machine :)
I suggested the same thing the other day and got downvoted...
> The fact that he even got that far with emulating what is essentially completely undocumented hardware is a very good sign, adding the rest of the hardware to QEMU might not be as hard as initially thought.

I'm less convinced—it sounds like he was largely reusing the setup that can semi-boot iOS (which is of course also totally undocumented, but has had many years to be studied.)

It's still a cool accomplishment, I just don't think it necessarily portends great things.