tech

From Linux on arm to Windows on arm.

30 Comments 2024-06-29

Building a new universal computing architecture ecosystem is a world-class challenge. The technology itself is not the most difficult part; the most difficult points are twofold: one is the need for a rich application ecosystem so that users can have a good user experience; the other is the need for a large shipment volume to have a cost advantage. These two conditions are interlocked, similar to the chicken and egg problem. So how can we break the deadlock?

ARM is a company that is good at building ecosystems and has a successful track record. It is best at patience, making steady progress day by day, with a rhythm of 5 to 10 years to achieve seemingly simple and low-key goals, but in fact, they are particularly grand, to the point of seeming like boasting, such as "Linux on ARM," "Works on ARM," and "Windows on ARM."

Advertisement

Linux on ARM

When did Linux start supporting ARM?

The first time Linux was ported to ARM was in 1994, before ARM was established. The predecessor of ARM, Acorn, planned to port the 1.0.x version of the Linux kernel to the Acorn A5000. The goal at the time was to get a Unix-like operating system on the A5000, and there was no intention of returning the results to Linus's kernel tree, so it was just a port and not considered Linux support for ARM.

The porting process is not much different from today's application porting, which involves decompressing the source package, configuring the kernel, and compiling. However, the whole process was very tortuous. At that time, there were no configuration scripts, and manual editing of makefiles and header files was required, which was quite time-consuming and laborious. The kernel was compiled in segments, with the file system, kernel, IPC, etc., all compiled separately. The memory management (mm) system needed to be rewritten because the mapping relationship between the physical page and the logical address space was reversed. Fortunately, the A5000 at that time was relatively simple, so there were no major issues with the drivers. However, all assembly-related content needed to be rewritten. After all modules were compiled, they needed to be linked into a complete kernel. The first link failed as expected, returning a long string of undefined characters. After a month of patching, Linux finally started. Subsequently, the root disk, file system, shell program, C library, and so on, none of them passed at one time, all requiring some patching, debugging, or rewriting to work normally.

The earliest official release to support ARM was Debian. On August 15, 2000, Debian 2.2 (Potato) supported Intel i386, Motorola 68000 series, alpha, SUN Sparc, PowerPC, and ARM architecture (what a diverse 2000), among which PowerPC and ARM were newly ported. This version was maintained by 450 Debian developers, maintaining more than 3,900 binary files and more than 2,600 source packages. At that time, there were nearly a thousand applications that needed to be tested. Moreover, in 2000, there were no tablets, Chromebooks, or today's smartphones. Some engineers used Compaq's iPaqs (how many people still remember Compaq?) for testing.

But has Linux been smooth sailing with ARM since then? No, in March 2011, Linus Torvalds's famous "the whole ARM thing is a f*ck pain in the ass" email shocked the Linux community and was also a great shock to the ARM software team. Originally, ARM belonged to the Buddhist effort faction, which means that although they worked hard, they were also very Buddhist, doing what they could, supporting what they could, and letting go of what they couldn't do, and finally, one or a few ARM companies that needed this work would do it. However, this community email demanding that ARM strengthen control actually pointed out that due to ARM's IP licensing model, there would be multiple different SOC providers who need to modify the same Linux files to support their own hardware. The low efficiency of repetitive work is a problem, but the conflicts between each other are fatal. Unmanaged conflicts will ultimately lead to division.

In fact, ARM has already realized the problem of ecological division. A year before this "F" email, it established Linaro, an independent non-profit engineering organization. Arm hopes that Linaro, in a neutral position, will organize all partners in the ARM camp to solve Linux Kernel and GNU toolchain issues, forming a joint force to consolidate the software ecosystem. Linaro has indeed achieved this, and in just one year, it has changed Linus Torvalds's attitude from being critical to praising.

By the way, that "Fx" email was a reply to a pull request from the OMAP team. Now it's a pity to read about where OMAP is now? Some people say that ARM was fortunate to get on the Android train, but if Symbian had won (Nokia's), Symbian's car would also be ARM. People think that ARM is a lucky player in the mobile computing market, but in fact, it is a survivor after a lot of casualties.If we talk about the mobile computing market, ARM still has a first-mover advantage. However, it was not until 2011 that ARMv8 with 64-bit support was released, and the data center ecosystem construction, which has just begun, is truly a textbook example of ecosystem construction (a tough battle).

Enterprise Linux on ARM

In fact, the data center market is very different from the mobile computing market. The data center market is driven by standards, from how the system should be started to how software is deployed on a large scale. What's more, data center distributions require hardware to provide the necessary code and changes upstream in advance, and then support for new hardware can be realized in deployment. Moreover, the architecture of the data center is also constantly evolving, from Open Stack to K8s, etc. Therefore, ARM has teamed up with its ecosystem partners to formulate standards, port and test, ensure interoperability, cooperate with various orchestration software, and even promote the multi-instruction architecture software strategy of the open source software community... They have done a lot to ensure that the huge amount of open source software needed in the data center is both available and performs well on the ARM architecture.

At the 2015 summit, Red Hat demonstrated the important milestones that the Red Hat team had done for the ARM ecosystem from 2011 to June 2015. In this more than four years, Red Hat began the porting work of OpenJDK, and together with Linaro, established the Linaro Enterprise Group (later renamed Linaro Data Center Group LDCG, and separated the network to become another working group), formulated the SBSA/SBBR standards, released the Fedora community version to accelerate the upstream activities, and finally completed the porting task of OpenJDK, and released the RHEL preview version. Red Hat's participation, integration, and stability three-step strategy are also very classic, and every open source software community involved in the ARM ecosystem has basically gone through these three steps.

It's not just Red Hat, Canonical (Ubuntu), SUSE, OpenEuler, and FreeBSD's support for AArch64 are all planned on an annual basis. And this is just the operating system layer.

With the basic standard SBSA/SBBR, the basic compilation tools GCC, LLVM (in fact, in the compilation tools, ARM has also taken a detour, and has been fully committed to LLVM in a forward-looking manner, and has abandoned GCC in a phased manner, and then found that the long tail effect of the software world is very long), and there are operating systems, but there is still a long way to go to a prosperous ecosystem.

The ecosystem, to some extent, is the ecosystem of developers. The minimum requirement for developers is to have a development environment, but it is indeed a bit "money" difficulty for everyone to have a server. However, the cloud ecosystem can solve some of the problems on the cloud.

Works on ARM

Since 2017, Packet (Equinix company) and ARM have launched the Works on ARM project together, providing free access to ARM cloud hosts, and using this as a starting point to leverage more open source software communities to develop and test on the arm64 architecture.

By the end of 2022, it is not only Packet that can apply for free cloud host resources, but also AWS, Google Cloud, Microsoft Azure, MiniNode using Raspberry Pi as a server, OSL of Oregon State University, Oracle Cloud, and Tencent Cloud in China.However, the main achievements of Works on ARM are not just its free hardware resources, nor is it the support for more than 50 famous open-source software projects. Instead, under the influence of this project, the CI/CD tools have been fully integrated.

Originally, the most popular tool for CI/CD was Jenkins. As a latecomer, Drone.IO also faced the issue of expanding its ecosystem. Inspired by Docker's advocacy for multi-instruction set architecture, the Drone.IO team made supporting the ARM architecture an important breakthrough direction and officially announced support for ARM architecture in August 2018. The support for ARM by Drone.IO was a win-win situation. After announcing the support for ARM, its service business grew tenfold.

Driven by Drone.IO, several other major CI/CD players also took action. In October 2019, Travis CI officially added ARM to its list of supported multi-CPU architectures. Almost at the same time, Gitlab announced that its 64-bit Runner could run on Packet and AWS's ARM instances. In March 2021, CircleCI announced support for the ARM architecture. In May 2021, Jenkins collaborated with Oracle's OCI team to implement support for ARM instances.

Looking back at the entire process of the CI/CD ecosystem's good support for ARM servers, it was a five-year project of migration efforts, and it was also the result of favorable timing and human harmony: ARM on one hand promoted the multi-CPU architecture strategy supported by the open-source community, and on the other hand, it smoothly boarded the built-in the cloud express train, bringing ARM cloud instances into the cloud-native product iteration process. For software, especially cloud-native software, portable architecture-agnostic software will have better vitality. A CI/CD process that natively supports multiple architectures can also ensure the stability and portability of the software products above it. CI/CD on ARM is a win-win result.

So far, the achievements of Works on ARM, in addition to CI/CD platforms, also include a rich variety of languages and compilers, including Eclipse Adoptium (formerly Adopt OpenJDK), GNU toolchain, GoLang, LLVM, Node.JS, OpenJ9, Python, Rust, and Swift; operating systems and virtualization software include Alpine Linux, CentOS, Cloud Hypervisor, Debian, Gentoo, KVM, and OpenEmbedded (formerly Yocto). The database ScyllaDB also uses the project's hardware system to demonstrate performance and program correctness.

If we look at the software applications running on ARM instances on AWS, Google Cloud, Microsoft Azure, and Oracle OCI, we can say that ARM's ecosystem in the data center can be rated as an excellent student.

However, the always very capable Linus said, "In the early stages of an ISA's promotion, the hardware platform available for software engineers to test is a key threshold. A small team or small company can afford a small PC box, and engineers can run their code on it, test freely, and then if such applications develop rapidly and land in the data center, this is the real server application." His conclusion is that without ARM PCs, there will be no future for ARM servers. Historically, Intel did indeed first capture the PC market and then pushed out a number of classic RISC processors from the data center.

So the question arises, is it that ARM does not like the PC market and has not made a big push into the PC market?

(On this issue, let's skip the chapter on Apple. Apple's ecosystem is well done, but ordinary people can't learn from it)

Windows on ARM (WOA)The effort to port the Windows ecosystem to ARM started very early, with the first result being Microsoft's Surface Windows RT in 2012. However, in 2012, aside from the lackluster hardware performance, the ecosystem had a huge gap. The ARM system could only run a limited number of pre-compiled applications, and even Chrome and Photoshop could not be installed...

When Microsoft tried Windows on ARM again in 2018, it had completely learned from the previous experience. The officially released Windows 10 for ARM supports running any existing Windows applications on ARM devices. The Windows 10 operating system has been completely recompiled, and DLLs (which are most of the Windows libraries) have also been recompiled. Some applications are already compiled native ARM applications, while others use dynamic binary translation technology to convert the application code into ARM64 code for execution.

Is binary translation the answer for Windows on ARM? No, this is just the beginning. Microsoft and ARM's strategy is to support the development of native applications for Windows on ARM, starting from winning the hearts of developers, and building a strong ecosystem from end-to-end toolchains.

The Microsoft team took the initiative to port Visual Studio 2022, VSCode, VC++ toolchain, classic .NET Framework, modern .NET, and Java toolchains, while working with ARM and the open-source community to port common tools, runtimes, frameworks, and libraries. Microsoft Azure provides ARM virtual machines and CI/CD tools, and also provides the Windows Dev Kit 2023 (Project Volterra) hardware box for developers.

The release of Electron 6.0.8 in November 2019 can be considered a beginning, and the release of the native Visual Studio 2022 version 17.4 in October 2022 is a big dish.

Moreover, Microsoft joined Linaro in February 2022, that's right, Linaro, I don't know if Linaro will change its slogan from Linux on ARM to all on ARM... Linaro's WOA project page is very simple, with introductions, project lists, and a roadmap map that has been slowly unfolding. Each page, each mark is a migration of the software ecosystem.

I don't know what others see in Windows on ARM notebooks, whether it's long battery life, 5G always online, convenient synchronization with mobile phones, or ultra-thin, ultra-light, fanless design? I hope that Windows on ARM will quickly succeed in the PC market, driving ARM servers to a new height.

Social Share

Post Comment