Editor's note: During the ecological development of OpenHarmony, a large number of outstanding code contributors have emerged. This topic aims to recognize contributions and share experiences. The content in this article is from guest interviews and does not represent the views of the OpenHarmony Working Committee.

OpenAtom OpenHarmony (hereinafter referred to as "OpenHarmony") is an open source project incubated and operated by the Open Atom Open Source Foundation. Every developer can develop based on OpenHarmony. Since its establishment, OpenHarmony has attracted many developers to join. There are currently 6 major developer community areas (CSDN, 51CTO, Open Source China, Sifu, Electronic Enthusiasts, InfoQ, in no particular order), 104 university positions (with organizer's college). The released technical live broadcasts, video courses, technical interpretation articles, developer manuscripts, etc. have accumulated a total audience of 25 million.
To build an open source ecosystem, developers need to use it first, which is inseparable from various types of development boards that can provide various functional requirements. Provides a basic integrated development environment, software source code, and hardware schematic diagrams to facilitate beginners to quickly understand and learn the hardware and software knowledge of the OpenHarmony system. The development board is an important part of the OpenHarmony open source ecological construction. It was Xiong Lei and his team who ported the OpenHarmony version to Hi3516DV300, rk3568 and other development board kits.
In this issue of OpenHarmony Developer Story, we interviewed the person in charge of the OpenHarmony startup subsystem, Xiong Lei, the "Star of the Month for Code Contribution" recommended by the OpenHarmony PMC Committee.
Xiong Lei and the team are responsible for the feature development, product customization, ecological expansion and code maintenance of the startup subsystem. This module controls the startup management of the entire system. The system is very complex. How do they accomplish such a arduous task? During the development process, when encountering typical memory overflow problems, how do they accurately investigate and form a problem analysis document to prevent future problems before they occur? Full of dry goods, not to be missed! We have organized the content of the interview as follows, hoping to inspire you.

Q1 Please give Xiong Lei a brief introduction to himself and his team

Hello everyone, my name is Xiong Lei, and I am currently the person in charge of the OpenHarmony startup subsystem. My team and I are responsible for the feature development, product customization, ecological expansion and code maintenance of the startup subsystem. I have a strong interest in IoT, Embedded, Operating Systems and have been in this industry for 12 years.

Q2 As a well-known technology expert in the development field, why did you initially choose to join the OpenHarmony ecosystem and participate in open source co-construction? What do you think is the most attractive point of the OpenHarmony project?

In the field of mobile operating systems, whether it is iOS or Android, we are always followers. First, it enriched the iOS application market, and later integrated the Android system to build the Android ecosystem together with the world. It has always followed in the footsteps of others.

When I heard about OpenHarmony a few years ago, I wanted to get involved in developing our own mobile operating system. Now that I am fortunate enough to participate in the ecological co-construction of OpenHarmony, it can be regarded as the realization of the original wish.

OpenHarmony attracts me a lot. From the perspective of positioning, it is an innovative mobile operating system, which is exciting; from the perspective of technical architecture, its modular design is also eye-catching. I believe that OpenHarmony's new service, new hardware, and new interactive design concept will bring you a brand new experience.

Q3 This time, you have been nominated by the OpenHarmony PMC Committee as the "Star of the Month for Code Contribution", which means that your contribution to the OpenHarmony project is already at the top level in the industry, which is very remarkable! Joining OpenHarmony in such a short time has achieved such good results, what is your "secret"? Would it be convenient for you to give a detailed introduction from a business perspective, how to make developers more satisfied and make open source co-construction better?

There are no "secrets", I have always believed that interest is the best teacher and the greatest motivation. OpenHarmony is still in its infancy and there is still a lot of work to be done. It is a great honor for me to be involved in such an undertaking at an early stage. The module I participated in is the startup part of the system and is responsible for the startup management of the entire system. It involves various subsystems, and each subsystem has its own demands, and the whole system is very complex. With such an important task, I am under a lot of pressure and motivated.

As a young OS, OpenHarmony needs to attract more developers for ecological co-construction in order to develop better. The project team needs to listen more to the voices of developers, understand everyone's pain points and demands, and solve practical problems in the process of developers participating in the co-construction process. In addition, it is also very important to do a good job in the promotion of OpenHarmony. Developers who understand the system and are interested in it will be willing to participate.

Q4 You and your teammates must have some unforgettable/impressive experiences in the process of participating in OpenHarmony project contributions (such as writing SIG DOCS), such as documents being reprinted, recognized by committer, code merged, and honored , praised by developers, etc. Can you share it with us?

Every master code commit is an extraordinary experience. Seeing the results of our hard work and finally joining the main line, I felt both excited and apprehensive.

Sometimes, the integration of a major feature, the amount of code involved will be very large. My teammates and I need to work for a long time every night to ensure that the compilation is passed, the device can be started normally, and pay attention to the static check alarm. When we see the tags that have been incorporated, we are relieved and feel that all the hard work is worth it.

Q5 During the entire development process, what technical or other difficulties did you and your team encounter? How are these problems solved one by one? In the process of solving these problems, what valuable experiences or lessons have you drawn?

First, briefly introduce the OHOS startup. The init component is responsible for handling the startup process of the system service process from the time the kernel loads the first user-mode process to the first application startup. The simple logical framework of OHOS startup is shown in Figure 5-1 below. The init phase is mainly responsible for startup boot management, service management, and system and service configuration item management.

$$ Figure 5-1 $$

Based on the capabilities provided by init in the early stage, we continuously enhance our capabilities and optimize efficiency through continuous improvement plans. For example, adding a suppression mechanism for frequent process exits, adding a sandbox operating environment that supports processes of applications, system components and chip components, adding a configuration that supports service grouping, a synchronization mechanism for parallel startup dependencies, and applications that can be incubated through sandboxes, as shown in the figure below 5-2.

$$ Figure 5-2 $$

We have encountered all kinds of problems, the more typical one is a memory problem. At the time, I spent the entire day discussing this issue on a remote conference call with the technologists on the team. Everyone worked together, put forward their own ideas and checked and verified one by one, and finally found that the problem was caused by the malloc memory space access in another process out of bounds. Two seemingly completely unrelated processes, memory stomping happens. After the problem was resolved, we conducted an internal review and output a problem analysis document.

Once a memory problem occurs, it will be difficult to troubleshoot. The key is to prevent it. So a good coding practice is very important. As long as you have good coding habits, you can effectively avoid memory out-of-bounds and overflow. Later, we will share and summarize within the team from time to time, just to ensure that the same mistakes will never be made again.

Q6 What is your biggest surprise since joining the OpenHarmony ecosystem? Or what specific gains?

The biggest joy is that the OpenHarmony version has been successfully ported to multiple development board kits (Hi3516DV300, rk3568, etc.), providing developers with a development environment that is easy to learn. When I see that developers can put the theory into practice, everyone develops and contributes together, and the OpenHarmony system continues to improve, the sense of achievement in my heart is indescribable.

In addition, during this process, I have met many friends, participated in different SIG groups, and learned a lot of new knowledge, which are also gains.

Q7 What aspects do you expect OpenHarmony to improve and provide more support for in the future?

I think the performance needs to be improved, and the hands-on experience is not particularly good. The debugging methods of OpenHarmony are also relatively lacking, and there is no trace.

Q8 OpenHarmony is still in the development and exploration stage. Many co-construction units and ecological partners still do not know how to play open source projects, or how to start development. Could you please share with us a piece of experience that you think is the most important or worth sharing?

The important thing is to pay more attention to the community, participate in the SIG more, and communicate more. There are not many OpenHarmony materials on the Internet now, but the code is all open source. There are various WeChat groups in the community, and most of the developers are also Chinese, so everyone will not have any difficulties in communication. I believe that more exchanges between co-construction units and ecological partners will definitely bring great benefits.

Q9 Open questions, you can speak freely, what else do you want to tell everyone?

Along the way, I have been overwhelmed when I first started participating in OpenHarmony, and now I have contributed a lot of code to the OpenHarmony community, which has been bittersweet.

OpenHarmony has grown from dozens of warehouses in the beginning to the current behemoth. Seeing that more and more people are paying attention to and understand OpenHarmony, and more and more people are participating in the development of the system, I feel proud because I am one of them. Sincerely wish OpenHarmony better and better!


OpenHarmony开发者
160 声望1.1k 粉丝

OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目,


引用和评论

0 条评论