We have exciting news to share: In the recently released deepin V23 beta version, the deepin operating system is officially compatible with Apple Mac mini M1!
The Mac mini M1 is a mini desktop computer chip released by Apple in November 2020. It features an 8-core M1 processor with a maximum clock speed of 3.2GHz, two Thunderbolt ports, two USB 3.0 Type A ports, HDMI 2.0, and a 3.5mm headphone jack. As it shares the same processor as the Macbook Air M1 and Macbook Pro M1, this adaptation also lays the foundation for future porting work on these two machines.
Today, we will take you on a journey through the selection of the Apple M1 adaptation plan, the adaptation process, and the preparations for the adaptation work. Let's explore our adaptation journey together!
Due to the Mac M1 machine using a different boot system than the regular x86_64 compatible machines, porting a standard PC operating system onto it requires resolving the boot system issue. Developing a custom solution for this proved too complex, as it would involve in-depth research into the Mac M1's boot system and even reverse engineering crucial hardware drivers. As a result, we chose to utilize the already mature and proven Asahi Linux project to drive our adaptation efforts.
Asahi Linux is a project and community dedicated to adapting Linux to the Apple Silicon platform. Within this community, several Linux distributions have already been successfully adapted, including Alpine Linux, Debian, Fedora, Gentoo, Ubuntu, and more. For specific details, please refer to: https://github.com/AsahiLinux
In order to let everyone understand what our adaptation has done, first of all, we will introduce the process of using the Asahi Linux project to install and start Linux on the Apple Silicon platform:
First, run the installation script on Mac OS. This installation script will pull the installation configuration and rootfs installation package, partition the remaining disk space, and flash the bootloader (m1n1 and UBoot) and rootfs for the subsequent installation process.
Then, turn it off and start it again, and enter the flashed startup item. At this time, the work of setting the installed Linux distribution as the default startup item will be performed.
After restarting the computer, the system will enter the flashed bootloader, which is m1n1. m1n1 will load the bootloader of the next UEFI system according to the settings, usually UBoot. UBoot will decide whether to start the operating system directly or start Grub according to the configuration file. From here, the subsequent process is similar to the normal UEFI system.
Finally, depending on the installation method of different distributions, the first startup may enter the configuration wizard. For example, the official ArchlinuxARM will boot into their specially customized calamares installer.
For the current deepin M1 adaptation project, the deepin community team has comprehensively considered the Asahi Linux official installer and The existing deepin arm64 software warehouse, after combining the m1-debian project and the deepin-m1 project that justforlxz did before, has done the adaptation work on the basis of the m1-debian project.
To port deepin to the m1 platform, the following preparations need to be completed:
Because Apple M1 is also an ARM architecture, we can still use the existing deepin arm64 warehouse. For the key components mentioned in the above preparations, we need to package and build warehouses separately. For example, the kernel and Mesa used by M1. Currently, the deepin-m1 project has been publicly released on GitHub, and interested friends can try it out. If you want to install directly on Mac, you can also use https://ci.deepin.com/repo/deepin/deepin-ports/deepin-m1/deepin.install script directly.
DDE desktop environment is one of the core projects of Deepin. How to provide a friendly interactive experience on the Mac M1 device like other machines is the core goal of our future adaptation. At present, in order to solve the problem of starting the system and desktop environment, deepin-m1 SIG has packaged M1-related components by itself, and provided our deepin-m1 installation script and installation warehouse.
At the current stage, although the deepin system has been able to start normally on the Mac Mini M1, it has not yet reached the stage of daily use, and there are many adaptation problems. For example: the system lacks software applications, there is no setup wizard for the first startup, sound and GPU hardware acceleration are not available, etc. We are currently actively working on these issues.
We also sincerely hope that the adaptation of deepin can inject new vitality into the Apple Silicon project and even the Linux ecosystem on ARM, and we also look forward to friends who are interested in deepin-m1 or deepin-arm transplantation to join our SIG and communicate with us. Let's work together to improve the open source software ecosystem.
deepin-m1 SIG entry: https://github.com/deepin-community/deepin-m1
Finally, I am very grateful to the developers of deepin-related SIGs, and thank you very much for your assistance and support in the Asahi Linux and m1-debian projects. It is precisely because of your contributions to open source and participation in open source that deepin is getting better and better. Thank you again!
In the next article, we will focus on the problems solved by the adaptation process, and welcome your attention.
Written by: Archie Meng
Reviewers: Zeno, dengtongxue, Yuma, JasonZhang