I have always wanted to make a home-made system adaptation for wildfire IM, but I have been struggling to buy a home-made host. Recently, a client needs to do a localization project. The IM subsystem of the system uses us, so WE will discuss with them about borrowing it for a period of time. On Tuesday, the home-made host mailed by the customer was received. At the moment of unpacking, a thought occurred to me that this was a historic moment for our company and myself. We were fortunate to participate in the great and arduous task of home-made. Localization is the only way for a country to become strong. Localization can avoid being restricted by other countries’ technology and get rid of the dilemma of constantly blackmailed threats and restrictions by other countries. Although our company is very small, there are countless other companies and individuals, great and small, who will join together to make this thing successful.

So without further ado, open the case. Open the box and take out the main machine. The main machine is shown in the picture below. The case is small and beautiful, and various interfaces are abundant.

Clap the nameplate again

Turn it on and have a look. The moment the fan “hum” startled me, and then the fan operated smoothly without any noise, because there is no professional instrument, there is no way to test the decibel number. During the heavy compilation task, the fan does not notice any change or sound at all. This may be the advantage of ARM architecture, which has low energy consumption. Besides, UNLIKE mobile phones, PC has enough space and heat dissipation is not a problem, so the fan pressure is very low.

After entering the system, the first feeling is amazing. I use MacOS and Ubuntu heavily. The UI of UOS is very beautiful. I can beat Ubuntu by several blocks. Of course, this is a personal intuitive feeling, there is no quantitative index, different people may have different feelings, but Deepin’s beauty is still relatively recognized on the Internet.

The following is the system information. You can view the UOS version and CPU information

Software, the system with application store, a variety of commonly used software is also available, to deal with the general office should be more than enough, search to their own need to click on the installation of the automatic installation, very convenient. But only this, the current ecology is not perfect, many professional software are relatively scarce. Ecology and user numbers are a chicken-and-egg problem. As countries move to localize systems, user numbers will rise and software manufacturers will follow, creating a virtuous cycle. Also sincerely hope that system manufacturers can look long term, reduce the threshold of use, so that more users use domestic operating system, only in this way to really rely on their own to live, grow up.

Download ranking: you can view the ranking status of software on the platform

Due to occupational disease, I studied the wechat in the store specially. Wechat cannot be used directly, and you must send a mail to UOS to apply for opening. I guess you may use the Web or the old protocol, so I need to contact wechat to open these switches. If your wechat cannot be logged in on the browser, I guess you can log in on the WEB after the UOS login is successful. There is no actual verification. If anyone did, let me know.

Other popular chat and enterprise collaboration versions are also missing. But there are telegrams. Can you log in? Due to time constraints, there is no verification, login failure is a high probability event.

It can be seen from the above figure that there are very few social communication software, which is the purpose of our company’s work this time, to complete the adaptation of Wildfire IM on UOS, so that customers can use completely private communication software deployed on the home-made system.

Since UOS is also derived from Debian, apt command is as convenient as Ubuntu command line, and many software developed by the author are installed in APT. Apt installation requires developer mode to be opened. Search for developer mode in the control center and follow the instructions to open it.

Because this paper is to record the adaptation of domestic production, I will not do too much evaluation. If you want to know more, you can take a look at the machine’s official website parameters and evaluation video. I ended up feeling much better than I did in my review videos, both on kunpeng 920 and UOS, probably because I’m a programmer.

I reinstalled UOS several times (because I need to test the running condition of the software without the development environment, and find the software dependence), the installation is very simple, X86 can be downloaded from the OFFICIAL website of UOS, and the operating system of the domestic CPU version can be obtained through the customer service. After downloading the ISO image, use the official tool to make an installation USB disk in Windows system, and then insert it, click a few times to complete the installation. If you are interested, you can install it.

Check the compatibility of the Web. Open the Web address with the browser of the UOS and log in by scanning the code. All functions are normal. There’s also Firefox in the store, which should be no problem. The interface is shown in the following figure.

Now the adaptation begins. The adaptation is divided into two parts, one is the adaptation of PC client PC-Chat; The other part is server adaptation, server needs to use domestic database. Due to the length of the problem, this article only talk about adaptation of PC client, server adaptation wait until free to write.

Pc-chat is a client of wildfire IM on PC. The interface and functions are similar to those of wechat/dingding PC. The implementation is realized by electron, where the protocol stack is a C++ library and the upper UI is written by H5. Pc-chat has already been developed on Linux x86, so it only needs to be recompiled on UOS ARM64.

C++ protocol stack compilation,

The installation depends on cmake, Python, build-essential, node, node-gyp, where cmake is available in the app store. Click Install

The other two are installed from the command line

Sudo apt update sudo apt install python, build-essentialCopy the code

Nodejs.org: /usr/local/lib/nodejs: /usr/local/lib/nodejs: /usr/local/lib/nodejs: /usr/local/lib/nodejs: /usr/local/lib/nodejs: /usr/local/lib/nodejs

After installing node, run NPM install -g node-gyp to install node-gyp.

Since Mars uses a static openSSL library, you will need to recompile the OpenSSL library by downloading version 1.0.2f from github OpenSSL Release and following the instructions on the readme

./configure
make
Copy the code

After compiling, find libcrypt.a and libssl.a, create the “openSSL_lib_linux_arm64” folder in the Mars project, and then modify the Linux compile script to reference the arm64 static library.

Python build_linux_arm64.py: marswrapper.node: marswrapper.node: marswrapper.node: marswrapper.node

The smooth degree of compiling here is far beyond my imagination, and basically there is no problem, which shows that the ARM ecosystem is very good, and there are ARM versions in the commonly used tool chain. Some libraries have no corresponding schema version and are easy to compile.

Compilation of screenshot plug-in

Pc-chat screenshots plug-in is QT, the advantage is cross-platform, can run on various platforms, only need to compile once on the corresponding platform. There is QT Csreator in the store, but it cannot be compiled directly, because there is no QT installed, and the ARM version cannot be found on the official QT Download page. However, the UOS installed on the Internet are all for x86 platform. When I was at a loss, I suddenly thought that I could try the command line mode. With apt install qt5-default command, the screenshot plug-in was successfully compiled.

Pack Electron package

NPM install, NPM run package-linux-arm64, install –arm64, install –arm64, install –arm64, install –arm64, install –arm64 There are problems with the latest version of FPM, and we need to go back to the previous version. After some twists and turns, the package is successfully packaged. Once up and running, all functions are normal and very successful.

We also recorded a simple video and posted it on the B site, which you can watch here.

In fact, I was a little worried when I packed electron because I used too many libraries, some of which were platform dependent and required Node-gyp compilation, but I didn’t expect that all the dependencies would be passed at one time. Only FPM problems occurred during packing.

Kunpeng 920 has been adapted, should all ARM64 CPU can support, should also support Feiteng CPU, later I will find a chance to find a FEiteng PC test.

conclusion

It can be seen that ARM’s ecosystem is very good. The tool chain is complete, most of the code is passed at the same time, and the occasional problem can be solved through StackOverflow. With this adaptation, I feel that all software running on x86 Linux should be relatively easy to port to ARM64 Linux.

Another feeling is that ARM’s performance is a little bit worse. I compared it with an I3 NUC, and the compile time on this machine was about 1.2 to 1.8 times as good as the NUC. It should be that the performance of single-core is much worse than that of X86, but the energy efficiency ratio should be able to beat X86, after all, ARM is more energy-efficient. INTEL has not made much progress in the past decade.

With perfect ecology and high energy efficiency ratio, Apple is turning to ARM, which shows the development prospect of ARM in the future.

The Arm! Home-made system refueling! Come on China!

2020.7.26

Li Dayu