Apple Helps Asahi Linux

4 years ago (twitter.com)

Everyone is like how having Asahi makes Apple more profit, so it makes sense in a business sense, e.g... but am I the only person thinking that this is probably just one or two core kernel engineers just feeling good someday and decided to provide this to Asahi? I don't think the high-level people would really know that these changes even existed...

  • I agree that this is mostly a small number of engineers (with approval) being helpful. This has almost no bearing on Apple profit. The number of people who want to run Linux on an Apple Mac is very small compared to their other markets. The only tangible benefit to the company is that this may add a bit of goodwill and slightly reduce the volume of the vocal detractors.

    As others have pointed out, it may also help if they are moving to add back bootcamp support for Windows (on ARM).

    Apple has added better support for virtualization at the OS level in recent years and that handles the needs of most devs.

    • > I agree that this is mostly a small number of engineers (with approval) being helpful.

      The M1 Macs have their security settings applied per partition instead of per computer.

      If you set the bootloader to "permissive security policy", you can boot from a Linux partition without effecting the security of the system when you boot from the MacOS partition.

      This is a big change over the way things have previously worked on iOS (where there is no option to unlock the bootloader) or the Mac. It probably wasn't a quick hack that a couple of guys stuck in when nobody was looking.

      8 replies →

    • I don't disagree with what you're saying, but focusing on the number of people that want to run Linux on a Mac and the tangible short-term benefits misses the larger dynamics that could play out over time.

      The bigger opportunity is expanding the footprint and flexibility of Apple Silicon in general. As a developer the new MacBook Pros performance characteristics were too juicy to ignore, the main pain points are virtualization and architecture shift. I'm not knowledgeable enough about the low level details to have a fully formed idea of impact of these pain points yet—maybe Apple Silicon and ARM support are equivalent in practice when it comes to development/deployment—but it certainly makes me feel more comfortable paying the Apple premium the more diverse and open the supported use cases are.

      1 reply →

  • Yep, there seems to be this tendency to evaluate all the actions of all the people inside a company as a single coherent whole, expecting there to be single coherent thread running through it all. It's almost like people think of the company as a single person - a kind of anthropomorphization maybe. Companies may strive for alignment, but they're not the Borg, and they certainly don't have the capacity to micromanage every single decision for every single employee.

    • It's interesting how American/Canadian English uses the singular for groups of people, while British English uses the plural:

      "Apple helps Asahi Linux" (American).

      "Apple help Asahi Linux" (British), as if there's a "people" after Apple.

      19 replies →

    • Is that because whatever company we work for ourselves, those in charge tend to push that narrative so much?

      We get constantly bombarded by our own employers with messages of unity and vision statements and the business plan and the message etcetera. So even when we pause and think about our own experiences and we realize how many varied voices and agendas there are within, we’re conditioned when referring to a brand employer like Apple to reduce them to a single point of view.

      1 reply →

  • I didn't work on the OS team, but when I worked at Apple, if I had snuck in an altruistic change without direct order/approval, I would be in trouble. I suspect there's a good chance that the higher-ups are aware of this.

  • This may have security implications, I highly doubt they would be authorized to make such a change without consulting anyone.

    • The shift to moving the Mach-O parsing from iBoot to kmutil has positive security implications. Adding a raw input option on top of that has zero additional security implications. It's a strict subset of the attack surface.

      3 replies →

  • There is no way that two random kernel engineers pushed a feature that allows booting unsigned kernels on Apple hardware (I'm assuming that's what raw image is?). I don't know how _high_ up it goes but I am very certain it was not some low-level skunkworks thing.

    • > I'm assuming that's what raw image is?

      You're assuming wrong. Booting unsigned kernels on Apple hardware has been possible since January. This just makes it slightly less annoying since you don't need to build a Mach-O binary to do it, and more future-proof since it decouples it from Apple's binary format which they can change the requirements for at any time (as they did this time). It means I don't have to go off and reverse engineer what the new requirements are, I can just stop using Mach-Os and know the raw option will never break (assuming it continues to exist), since there is nothing to break with a raw file.

      Apple's machines are designed as an end-to-end ecosystem that suits their needs, and that they can change at any time - open, but without stability guarantees. This feature is effectively an acknowledgement that people using these machines outside of their ecosystem exist, and might want some stability guarantees.

      1 reply →

  • Well I think this falls right into the anti-competitive argument. With the option of booting unsigned code the platform is available for anyone. Microsoft did sign boot loaders so linux can boot, there would have been some kind of fallout if they had not. So the booting of unsigned Mach-O sunds like a minimal action to not let it become a public issue for Apple.

    The addition of raw mode sounds like a stable abi for booting linux. The Asahi developers have found "stuff" with the hardware. Just that feedback will be of great value to the continued development of the Apple SoCs. So my guess is that the raw mode is a gift with the expectation to be able to see how the Linux folks solves other issues.

    • Why would it become a public issue for Apple? You're going to have a REAL tough time getting the government to intervene because you can't run linux on a macbook. You have literally thousands of alternatives.

      And outside of government intervention, the response from the general public will be: who cares? None of them want to or care to run Linux on a macbook. Heck even within the HN community I'm willing to bet the number of folks who run linux as a daily driver desktop on a macbook is a rounding error.

    • Mac’s have a 16% market share. I don’t think Apple is concerned about antitrust in this part of their business.

  • It's not like they're huge contributors to anything open source. I have to agree. This is probably an engineer or two. They may even have personal reasons for wanting it to work.

  • They're not that different people from the rest of us, so why wouldn't some of them want to run Linux themselves on those machines? MacOS isn't that great.

  • I agree, this seems likely to be a couple folks at Apple trying to be helpful rather than a real policy. If Apple were serious about helping open source efforts they could, for example, release the documentation for their different peripherals and ISA extensions.

  • > I don't think the high-level people would really know that these changes even existed...

    if anyone on the outside knows, then Federighi (sp?) and insiders know and approved publishing with visibility?

  • Apple Engineers don't even come on a podcast to discuss stuff without thinking and asking internally if it's ok.

I was really hoping to see Apple acknowledging that they were helping rather than assuming based on code changes that make it seem like they are. However, happy to see the direction this is going. I’m grateful for the work of both sides.

  • A company saying they're helping has lots of side effects people don't think about:

    - it means they've made a public commitment to a project, and suddenly will get bombarded by other projects, making them less willing to engage again

    - any failure of the project to run well will also be a reflection of the company, even if it's outside their control.

    - it can be seen as an endorsement of a single project, when multiple ones might benefit. Also if that one project becomes problematic it is hard to detangle.

    - the commitment to it would make it difficult to move in a different, better direction if needed in the future

    • They don't need to endorse Asahi to endorse the use of alternative OS on ARM Macs, which wouldn't have any of those downsides. The first Intel Macs were great machines to run Linux on. Later machines had too many compatibility issues. From that experience I'll steer away from Macs as I have no interest in OSX and don't trust them to not break Linux. If they publicly commited to alternative OS friendliness that would go a very long way for me.

      6 replies →

  • I would 10x rather see Apple helping than see Apple say they are helping.

    • Not saying anything and helping is much better than saying you're helping and doing nothing.

      By not being official, they can probably do more internally.

      1 reply →

  • Even it for $REASONS it has to be informal, seeing some active help from Apple is a sight for sore eyes. This is absolutely welcome news.

  • "Microsoft loves open source, so please ignore the way we are stripping hot reload out of .Net 6 to force you to buy Visual Studio instead" would be an improvement?

    Deeds, not words.

The bar is at the floor for "helps".

I understand this is very useful to the stability and future of the project, but we should expect more than the bare minimum from big companies in matters like this. Not being actively harmful != helping.

  • They literally added a feature which they don’t need, and which only seems useful to asahi.

    The bare minimum would have been to not do that.

    • I agree, and that's exactly what they had done before now! I am glad they've done this and think it's a good thing all round, but it would be nice for the expectations to shift and the standards we hold companies to be higher where a situation where they allow you to install your own operating system without jumping through hoops is viewed as the norm as opposed to a benevolent action.

      1 reply →

    • It's a feature they do need though...? They test their hardware on Linux, if it doesn't work properly then they can potentially lose money. This is a random internal change that just so happened to align with the Asahi project. If they were trying to help, they'd let us know. It strikes me as desperation to call this a tacitly helpful move on their behalf.

      1 reply →

  • I'm seriously admiring spirit of people working on Asahi Linux project. In my eyes Apple, it's hardware, software, whole ecosystem and philosophy is openly hostile towards any tinkering, customization, modifications - kind of antithesis of open source/linux. Yet another angle which would be a problem for me is about putting personal non-paid time towards increasing value of one of the wealthiest corporations on the globe.

    Probably I'm too cynical (or maybe realistic?) because it's not hard to imagine situation in the future where thousands of work hours poured into project like this is easily and effortlessly decimated by corporation execs decision.

  • It sounds like they were doing more than just not being actively harmful. They were actively helpful but we can only speculate on their motive.

    • The Asahi Linux project is basically free labor that makes the M1 Macs more appealing to consumers. Perhaps this help is profitable to capture the Linux crowd?

      Personally, I wouldn't consider buying a Macbook unless I knew I could run Linux on it after it EOL. My oldest laptop is 14+ years old and is still useful because I run Linux on it. A 2022 Macbook should make a very nice ssh Linux client in 2037.

      9 replies →

    • Asahi Linux is really interesting to me. A distro that only has to care about a very small number of hardware configurations could be great. I could see it becoming the number one desktop Linux very quickly if they succeed.

    • Engineering goodwill is probably limited by legal / marketing departments. To do more or provide documentation would probably amount to a potential liability with little added benefit to the bottom line.

  • The sad faсt is that given Apple' track record even not interfering might be considered by some as help, let alone adding specific features for people who reverse engineer their hardware.

  • Considering that it's very possible for the bar to go into the floor (Apple actively frustrating the project, as it may not be in their interest), this is pretty huge.

I see this as Apple eyeing a server market segment. Unless Linux is fully ported on m1 cpus it can’t be achieved.

  • Do you really think that Apple couldn’t port Linux to an M1 chip without outside help? If Apple wanted a server product, they wouldn’t need to rely on outside volunteers and they would be more actively helping. Apple used to make servers, and hardware wise, they were great. Software wise, it was more of a mixed bag.

    If Apple wanted to help push a server or cloud product, do you think AWS would be racking retail Mac Minis?

    This has informal geek cred motivation written all over it. More of a good-will measure than anything else. If this was an explicit market/new product motivation, any assistance would look very different and be more formal.

    • > Do you really think that Apple couldn’t port Linux to an M1 chip without outside help?

      It could be that they work on it internally and naturally want to keep it a secret for as long as possible. However, in that case, they would absolutely also want the community to advance "independently" so that Linux software on Apple Silicon has most of the practical issues ironed out by the time Apple is ready to announce their stuff. Think of it as having a free alpha/beta testing even before your product is publicly announced. A pure win-win.

      This, at least, is how I would do it if I was pulling the strings at Apple.

      2 replies →

    • More of a good-will measure than anything else.

      Or maybe as a preparation for Boot Camp for ARM64 Windows? Rumors are that Qualcomm's exclusivity deal is soon over.

      1 reply →

    • Apple does bringup of their chips with Linux. I've heard that they run that before they ever boot Darwin.

  • Yup.. Apple needs to grow somewhere. Cars? Maybe in terms of software.. The real margin currently is in cloud hosting. Even more than in appstore fees.

    They've learned enough from using azure, gcp and aws. Their multi-billion contract with aws will end soon..

    They will offer a fast energy efficient public cloud. First the xcode cloud, then their own hosting, and later it'll become public

    • Apple currently uses commodity PC hardware, from vendors including HP, and Linux as their standard data centre platform. I suppose it's possible they might start experimenting with Apple silicon servers in their data centres, but I doubt it mainly for supply reasons. They need all the 5nm TSMC fab capacity they can get for their consumer products. There's no way there's enough spare capacity to start diverting significant numbers of these chips into their data centres. Maybe one day.

      2 replies →

    • I wouldn’t mind a cloud computing offering from Apple that allows you to keep your hands clean of customer data like CloudKit does.

  • There is 100% certainty that Apple has compiled Linux on their M1 chips. At the bare minimum, they are using it for testing.

    • Sure. That shouldn't be too hard. But it also has nothing to do with running Linux on the M1, which is what Asahi and this whole thread are about.

  • With their super low-power/high-perf chip architecture, this actually makes a lot of sense. I don't think we'd see anything for a really long time, but Apple actually needs to expand into new verticals if they want to continue providing value for the shareholders.

    • I don’t give a fuck about apple providing value to shareholders.

      Following that path is how companies lose their way.

  • I think if Apple was seriously eyeing a server market, Linux would not be the target OS. Apple already relies on quiet a bit from the BSD sphere, I think it would be more likely they have an internal port of FreeBSD or NetBSD. The advantage here is, it would already share some common traits with MacOS and because of licensing, Apple can rebrand it and make modifications without opening the source. Apple has done this before as their Apple AirPorts way back when ran a version of NetBSD.

Now, Godspeed to get GPU cores working in Linux!! If we can get a usable Linux distribution working in Apple Silicon without too many compromises, the new hardware would make a heck of a laptop.

For context: Mach-O https://en.wikipedia.org/wiki/Mach-O

  • Basically Apple's equivalent to ELF. I personally think the multi-architecture support via fat binaries is really neat and I kinda wish Linux adopted the format so we could use one binary for multiple architectures.

    • I don't like being cynical like this, but Linux can't even sort itself even on a single architecture: glibc (with the whole versioned symbol mess), musl variants, and so on, before we even consider shared libraries and package managers. Despite all the hard work of so many people, if you aren't running Ubuntu on x86-64, you will very quickly run into real problems running any kind of third-party software.

      1 reply →

    • FatELF exists, though not widely used, and would make more sense than adopting Mach-O, which has worse tooling than ELF. Because of tooling, it'd be preferable for Apple to switch from Mach-O to ELF in fact (though they won't do so, because that would require a lot of work and Mach-O is working fine for them).

      1 reply →

    • You can use one binary for multiple architectures on Linux with a carefully crafted shell script.

> And people said they wouldn't help. This is intended for us.

This[1] is exactly what I claimed would happen when ARM Macs were announced and people bemoaned lack of support for booting other OSes. I’m glad to see it.

1: specifically that Apple would not prioritize booting other OSes, but that they’d let the community drive the effort, and eventually embrace it.

Surely Apple can see the value in having devs buying and using its machines... Why not contribute to this project in an even more substantive manner? Share documentation and donate money, it would be a great feel good story that harkens back to Apple's pirate roots.

  • I can only guess ... and my guess is that Apple likes this project and would like to see it succeed but to formally help it creates a situation that in the future could be problematic for them. Imagine their team that builds the MacBook wants to make some change that would bring some big improvement to the platform but it breaks projects like this.

    Formally helping this project creates a potential burden on the organization that they do not want to have.

That's fantastic news. I hope it expedites and stabilizes the project as much as it sounds like it will.

Maybe Apple is headed toward Bootcamp for Linux, since Bootcamp for Windows doesn't exist for the M1.

Interesting, since Microsoft is also putting so much work into Linux interoperability these days. Perhaps these are the seeds of convergence. Or at least Linux being the common denominator OS on all machines.

I’m confused, so these are code changes in macOS itself?

Does the latest macOS provide a firmware update to M1 which is what’s making it easier to install Asahi?

  • The changes are in macOS’s bootloader. Previously, the bootloader was only designed to load a macOS kernel executable, which was stored on disk as a Mach object file with some particular constraints. The Asahi project had to use a rather ugly linker script to generate an executable that “looks like like” a macOS kernel but is actually a first-stage Linux bootloader [1].

    In macOS 12.1, Apple engineers changed the format of the kernel image, which broke the Asahi install process. However, they also added a “raw image mode” which allows the bootloader to load things that don’t look like macOS kernels — it’s an officially-supported boot flow for the Asahi project to use going forwards without fear of macOS updates breaking it again. (Plus, it makes that linker script much simpler [2]).

    [1]: https://github.com/AsahiLinux/m1n1/blob/84acf60c24b8c9e28e60... [2]: https://github.com/AsahiLinux/m1n1/blob/92aca22119a0afda9799...

    • Ok, but nothing stops them from removing it. It might allow for a raw image to boot in 12.1, but there are no guarantees it won't go away in 12.2. Why is there no concern about that?

      3 replies →

Apple really has no business getting in the way of this - it would just hurt them on a general purpose computing platform like Macs are.

It's quite likely this isn't specifically for Asahi Linux. Some BSDs are also working on booting on this, which might permit Apple some flexibility in future products using Apple Silicon (Apple's Time Capsules, say, have apparently run NetBSD as opposed to an iOS derivative).

Apple would also likely be welcoming to Windows for Arm running natively on macOS. While Apple wouldn't probably be justified in coughing up the costs for writing complicated drivers - notably graphics drivers - to make Windows run on it, they have incentives to make someone else doing that as easy as possible. Macs running Windows just sells them some percentage more Macs. As does Macs running Linux/BSD most likely, but that percentage is smaller.

Yes... "helps" as in 'help Asahi grow sales for Apple laptops'.

Not saying it's a bad thing, just pointing out the obvious for those who're not seeing it.Apple is well-aware of the state their operating system('s') and ecosystem is, especially to the tech-savy and skeptics around privacy and the shitty general trend that computing follows. In the case that people magically start growing a conscience or care more about these things, they're prepared to switch gears or stop "thinking differently".

Arm macs are a nice piece of HW(with the exception of non-upgradable memory due to SoC but it's a understandable compromise given the gained performance of such glued design-choice), however it's a shame we need to pray the Gods for decent ports/development of Linux distributions to make them usable.

Heartening to see Apple reaching out to Asahi and providing them with a stable kernel image format. This is proof that Apple cares about open source on the M1

I think it was something already enabled for internal testings, engineering just left it for the oss comunities since there was no harm for it

  • It doesn't have all the properties needed for booting macOS kernels. It's not for booting macOS kernels. And that's all Apple boots.

    Seriously. It's for us.

Apple has tried to phase out and slowly kill off the Mac for the last 10 years but people kept buying them for school and work so they have begrudgingly updated it alongside the iPad.

Apple was right. Desktop operating systems like MacOS and Windows belong in corporate, not consumers. They are archaic and still use the file system, which is no longer a thing that consumers need or want. Most people use a tablet and smartphone as their primary computer.

  • I don’t believe this for a second. That would have been a completely daft thing for them to do (not that corporations can’t be daft).

    I think the stagnation perceived with the Mac was a combination of distraction (focussed on mobile), lack of general invasion on desktop in the market, Intels recent problems, and waiting. I believe they were waiting for their silicone to get the point that they could do a proper coordinated refresh.

    • Yeah Apple tried to kill the Mac… and then popped out with the biggest jump in laptop chips in a decade. That chip effort, along with everything that supports it in the new M1 machines was many years in the making.

    • As well as Ive having way too much influence and not grokking what the mac is actually used for, trying to turn it into an aspirational luxury product.

  • This is proper nonsense.

    Developing in house silicon over around 10 years that craps all-over competitors is 'begrudgingly' updating?

    The mac is the pinnacle of their product line up - it may not be their biggest priority or largest profit center... but its clear they consider it as a pro level device and treat it very differently from the iOS based products.

    • The M1 is quite clearly a derivative of designs developed for and deployed first in iOS devices. It's great, really. But other than die size and instance count, it's just a "phone chip". It's an iPhone with more cores/cache/etc...

      The upthread point wasn't that the "M1" wasn't good as a laptop chip (it is!), it was that the "Macintosh" product line is clearly evolving in a direction where it's a derived product from the main revenue-producing lines.

      1 reply →

    • > Developing in house silicon over around 10 years that craps all-over competitors is 'begrudgingly' updating?

      ...developing in-house silicon that has architecture parity with your iPad an iPhone. They've quite literally made the statement that "you people don't want computers anymore, so we're removing 32-bit support, we're taking away every mainstream GPU and graphics API, we're giving you a few more years before we disable x86 support altogether, and you'll be happy about it".

      If that's not a begrudging update then I honestly don't know what is. You'd have to be pretty deep in their marketing campaign to tell yourself that removing those features is just business as usual.

      8 replies →

  • > Desktop operating systems like MacOS and Windows belong in corporate, not consumers. They are archaic and still use the file system, which is no longer a thing that consumers need or want. Most people use a tablet and smartphone as their primary computer.

    I don't believe most people use a tablet/phone as their primary computer (though maybe their primary web surfing device).

    I also don't believe most people want their files on someone else's computer.

    Do you have any studies to back up these assertions?

    • > I don't believe most people use a tablet/phone as their primary computer (though maybe their primary web surfing device).

      I may be too pessimistic, but I think most people use little else than browsers and apps to access social networks, mostly from phones and tablets.

      https://www.statista.com/statistics/273495/global-shipments-... says about 275 million PCs shipped in 2020, https://www.statista.com/statistics/263441/global-smartphone... 1,280 million smartphones. That’s almost 5 times as many, ignoring about 40 million tablets per quarter (https://www.statista.com/statistics/272070/global-tablet-shi...)

      Some of that will be because smartphones last shorter than desktops, but It wouldn’t surprise me if half the smartphone users didn’t even have a desktop PC.

    • > I also don't believe most people want their files on someone else's computer.

      They wouldn't want that if they knew how the cloud works, true. But it seems marketing did a great job at convincing people their new shiny tech product is trustworthy and pure magic.

      A lot of people already use their phone/tablet as their "PC". I don't think it'll be the majority in the foreseeable future, but appstores cover a lot of use-cases and are supported by all mainstream services. And for some the smartphone/tablet is the first and maybe only contact with a computer. It runs Fortnite, so what more do you need? ;)

That this happened is neat.

That this infinitesimally small consideration potentially interpretable as done deliberately on your project's behalf was worth shouting from the rooftops is pathetic, and speaks volumes to the general state of affairs between Apple and Linux/FOSS.

  • Unfortunately, the people here would rather cash in on a nice coincidence rather than use it as an opportunity to discuss Apple's relationship with libre software.

I think Apple recently has kind of pulled a Microsoft, where they're actively trying to turn a new leaf and become more open/listen better.

  • I'll believe it when I see it. I recently got an iPad, and sideloading apps is a ridiculous endeavor that involves a server app (that depends on iTunes and thus only works on macOS and Windows) that has to re-sign your sideloaded apps once every 7 days.

    And regarding Microsoft, while I certainly embrace them being more open than before, VS Code still has proprietary bits, and you'll need to run your own extension store if you don't want to use those (which the VSCodium project does, I think). Of course, that's not even mentioning the forced telemetry in Windows...

    • Why did you buy it if you wanted to do sideloading?

      Apple has literally written documents about why they think sideloading is a bad idea.

      6 replies →

    • > VS Code still has proprietary bits, and you'll need to run your own extension store if you don't want to use those (which the VSCodium project does, I think). Of course, that's not even mentioning the forced telemetry in Windows...

      VSCodium has just disabled that Microsoft store by default. You can enable it and use all the extensions normally, without proprietary bits.

      1 reply →

    • Since apple stuff is expensive anyway, you can just consider the developer program a 99$/year sideloading feature unlock. I use TestFlight to push some private apps to my own and friends devices and find it quite convenient. It even updates in the background for them. 90 days is still kind of a chore but doable.

      1 reply →

  • Wait...since when is microsoft listening to anything?

    • Microsoft has embraced Linux and open source in general to the extent that it helps them expand into larger markets. Linux is to servers as Windows is to desktop computing, Microsoft has finally acknowledged that they can't "win" in the server and cloud market without conceding to that, and have been "supporting" Linux and open source/free software in various ways over the last several years.

      It's not because they believe in open source and free software, it's more that they realized they can coexist with and even benefit from helping such projects. It's a beneficial means to a selfish end, but it's better than the old Microsoft who just wanted to destroy anything related to Linux and free software out of pure spite.

      2 replies →

  • No Apple quietly and understatedly did something positive.

    Microsoft just said they did, bulldozed telemetry and Edge on everyone, released a shit show of an OS and buried it under a pile of marketing and blogs that everyone bought hook line and sinker.