CN114327490A - Method for adapting domestic operating system to Ceph - Google Patents

Method for adapting domestic operating system to Ceph Download PDF

Info

Publication number
CN114327490A
CN114327490A CN202210205329.6A CN202210205329A CN114327490A CN 114327490 A CN114327490 A CN 114327490A CN 202210205329 A CN202210205329 A CN 202210205329A CN 114327490 A CN114327490 A CN 114327490A
Authority
CN
China
Prior art keywords
ceph
loongarch
architecture
operating system
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210205329.6A
Other languages
Chinese (zh)
Other versions
CN114327490B (en
Inventor
金旭
刘屹松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kirin Software Co Ltd
Original Assignee
Kirin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kirin Software Co Ltd filed Critical Kirin Software Co Ltd
Priority to CN202210205329.6A priority Critical patent/CN114327490B/en
Publication of CN114327490A publication Critical patent/CN114327490A/en
Application granted granted Critical
Publication of CN114327490B publication Critical patent/CN114327490B/en
Priority to PCT/CN2022/138101 priority patent/WO2023165206A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

The invention belongs to the technical field of domestic operating system adaptation Ceph, and particularly relates to a domestic operating system adaptation Ceph method. The invention discloses a processor platform based on a LoongArch architecture for a domestic operating system, which comprises the following steps: step S1: ceph changes compilation configuration: adding a branch of a LoongArch architecture in the Ceph and setting a branch compiling flow of the LoongArch architecture; adding parameters of a LoongArch architecture in the compiling configuration of the Ceph; step S2: ceph adds the longarch code; step S3: self-adapting of a platform; step S4: ceph is adapted to the domestic operating system of the LoongArch architecture processor platform.

Description

Method for adapting domestic operating system to Ceph
Technical Field
The invention belongs to the technical field of domestic operating system adaptation Ceph, and particularly relates to a domestic operating system adaptation Ceph method.
Background
With the rapid development of computer technology and the rise of home-made replacement booms, more and more enterprises migrate their business models to home-made processors and home-made operating systems. Ceph is also widely used in cloud computing services of large enterprises as an important component of OpenStack, but there is no LoongArch branch in the original code of Ceph, so how to adapt the domestic operating systems of the Ceph and LoongArch architecture processor platforms becomes a problem to be solved.
Disclosure of Invention
In view of this, the present invention provides a method for adapting Ceph to a domestic operating system, which solves the defects and shortcomings of the prior art, and the domestic operating system adapts Ceph to a longarch architecture by changing configuration and adding branches of the longarch architecture based on a longarch architecture processor platform, so that Ceph is successfully compiled, installed, run, and deployed on the domestic operating system of the longarch architecture.
The invention relates to a method for adapting a domestic operating system to Ceph, wherein the domestic operating system is based on a LoongArch architecture processor platform, and the method comprises the following steps:
step S1: ceph changes compilation configuration:
adding a branch of a LoongArch architecture in the Ceph and setting a branch compiling flow of the LoongArch architecture;
adding parameters of the LoongArch architecture in the compiling configuration of the Ceph, so that the Ceph identifies and compiles branches of the LoongArch architecture;
step S2: ceph adds the longarch code:
adding a LoongArch architecture file and a LoongArch code into a branch of a LoongArch architecture of the Ceph to ensure that the Ceph is compiled and operated on a LoongArch architecture processor platform;
step S3: platform self-adaptation:
ceph is matched and a branch of the LoongArch architecture is implemented, and an interface of the LoongArch architecture processor platform is identified through LoongArch codes, so that the Ceph is compatible with the LoongArch architecture processor platform;
step S4: ceph is adapted to the domestic operating system of the LoongArch architecture processor platform.
Further, in step S1, the parameters include a compiling parameter, a configuration checking parameter, a configuration information parameter, and a context constructing parameter.
Further, the LoongArch code is a code of a branch of a LoongArch architecture, and the LoongArch code comprises macro definitions, interface functions and assembly instructions.
Further, in the step S3, Ceph identifies that the interface of the LoongArch architecture processor platform is implemented by macro definition in the LoongArch code.
Further, in the step S3, if the matched architecture is a LoongArch, the LoongArch code and the interface are matched, and if the matched architecture is not a LoongArch, the other architecture code and the interface are matched.
Further, in step S4, a homemade operating system tag is added to the Ceph deployment tool Ceph-deploy, so that the Ceph is deployed on the homemade operating system, and the adaptation between the Ceph and the homemade operating system running on the LoongArch architecture processor platform is completed.
The method for adapting the domestic operating system to the Ceph can automatically identify the architecture and the matching file on the domestic operating system of the LoongArch architecture processor platform, completely compile, run the basic service and deploy the Ceph cluster. The method expands the branches of the LoongArch architecture on the basis of the Ceph original code, does not influence any structure of the original code of the Ceph, and has high expandability.
According to the method, the branch of the LoongArch architecture is added in the Ceph, so that the LoongArch architecture can be automatically identified in the compiling process, and the compatibility of the interface is ensured by matching the corresponding codes.
The invention runs Ceph service on a domestic operating system of a LoongArch architecture processor platform and builds a multi-node cluster environment.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a relational diagram of the main call flow of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Abbreviations and key term definitions of the present invention.
Ceph: a unified, distributed file system designed for excellent performance, reliability and scalability.
LoongArch: a Loongson instruction system based on twenty years of CPU development and ecological construction accumulation in the Loongson department comprises an infrastructure part, vector instructions, virtualization, binary translation and other extension parts and nearly 2000 instructions.
Platform self-adaptation: besides configuration, plug-in and management tools, the Ceph also comprises a plurality of system function modules, codes related to the architecture exist in the system function modules, and the Ceph can self-adaptively select corresponding codes according to different architectures to ensure normal compiling and running.
The invention provides a method for adapting a domestic operating system to a Ceph, wherein the domestic operating system is based on a LoongArch architecture processor platform, and the Ceph is adapted to the domestic operating system of the LoongArch architecture processor platform by changing configuration and adding LoongArch architecture branches.
As shown in FIG. 1, the method of the present invention comprises the following steps:
step S1: ceph changes compilation configuration:
adding a branch of a LoongArch architecture in the Ceph and setting a branch compiling flow of the LoongArch architecture;
parameters of the LoongArch architecture are added to the coding configuration of the Ceph, so that the Ceph identifies and codes branches of the LoongArch architecture.
Step S2: ceph adds the longarch code:
the file of the LoongArch architecture and the LoongArch code are added in the branch of the LoongArch architecture of Ceph. Through step S2, a binary file suitable for the LoongArch architecture processor platform can be compiled, thereby ensuring that Ceph is compiled and run on the LoongArch architecture processor platform.
Step S3: platform self-adaptation:
the Ceph matches and implements the branches of the longarch architecture, identifying the interfaces of the longarch architecture processor platform through the longarch code, making the Ceph compatible with the longarch architecture processor platform.
Step S4: ceph is adapted to the domestic operating system of the LoongArch architecture processor platform.
The specific embodiment is as follows:
step S1: ceph changes the compiling configuration and constructs the branch of the LoongArch architecture;
adding a branch of a LoongArch architecture in the Ceph and setting a branch compiling flow of the LoongArch architecture; parameters of the LoongArch architecture are added to the compiled configuration of Ceph.
The parameters comprise a compiling parameter, a configuration checking parameter, a configuration information parameter and a context construction parameter.
Parameters for increased lonngarch are exemplified:
add LoongArch architecture branches and parameters:
elseif(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "LOONGARCH")
string(APPEND _boost_ARCHITECTURE_TAG "lp")
configuring checking parameters: obj loonggarch 64 loonggarch 64.cpp
Configuration information parameters: PRINT _ MACRO (__ LOONgarch __)
Context construction parameters:
else if [ configure.builds /boost/architecture//loongarch64 : $(properties) : loongarch64 ]
{
return <architecture>loongarch64 ;
}
step S2: ceph adds the longarch code;
the method has the advantages that files of the LoongArch architecture and LoongArch codes are added in branches of the LoongArch architecture of the Ceph, and the Ceph is guaranteed to be compiled and run on a LoongArch architecture processor platform.
According to the characteristics of the longarch architecture, the longarch code added in Ceph is code specific to the branches of the longarch architecture, including some macro definitions, interface functions, assembly instructions, and the like.
Adding a LoongArch architecture file:
src/boost/boost/predef/architecture/loongarch64.h
code specific to the branches of the LoongArch architecture is exemplified by:
macro definition:
/* LOONGARCH */
#if defined(__loongarch64)
#define DUK_F_LOONGARCH64
#else
#define DUK_F_LOONGARCH32
#endif
interface function:
.file "ontop_loongarch64_lp64_elf_gas.S"
.text
.globlontop_fcontext
.align 3
.type ontop_fcontext,@function
ontop_fcontext:
# reserve space on stack
addi.d $sp, $sp, -160
assembling instructions:
ld.d $t0, $zero, 0xfffffffffffffff0
step S3: self-adapting of a platform;
the Ceph matches and implements the branches of the longarch architecture and identifies the interfaces of the longarch architecture processor platform through macro definitions in the longarch code, making the Ceph compatible with the longarch architecture processor platform.
Step S3 is to connect the Ceph generic code and the architecture code, and ensure the compatibility of the interface, so that the interface can be displayed and called.
It should be noted that, besides the LoongArch architecture processor platform, the Ceph also supports a plurality of architectures such as X86, ARM, MIPS, PPC, and the like, and the interfaces of these architectures are respectively implemented in different ways, which are distinguished by macro definitions of the architectures, so that in actual deployment, according to the actually identified architecture, corresponding branch codes are automatically matched and implemented, and the compatibility of the Ceph and the platform is achieved.
Therefore, in step S3, Ceph matches the corresponding architecture code and interface according to the architecture characteristics, and calls the interface to complete the compiling operation. And if the matched architecture is LoongArch, matching the LoongArch codes and interfaces, and if the matched architecture is not LoongArch, matching other architecture codes and interfaces. Through steps S1 and S2, the Ceph of step S3 may be matched to the longarch architecture, thereby completing the compatibility of the Ceph with the longarch architecture processor platform. The steps do not need to manually specify any parameter, and are completely and automatically identified, matched and implemented.
Step S4: ceph is adapted to the domestic operating system of the LoongArch architecture processor platform.
In the Ceph deployment tool Ceph-deployment, currently, only the international mainstream operating systems such as reddat, centros and suse are supported, and the domestic operating systems are not identified,
step S4 is to add a homemade operating system tag to the deployment tool Ceph-deploy of Ceph, so that the Ceph identifies and deploys the homemade operating system on the homemade operating system, thereby adapting the Ceph to the homemade operating system running on the LoongArch architecture processor platform.
The LoongArch architecture processor may employ a LoongArch 5000 and series LoongArch instruction set CPUs above. The homemade operating system can be a homemade kylin server operating system. When the homemade kylin server operating system is adopted, the steps S1, S2 and S3 can be executed first, and then the homemade kylin server operating system tag is added to Ceph-deploy, so that Ceph can be adapted to, deployed and compiled to run with the homemade kylin server operating system of the longarch architecture processor platform.
The method for adapting the Ceph to the domestic operating system based on the LoongArch architecture processor platform can automatically identify the architecture and match code files on the domestic operating system, and completely compile, run basic service and deploy a Ceph cluster. The method expands the branches of the LoongArch architecture on the basis of the Ceph original code, does not influence any structure of the original code, and has high expandability.
While the foregoing specification illustrates and describes embodiments of the present invention, it is to be understood that the invention is not limited to the precise form herein, and that various other embodiments may be devised without departing from the scope thereof, and that various changes and modifications may be effected by those skilled in the art without departing from the scope of the claims that follow.

Claims (6)

1. A method for adapting a domestic operating system to Ceph, wherein the domestic operating system is based on a LoongArch architecture processor platform, is characterized by comprising the following steps:
step S1: ceph changes compilation configuration:
adding a branch of a LoongArch architecture in the Ceph and setting a branch compiling flow of the LoongArch architecture;
adding parameters of the LoongArch architecture in a compiled configuration of the Ceph, such that the Ceph identifies and compiles branches of the LoongArch architecture;
step S2: the Ceph adds the longarch code:
adding a file of the LoongArch architecture and LoongArch code in a branch of the LoongArch architecture of the Ceph;
step S3: platform self-adaptation:
the Ceph matches and implements a branch of the longarch architecture, an interface of the longarch architecture processor platform identified by the longarch code, the Ceph being compatible with the longarch architecture processor platform;
step S4: the Ceph is adapted to the domestic operating system of the LoongArch architecture processor platform.
2. The method for adapting Ceph according to the homemade operating system of claim 1, wherein in the step S1, the parameters include compiling parameters, configuration checking parameters, configuration information parameters and context construction parameters.
3. The method of claim 1, wherein the LoongArch code is a code of a branch of the LoongArch architecture, and the LoongArch code comprises macro definitions, interface functions, and assembly instructions.
4. The method of claim 3, wherein in the step S3, the Ceph identifies that the interface of the LoongArch architecture processor platform is implemented by the macro definition in the LoongArch code.
5. The method of claim 4, wherein in the step S3, if the matched architecture is LoongArch, the LoongArch code and interface are matched, and if the matched architecture is not LoongArch, other architecture codes and interfaces are matched.
6. The method for adapting a Ceph according to the homemade operating system of claim 1, wherein the step S4 is to add a homemade operating system tag in a Ceph-deploy deployment tool of the Ceph, so that the Ceph is identified and deployed on the homemade operating system, thereby completing the adaptation of the Ceph to the homemade operating system running on the longarch architecture processor platform.
CN202210205329.6A 2022-03-04 2022-03-04 Method for adapting domestic operating system to Ceph Active CN114327490B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210205329.6A CN114327490B (en) 2022-03-04 2022-03-04 Method for adapting domestic operating system to Ceph
PCT/CN2022/138101 WO2023165206A1 (en) 2022-03-04 2022-12-09 Method for adapting domestic operating system to ceph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210205329.6A CN114327490B (en) 2022-03-04 2022-03-04 Method for adapting domestic operating system to Ceph

Publications (2)

Publication Number Publication Date
CN114327490A true CN114327490A (en) 2022-04-12
CN114327490B CN114327490B (en) 2022-07-08

Family

ID=81030985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210205329.6A Active CN114327490B (en) 2022-03-04 2022-03-04 Method for adapting domestic operating system to Ceph

Country Status (2)

Country Link
CN (1) CN114327490B (en)
WO (1) WO2023165206A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023165206A1 (en) * 2022-03-04 2023-09-07 麒麟软件有限公司 Method for adapting domestic operating system to ceph

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454140A (en) * 2017-06-27 2017-12-08 北京溢思得瑞智能科技研究院有限公司 A kind of Ceph cluster automatically dispose method and system based on big data platform
CN112068780A (en) * 2020-09-10 2020-12-11 国家卫星气象中心(国家空间天气监测预警中心) Data unified management system based on heterogeneous storage

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273176B (en) * 2016-04-08 2020-05-12 上海思立微电子科技有限公司 Compiling method and device adaptive to hardware architecture
CN107329764A (en) * 2017-07-03 2017-11-07 苏州大学 A kind of multitask GCPLC systems and the method that application and development is realized using the system
CN109871213A (en) * 2018-12-25 2019-06-11 武汉烽火信息集成技术有限公司 OpenStack containerization system and method based on Domestic Platform
US10908892B2 (en) * 2019-03-12 2021-02-02 International Business Machines Corporation Generating and deploying object code files compiled on build machines
CN110704070B (en) * 2019-09-30 2021-04-13 北京航空航天大学 Method for constructing DDS communication middleware under partitioned real-time operating system
CN111913740A (en) * 2020-05-07 2020-11-10 电子科技大学 FPGA-based real-time operating system transplanting method on RISC-V processor
CN113703772A (en) * 2021-08-23 2021-11-26 北京计算机技术及应用研究所 Efficient intelligent computing application architecture of heterogeneous platform based on ICE (Internet communications Engineers) and construction method thereof
CN114327490B (en) * 2022-03-04 2022-07-08 麒麟软件有限公司 Method for adapting domestic operating system to Ceph

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454140A (en) * 2017-06-27 2017-12-08 北京溢思得瑞智能科技研究院有限公司 A kind of Ceph cluster automatically dispose method and system based on big data platform
CN112068780A (en) * 2020-09-10 2020-12-11 国家卫星气象中心(国家空间天气监测预警中心) Data unified management system based on heterogeneous storage

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
FANGJIAQI_HZ: "《https://blog.csdn.net/qq_40348394/article/details/121626085》", 30 November 2021, pages: 1 - 7 *
花体龙: "《https://blog.csdn.net/qq_33364461/article/details/114941058》", 17 March 2021, pages: 1 - 4 *
龙芯中科: "《 https://baijiahao.baidu.com/s?id=1725338357050239533&wfr=spider&for=pc》", 21 February 2020, pages: 1 - 3 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023165206A1 (en) * 2022-03-04 2023-09-07 麒麟软件有限公司 Method for adapting domestic operating system to ceph

Also Published As

Publication number Publication date
CN114327490B (en) 2022-07-08
WO2023165206A1 (en) 2023-09-07

Similar Documents

Publication Publication Date Title
CN111897570B (en) Multi-dependency item file extraction method and device based on Maven plug-in
CN111736954B (en) Multi-intelligent contract virtual machine implementation method, multi-intelligent contract virtual machine and system
CN109976760A (en) A kind of the cross compile method and cross-compiler of graphic language
CN109918081A (en) A kind of Compilation Method and compiler
CN114327490B (en) Method for adapting domestic operating system to Ceph
CN102360305A (en) VxWorks operating system scaling and customizing method for aerospace computer
CN107871050B (en) Data-oriented and object-oriented hybrid modeling method and storage medium
CN111610974B (en) Cross-system platform compiling method for edge computing
EP3866443A1 (en) Opc ua server, system operating using opc ua, and method of executing opc ua system
CN104133588A (en) Script-based relay protection device graphic development method
CN111984245A (en) Block chain intelligent contract online integrated development environment system and implementation method
CN112068881A (en) Database upgrading method based on data chain
CN111966382A (en) Online deployment method and device of machine learning model and related equipment
US11029934B2 (en) Method and system for updating legacy software
CN111522623B (en) Modularized software multi-process running system
CN108932134A (en) Server B IOS method for remote updating
CN102707934A (en) Method and system for representing value-added service flow in script form
CN111399847A (en) Business system capable of being transplanted across hardware platforms
CN103677907A (en) Installation method and installation device for environmental forecast type application components
CN115658140A (en) SDK packaging method, device, terminal and storage medium
CN116301836A (en) Embedded development system based on domestic autonomous controllable environment
CN108595166B (en) Method and system for realizing application execution engine of distributed Internet of things
US8898524B2 (en) Computer-readable medium storing wrapper program and integrated circuit apparatus
CN113961232A (en) Terminal, method and platform server for providing integrated development environment
KR101099491B1 (en) Method for analyzing power consumption

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant