Linux "landing" Apple products, MAC has been able to run Linux system
- Get link
- X
- Other Apps
Since Apple launched a new Mac with its new high-performance ARM chip, third-party software developers have been trying to start and run alternative operating systems on the new hardware. At the beginning of last month, some developers started windows 10 and fedora Linux virtual machine on M1 Mac, but this is not an alternative use of operating system. In the development of M1 MAC alternative operating system, the biggest breakthrough is the team of corellium, a company specializing in arm device virtual machine. The team managed to port Linux and make it "fully available" on the M1 Mac Mini.
The new Linux port makes Ubuntu run on Apple's M1 MACs for the first time. Corellium has successfully ported Ubuntu to M1 Macs and released a tutorial for others to follow. The modified version of Ubuntu will be loaded into the regular user interface after startup, including USB support.
Although M1 chip shares many components with other apple chips, it is not standardized, so it is not easy to create linux drivers to ensure the normal operation of Ubuntu.
Apple did not consider dual system or alternative system when designing M1 Mac. Craig federighi, Apple's senior vice president of software engineering, has previously pointed out that there is no official intention to support local boot of other operating systems, such as windows or Linux. Virtual machine seems to be the only way Apple recommends users to use other operating systems, but it doesn't stop people from creating their own ports.
Hector Martin is a developer who often runs Linux on various kinds of hardware. He is also trying to port Linux to M1 Macs. Most of these developers are attracted by the performance advantages provided by Apple M1 chip. It must be silent to run Linux on ARM based MAC. "I've been looking forward to an arm laptop that can run Linux for a long time," Linux creator Linus Torvalds said in November
Corellium
Chris Wade, Chief Technology Office of corellium, announced the latest progress of the team work on twitter yesterday. "Studying Apple M1 is not only to create new Linux ports, but also a part of our security research," he wrote on his blog
This blog post provides many obstacles corellium has overcome in this process, including how to deal with Apple's SOC, how to create more CPU cores, how to deal with Apple's proprietary interrupt controller, and so on. In addition, corellium adds a preloader, which acts as a wrapper for Linux and a buffer to boot the processor kernel.
This article includes a tutorial on installing Ubuntu on M1 Mac, as well as a GitHub repository (corellium / linux-m1), which users can download. According to these steps, users can start the operating system directly from USB. However, there is still a long way to go for boot camp style dual system. Even though the corellium team has published the tutorial, the steps required are still more complex than most users think, so it is not recommended for ordinary users to use it as a daily driver.
"This new port is" fully available "on the Mac Mini M1, and can launch a full Ubuntu desktop via USB." Chris Wade, chief technology officer of corellium, said, "however, users will need a usb-c dongle to make the network work properly, and the operating port needs to know something about Linux and custom kernel. Corellium will release a tutorial on this process in the near future. "
Technical details
The corellium team said Apple doesn't use the traditional way to start its CPU. First, it guides the loader to run an executable file called Mach object file format (mach-o), which is wrapped in a signature wrapper format called img4. As more CPU cores are started, the situation becomes more complicated, and they will start running the kernel at the address specified by the memory mapped I / O (mmio) register.
Apple has designed its own controller, which is beyond the general arm interrupt controller (GIC) standard. Timer interrupts are directed to fast interrupt request (FIQ), which is not a standardized procedure and reflects the older 32-bit arm system. According to the corellium team, a set of inter processor interrupts (IPI) must be provided to enable multiple processors to communicate.
The corellium team has experience dealing with FIQ support and is well prepared for most of Apple's non-standard approaches. One of the ways to deal with it is to add a preloader to act as a wrapper for Linux, which causes the OS to start on the M1 processor.
The team didn't have an interface for the M1 Mac, so they had to look for alternative input routes. In Bluetooth, USB host and xhci USB host on PCIe, they choose USB host and interact with chip on I2C.
After establishing the correct USB connection, they can connect the keyboard, mouse and flash drive. This makes it possible for a desktop Linux distribution to work properly.
Team experience
Corellium has some experience in Apple operating system protection. Previously, it provided virtual iPhones for security researchers to help explore vulnerabilities. The move angered apple, which filed a copyright lawsuit against corellium in August 2019. Apple later accused corellium of violating the Digital Millennium Copyright Act (DMCA) in January 2020, and the judge dismissed the accusation in December. The ruling on other Digital Millennium Copyright Act charges has been delayed.
Corellium used its experience in developing sandcastle project to write linux driver for new Apple SOC. Fortunately, apple officially allows booting custom kernels on Apple silicon Macs, so replacement developers don't need to exploit the vulnerability to boot the kernel. Compared with other 64 bit ARM SoC, apple silicon's firmware interface and startup process are very different. After some work, the corellium team managed to increase the support for enough hardware interfaces to successfully boot Linux and Ubuntu on M1 Mac Mini.
Installation tutorial
Users can download corellium shared instructions on how to start Ubuntu. For a brief summary of this description, first you need to download the real-time image (slightly modified from the arm64 Ubuntu build for raspberry PI), then copy the image to an external USB drive (at least 16GB capacity), connect the USB drive to the usb-c port of Mac Mini, boot into the initial operating system interface, and install the custom kernel (corellium) The installation script is provided), and the default credentials are used to log in.
Corellium also said that the installation process is not very friendly, so it is not recommended for beginners to use Linux on Mac Mini. In addition, M1's machine learning core has no GPU acceleration or support, so don't try to play games or run machine learning tasks on the new system. But it's still exciting news for PC hardware and Linux enthusiasts. In addition, Linux creator Linus Torvalds also said that the performance and battery life provided by Apple silicon macbooks are second to none, so they are very suitable for real-time programming.
- Get link
- X
- Other Apps
Comments
Post a Comment