LightBlog

jeudi 21 janvier 2021

Linux can now be run on the Mac Mini with Apple Silicon

Ever since Apple launched its new Macs with the company’s new high-performance ARM chips, third-party software developers have been hard at work getting alternative operating systems up and running on the new hardware. Early last month, a few developers booted Windows 10 and Fedora Linux on an M1 Mac via virtualization, but the biggest breakthrough in alternative OS development for M1 Macs has come from the team at Corellium, a firm that specializes in ARM device virtualization. The team has managed to port Linux and make it “completely usable” on the M1 Mac Mini.

In a blog post, Corellium lays out how they ported Linux to the new Macs. The company leveraged its experience developing the Sandcastle project — which enabled booting Android on older iPhones susceptible to the checkm8 exploit — to write Linux drivers for the new Apple SoCs. Fortunately, Apple officially allows booting custom kernels on Apple Silicon Macs, so there’s no need to leverage an exploit to boot an unsigned kernel. Without getting into the nitty-gritty details — Corellium’s blog post does a great job at that — Apple Silicon’s firmware interfaces and boot process are very different compared to other 64-bit ARM SoCs. With a bit of work, the Corellium team managed to add support for enough hardware interfaces to boot Ubuntu Linux on the M1 Mac Mini.

The patches needed to boot Linux on M1 Macs are documented here, while the source code for the pre-loader needed to start the processor cores can be found here. The changes have been pushed upstream, though it’ll take a lot more work before the code gets merged. Other members of the Linux community are working to support Linux on M1 Macs, fortunately. Most notably, the team behind the crowd-funded Asahi Linux project — which aims to port Arch Linux to Apple Silicon Macs — is working on reverse-engineering the GPU architecture to enable hardware acceleration. In order to boot Linux directly on M1 Macs, work is being done to use PongoOS as the bootloader.

If you’re interested in trying out Linux on your own M1 Mac Mini, Corellium has shared instructions on how to boot Ubuntu. You can find the full instructions here, but in summary, you’ll need to download their live image (which is slightly modified from the ARM64 Ubuntu build for the Raspberry Pi), copy the image to an external USB drive (which needs to be at least 16GB in capacity), connect your USB drive to the Mac Mini’s USB-C port, boot into the recovery OS, install the custom kernel (Corellium has provided a setup script), and then log in using the default credentials.

As you can see, the installation process is not very user-friendly, so it’s not recommended for beginners to muck around with Linux on their Mac Mini. Furthermore, there’s no GPU acceleration or support for the M1’s machine learning cores, so don’t expect to play games or run ML tasks. Still, this is exciting news for anyone interested in PC hardware and Linux. The performance and battery life on offer from Apple Silicon MacBooks are second to none, so these machines will be perfect for on-the-go programming. Even Linus Torvalds agrees.

The post Linux can now be run on the Mac Mini with Apple Silicon appeared first on xda-developers.



from xda-developers https://ift.tt/35ZEioC
via IFTTT

Aucun commentaire:

Enregistrer un commentaire