iconm-menu
English chevron-down
中文EnglishРусский
moon-outline
light

How to Check Hardware Compatibility Before Porting an OS to openEuler

openEuler2022-06-28X86PortingSecurity

1. Introduction

As a free enterprise-level Linux operating system, CentOS 8 has attracted wide attention from the industry since it was discontinued at the end of 2021. The reason is not only that CentOS has a large number of users, but also that porting CentOS is not just a system reinstallation. Instead, the OS and its application software and service systems need to be replaced, adapted, ported, and rebuilt. Therefore, how to port applications efficiently and securely at low risks becomes a core concern of users.

There are many OS porting solutions in China. The open source OS openEuler is also one of the hot topics.

The openEuler kernel originates from Linux. It supports Kunpeng, x86, and other processors and can fully unleash the potential of computing chips. openEuler is ideal for database, big data, cloud computing, and artificial intelligence (AI) scenarios. openEuler is one of the mainstream open source OSs compatible with CentOS in China. Compared with CentOS, openEuler optimizes core functions, such as process scheduling, memory management, and I/O read and write. In addition, features such as iSulaf for container, StraitVirt for virtualization, SecGear for confidential computing, and BiSheng JDKs are built outside the core.

The openEuler ecosystem is rich. More than 300 partners have joined the openEuler community, including well-known enterprises such as Intel, Marvel, and New H3C. Partners in the entire industry chain, including processors, completely built units, base software, application software, and industry customers, have joined the community. Currently, 14 mainstream OSVs (including Kylinsoft, UnionTech, Kylinsec, SUSE, and iSoft) have released openEuler-based commercial distributions, which have been widely used as the core systems of government sectors and industries such as carrier, finance, and electricity.

This article describes how to check x86 hardware compatibility before porting CentOS to openEuler (openEuler 20.03 LTS SP1).

2 Environment Description

Hardware

ItemDescription
Server2288H V5
CPUInter(R) Xeon(R) Gold 6266C CPU @ 3.00GHz
NICMellanox ConnectX-5
RAID controller cardHuawei LSI SAS3108

OS

ItemDescription
CentOS7.9.2009 (Core)
Kernel3.10.0 x86_64

Run the cat /etc/os-release command to check the system version.

3. Software Running and Hardware Compatibility Assessment Using x2openEuler

The openEuler community provides x2openEuler to assess hardware, software, and system configuration. In terms of hardware, the compatibility between openEuler and boards that run properly on CentOS is assessed. The tool collects board information and generates reports in HTML format, visualizing hardware compatibility.

Download the x2openEuler tool from https://repo.oepkgs.net/openEuler/rpm/openEuler-20.03-LTS-SP1/contrib/x2openEuler/.

4 Tool Deployment

cd /opt/
rpm -ivh x2openEuler-2.0.0-1.x86_64.rpm

Note: You need to install the RPM package as the root user. Currently, a network connection is required for downloading and installing dependencies. Install dependencies such as bzip2-devel as prompted.

su x2openEuler
x2openEuler redis-db -init

Enter the IP address (127.0.0.1), port number (6379), database index (0. The value range is 0 to16), and password of the Redis database in sequence. The tool encrypts the password. If the Redis password is not set or is empty, press Enter.

x2openEuler init source_centos7.6-openEuler20.03-LTS-SP1.tar.gz

Note: After x2openEuler is installed using an RPM package, the default resource package source_centos7.6-openEuler20.03-LTS-SP1.tar.gz is generated in the /opt/x2openEuler directory. To assess software porting from CentOS 8.2 to openEuler 20.03 LTS SP1, you need to obtain and import the required static resource package. For example, if the resource package is source_centos8.2-openEuler20.03-LTS-SP1.tar.gz, run the x2openEuler init source_centos8.2-openEuler20.03-LTS-SP1.tar.gz command to import the package.

5 Hardware Compatibility Analysis

x2openEuler hardware-analyse
‏The command output is as follows:
2021-11-30 09:41:20,865 - INFO - Log save directory: /var/log/x2openEuler
2021-11-30 09:41:20,887 - INFO - x2openEuler hardware-analyse
2021-11-30 09:41:20,888 INFO manager/get_param_config/179: Parameter configuration file loaded.
2021-11-30 09:41:20,905 INFO manager/get_regex_config/218: Regex pattern compiled.
2021-11-30 09:41:20,905 INFO manager/load_parsers/233: All builtin parsers loaded.
2021-11-30 09:41:20,905 INFO manager/load_parsers/236: All custom parsers loaded.
2021-11-30 09:41:21,254 INFO time_utils/wrapper/21: 0.35s taken for running function [get_data]
2021-11-30 09:41:21,269 WARNING list/parse_content/47: no data in ls_dev
2021-11-30 09:41:21,377 INFO time_utils/wrapper/21: 0.12s taken for running function [get_parsed_content]
2021-11-30 09:41:21,377 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/kernel_startup_param.json.
2021-11-30 09:41:21,378 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/syscall_interface.json.
2021-11-30 09:41:21,378 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/path.json.
2021-11-30 09:41:21,379 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/port.json.
2021-11-30 09:41:21,379 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/device_interface.json.
2021-11-30 09:41:21,380 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/linux_command.json.
2021-11-30 09:41:21,387 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/hardware_configure.json.
2021-11-30 09:41:21,396 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/proc.json.
2021-11-30 09:41:21,404 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/system_configure.json.
2021-11-30 09:41:21,408 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/system_service.json.
2021-11-30 09:41:21,412 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/kernel_configure.json.
2021-11-30 09:41:21,426 - INFO - Producing report...
2021-11-30 09:41:21,427 - INFO - Generate Success! The results are saved: /opt/x2openEuler/output/hw_compat_report-20211130094121.html
In the command output, **/opt/x2openEuler/output/hw_compat_report-20211130094121.html** is the evaluation report.

6 Hardware Assessment Result Display

The hardware compatibility assessment report directly shows whether a board and the whole device are compatible with openEuler. If any item is not in the compatibility list, adaptation is required.

The four tuples (VID, DID, SVID, and SSID) uniquely identify a board. As shown in the preceding figure, each board can be queried in the southbound compatibility list. Therefore, the hardware supports porting from CentOS to openEuler 20.03 LTS SP1.

References https://www.openeuler.org/en/blog/randy1568/x86-Hardware-Compatibility-Assessment-and-Porting-Guide.html


[Disclaimer] This article only represents the author's opinions, and is irrelevant to this website. This website is neutral in terms of the statements and opinions in this article, and does not provide any express or implied warranty of accuracy, reliability, or completeness of the contents contained therein. This article is for readers' reference only, and all legal responsibilities arising therefrom are borne by the reader himself.