XNU Linux: Full OS X GUI Userspace on Linux

(github.com)

98 points | by mmastrac 2 hours ago

13 comments

  • pcwalton 46 minutes ago
    Makes me wonder if the next frontier is going to be something like “the OS is shipped encrypted with keys that only exist in hardware, and all the CPU knows how to do is to decrypt blocks and put them in the i-cache where it will not let you look at them”, to prevent you from doing anything with the OS executables other than running them on Apple chips.
    • drum55 41 minutes ago
      It sort of has precedence as DSMOS.kext, though not as severe as that. It loaded this blob into memory.

          Your karma check for today:
          There once was was a user that whined
          his existing OS was so blind,
          he'd do better to pirate
          an OS that ran great
          but found his hardware declined.
          Please don't steal Mac OS!
          Really, that's way uncool.
          (C) Apple Computer
      
      That existed on the intel platform days and did some very loose pairing with the SMC chip to prevent you running it on anything else without modification.
  • darksim905 23 minutes ago
    This is pretty cool that this could be done. the whole xnu.so drive file bit (I think?) ... could that same theory be applied to Windows? I know NTOSKRNL isn't quite the same, but could it be redesigned/recompiled/re-written to function and loaded as a module that way? I feel like on the newer Macs when I tried doing whatever the bootcamp functionality was, I learned quickly that didn't exist/was removed and I couldn't just boot/install Windows easily. With this AI tooling now, and functionality like this, could you bring that back on a Mac?

    (And yes, derp, I realize this is Mac OS X GUI on Linux)

  • bradfitz 27 minutes ago
    But can I run more than two macOS guest VMs at the same time? :)
  • boredatoms 13 minutes ago
    Oh I hope someone tries this on a dgx spark
    • valleyer 4 minutes ago
      This project loads the (lightly modified) actual macOS kernel into memory (as a sort of co-kernel with Linux), so it would almost certainly not work on any hardware the original kernel doesn't run on.
      • boredatoms 1 minute ago
        Isnt it using the device drivers from linux though?
  • zakisaad 55 minutes ago
    If you presented this to me 4-5 years ago (and the method by which it was likely built), I would have been speechless. The fact that these kinds of projects have been normalised is frankly insane.

    Nowadays with a skilled operator, there really are no bounds on what can be pulled off it seems.

    • pmkary 19 minutes ago
      I came to write the same comment. I used to think that the dominance of U.S. is mostly because no other country has the capacity to develop operating systems and the world depends on a few OSes that are entirely developed there. Linux was never winning, windows was shit, but OS X and iOS, they were at one side undeniably high quality, and on the other side impossible to copy. So I always thought "How can China win over US without an operating system". Apple had made it such that all Hackintoish efforts were blocked for some many years, and iOS was impossible to boot anywhere but inside of an Apple device.

      Fast forward to now, and I have an amazing app sitting on my computer called "Light Touch" that allows me to install and emulate any version of iOS on my computer, proxity its network, install whatever IPA app I wish on it, and I can't believe.

      And this one, I thought you must be joking. Imagine all the decades long efforts by GNU to clone Objective-C, Foundation, Cocoa... and they still can't even run NeXTSTEP software on GNUStep and GWorkspace. Then you wake up and see not one of teh libraries, not the bare XNU, but the whole fucking mac being running inside of Linux... I mean What the literal fuck.

      Mac had this god-like image in my head as something made by who knows how many tens of thousands of world's highest of highest engineers and designers. You could see that no app outside of the Apple entering its app store could have the quality of design and harmony that Apple's own apps had. (I mean imagine one app outside of Apple in the days of iOS 4 or Leopard to have that quality of icons for example), then Apple with Ive lowered the bar to entry and all the other apps cached up and most even got way better than Apple, but that was still a different era and a different game. But look at the past few years. Apple introduced Liquid Glass---which to me was a way to say "hey flat designers making cross-platfrom stuff in Figma, you no longer will be able, I want to introdue a UI component so complicated that you can't bring it to Android", but then a matter of days liquid glass was everywhere. Figma and Sketch easily added it to their components, Flutter had it, everyone had it... I made my own in an afternoon. The iPhone Duo animation was perhaps 50% of its selling point and by the night you could have it on samsung as well as on a Mac...

      This is insane, and it must be really a stupid thing to say, but to me Apple was something of the Da Vinci of my era. I could see all people trying to get to its quality and looks and everything but no one could, they always were ten times ahead of anyone and it was exciting to be sitting waiting to see what new thing they're going to show in the WWDC. Now that godness is being killed for me, and it is painful to watch.

  • jsomedon 1 hour ago
    so this means, I can run something like asahi linux on macbook but I can also access macos desktop environment semi-natively?
    • OsrsNeedsf2P 57 minutes ago
      In the pre-AI days, I was in Ubucon Korea and met a highschool student who had done exactly that, but it was with a custom MacOS GNOME theme instead
  • hn_submit 30 minutes ago
    Has anyone run XCode on this and built iOS apps with it? I just purchased a Macbook Air just so I could make iPhone apps, but with this distro I could've saved myself the $1500.
    • ddtaylor 22 minutes ago
      Next.js with Capacitor can ease some of that pain and then a cheap mac mini or rent in the cloud to publish.
    • bigfatkitten 22 minutes ago
      You would need Apple hardware to run this anyway.
      • notpushkin 0 minutes ago
        For now; I think with a few drivers it could be a viable way to run an Arm Hackintosh.
  • pmkary 12 minutes ago
    This is beyond irony and mind blowing, I'm literally shocked and speachless. But you know the funniest thing is that XNU itself is designed to emulate Open BSD on a Mach kernel :))) this is Incepetion taken too deeply...
  • johng 1 hour ago
    This is awesome.
  • jauntywundrkind 47 minutes ago
    also NextBSD is back! https://www.nextbsd.org/ https://hn.algolia.com/?q=nextbsd

    a freebsd built around mach, launchd, and xpc maybe still gcd. afaik not xnu though (i should look).

  • natas 1 hour ago
    I'm afraid that, unfortunately, Apple may not like this.
    • flomo 1 hour ago
      Sounds like it's based on open source code they released. Also they never went after any Hackintosh hobbyists, only resellers.
      • OberstKrueger 57 minutes ago
        The only Apple code it's referencing based on the README is xnu. The rest is community projects, and what it can pull from a live macOS install.
    • sneak 56 minutes ago
      Why not? Historically Apple has been pretty uninterested in anything people do with the Apple hardware they purchased, just so long as they buy Apple hardware.

      But separately, I don’t even think this breaks the EULA at a first pass. Maybe distributing patched AMFI files, but those can be changed to diffs one can self-apply if they aren’t already.

      • matthewfcarlson 41 minutes ago
        This project definitely requires an apple silicon host to work so that seems to align with previous Apple stances towards projects like this
  • probablyStimmed 1 hour ago
    Cool, but why?
    • asveikau 1 hour ago
      Cross platform development would be one of the best reasons I can think of. Build and test Mac or iOS software on a Linux host.

      But I think it breaks some Apple EULAs, so using it in a work capacity might get you in some trouble.

    • ekunazanu 1 hour ago
      Because it's cool
    • guax 30 minutes ago
      Because it is there
    • runtime_terror 1 hour ago
      Because, gasp, some people like the MacOS aesthetic
      • II2II 51 minutes ago
        If that's that reason, then buy a Mac.

        I can understand people wanting to do this sort of thing for the technical challenge, but macOS is commercial software and it is tied to Apple hardware. If you want something without those strings, there is a whole world of open source software. You don't get the aesthetic, but at least you get to use the software on the hardware of your choosing.

        EDIT: it looks like you need Apple hardware to use this anyhow.

        • dofm 26 minutes ago
          > it looks like you need Apple hardware to use this anyhow.

          Yeah — perhaps the benefit here is for Asahi users?

        • rvz 3 minutes ago
          Programmers won’t buy a Mac themselves and they want their employer to do it for them, as they will say Apple hardware is too expensive.

          So this is the latest episode in getting macOS on non-Apple and programmers will go to extreme lengths to avoid paying for anything.

          That is why hackintosh exists

        • bigyabai 38 minutes ago
          But macOS has several arbitrary limitations that Linux and Linux-compatible hardware doesn't. Apple has dug this grave for themselves by removing dGPU/eGPU support, refusing to implement Vulkan, and not signing CUDA drivers.

          As long as Apple makes boneheaded decisions like that, people will go to boneheaded lengths to work around it.

  • Nezk 1 hour ago
    Very cool, but I really wish it were OS X 10.9 instead of the hideous macOS 27 (for x86_64, of course, not ARM)
    • matthewfcarlson 39 minutes ago
      You’re just a few AI prompts away from exactly that if that’s what you wanted. This project requires a PAC system which currently is just apple silicon. X86_64 would open the doors to way more hardware