News for hackers. Stuff that matters.
Re:Linux Running on Apple M1 by heavyset_go on Wednesday January 20, 2021 @04:04PM (#25851974)
Agreed. Check out the state of Linux support on Intel Macs that were released in and after 2016[1], it's abysmal. Once Apple started adding non-standard hardware, Linux support never caught up.

It isn't like the lack of support is Linux developers' fault. Apple doesn't provide datasheets for their hardware, and they don't cooperate with developers writing drivers for their custom hardware.

There are hundreds, if not thousands, of ARM SoCs that "run Linux", but that doesn't mean much because they're actually running Linux forks, and someone needs to maintain those forks, and build and release custom images for each SoC. I don't see M1 Macs diverting from that fate without significant support from Apple themselves.

[1] https://github.com/Dunedan/mbp-2016-linux/

Re:Linux Running on Apple M1 by Skunkleton on Wednesday January 20, 2021 @04:21PM (#25852151)
> that doesn't mean much because they're actually running Linux forks

Many of these Arm SoCs are running linux forks because there are some terrible baked in drivers, and no spec associated with them. Still, that is a step ahead of the M1 as there are at least drivers that don't have to be decompiled and reverse engineered.

Re:Linux Running on Apple M1 by vetinari on Wednesday January 20, 2021 @05:27PM (#25852796)
These drivers are baked, even if there are specs for them.

The thing is, that these SoCs have no PCIe or other enumerable bus. You (=your kernel) must know what hardware it is running on and which drivers to load without being able to ask the hardware, what is really present. One wrong POKE and the entire system can hang.

And that is on top of the problem, how to boot in the first place. There is not such thing as UEFI on these SoCs. Every single one is a special snowflake with its own special way to boot.

Hence, kernels built for specific systems, even if it is just Device Tree.

Re:Linux Running on Apple M1 by kelnos on Wednesday January 20, 2021 @06:37PM (#25853366)
Things have gotten a lot better in ARM-land recently. It's possible to build a generic ARM kernel that will boot on a lot of hardware, as long as the bootloader passes the right device tree blob.

Most device vendors don't really have a need or incentive to use this, though. A generic kernel is much larger and wastes flash space, and most vendors don't care about running anything but their OS image on it, so they of course just build a kernel specific to their hardware.

But in theory it should be possible at some point to use a generic ARM Debian installer to install your own OS on a random ARM device, assuming the relevant drivers and device tree have been upstreamed.

Re:Linux Running on Apple M1 by Skunkleton on Thursday January 21, 2021 @12:42PM (#25861628)
This is a little out of date. Device tree exists explicitly to avoid needing a machine file for your board. Bootloaders like uboot will load your kernel and dtb together, and the kernel uses the dtb to enumerate the hardware on the system.

Again, the problem isn't that the mainline kernel _couldnt_ support these boards, is that no one wants to put in the work to bring their implementations up to the standards of the mainline kernel.

Re:Linux Running on Apple M1 by floatboth on Wednesday January 20, 2021 @08:19PM (#25854174)
> Every single one is a special snowflake with its own special way to boot

Eh, the majority of embedded crap comes with U-Boot (sometimes built without EFI support but always with Linux image support, at least).

Re:Linux Running on Apple M1 by heavyset_go on Thursday January 21, 2021 @02:32PM (#25863078)
I've run into more than a few ARM SoCs that use custom U-Boot forks, too.
Re:Linux Running on Apple M1 by Skunkleton on Thursday January 21, 2021 @07:10PM (#25866530)
I don't think I have used an Arm SoC that _didnt_ use either a custom uboot, or some custom stage one loader (often a stripped down uboot).
Re:Linux Running on Apple M1 by IOT_Apprentice on Thursday January 21, 2021 @12:31PM (#25861503)
Apple is a hardware vendor. How are the parts they use "non-standard"? What are the "standard" parts that Linux uses and further what consumer or business hardware has Linux indicated is standard?

It appears what should be being asked for is Apple to commit resources to natively support things like: Docker, Kubernetes, Virtualization and Linux drivers on their M1 Macs going forward.

Re:Linux Running on Apple M1 by sergeykish on Thursday January 21, 2021 @01:16PM (#25862077)
Interfacets, it is mentioned in the article

> Apple designed their own interrupt controller, the Apple Interrupt Controller (AIC), not compatible with either of the major ARM GIC standards. And not only that: the timer interrupts - normally connected to a regular per-CPU interrupt on ARM - are instead routed to the FIQ, an abstruse architectural feature, seen more frequently in the old 32-bit ARM days. Naturally, Linux kernel did not support delivering any interrupts via the FIQ path, so we had to add that.

and many others

https://corellium.com/blog/linux-m1

It is on top of HN now https://news.ycombinator.com/item?id=25859907

Re:Linux Running on Apple M1 by heavyset_go on Thursday January 21, 2021 @02:24PM (#25862964)
The T2 chip is non-standard and unique to Macs. It affects the boot process and disk access in non-standard and proprietary ways. Apple's SMC is also non-standard, as is their UEFI implementation.

You can see a list of differences between Macs and standard PCs here: https://en.wikipedia.org/wiki/Apple%E2%80%93Intel_architectu...

Re:Linux Running on Apple M1 by dis-sys on Thursday January 21, 2021 @06:40AM (#25857879)
Not many people want to run Linux on intel based mac because you can run Linux on a much cheaper intel machine.