CN111399847A - Business system capable of being transplanted across hardware platforms - Google Patents

Business system capable of being transplanted across hardware platforms Download PDF

Info

Publication number
CN111399847A
CN111399847A CN202010187459.2A CN202010187459A CN111399847A CN 111399847 A CN111399847 A CN 111399847A CN 202010187459 A CN202010187459 A CN 202010187459A CN 111399847 A CN111399847 A CN 111399847A
Authority
CN
China
Prior art keywords
hardware
configuration module
service system
difference configuration
module
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.)
Pending
Application number
CN202010187459.2A
Other languages
Chinese (zh)
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.)
Chengdu Qianli Network Technology Co ltd
Original Assignee
Chengdu Qianli Network Technology 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 Chengdu Qianli Network Technology Co ltd filed Critical Chengdu Qianli Network Technology Co ltd
Priority to CN202010187459.2A priority Critical patent/CN111399847A/en
Publication of CN111399847A publication Critical patent/CN111399847A/en
Pending legal-status Critical Current

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/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • 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

Abstract

The invention relates to the field of software development, and discloses a service system capable of being transplanted across hardware platforms, which is used for solving the problem of poor portability of the conventional service system and enabling the service system to normally operate under linux systems of different hardware platforms. The business system is based on a linux operating system, and the business logic source codes and the linux kernel source codes in the business system are subjected to code layout of an independent warehouse; the service system comprises a hardware difference configuration module, a software difference configuration module and a source code compiling module; the hardware difference configuration module is used for configuring a cross compiling tool chain and hardware parameters; the software difference configuration module is used for configuring software functions required by the service system and a path of the kernel source code; and the source code compiling module generates a mirror image file corresponding to the service system according to the configuration data of the hardware difference configuration module and the software difference configuration module. The invention is suitable for routers or gateways and the like.

Description

Business system capable of being transplanted across hardware platforms
Technical Field
The invention relates to the field of software development, in particular to a service system capable of being transplanted across hardware platforms.
Background
In the existing market, the problem that the same service system is operated on different hardware platforms is often faced, which causes considerable difficulty in research and development, because it is not easy to operate the same service system on different systems of different platforms, for example, it is not easy to operate an application on an Openwrt system on a mips platform to an ubuntu system on an arm platform, which relates to the problems of platforms, systems, cross compilation and the like.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the service system capable of being transplanted across hardware platforms is provided to solve the problem that the existing service system is poor in transportability, and the service system can normally run under linux systems of different hardware platforms.
In order to solve the problems, the invention adopts the technical scheme that: a business system capable of being transplanted across hardware platforms is based on a linux operating system, and business logic source codes and linux kernel source codes in the business system are subjected to code layout of an independent warehouse; the service system comprises a hardware difference configuration module, a software difference configuration module and a source code compiling module;
the hardware difference configuration module is used for configuring a cross compiling tool chain and hardware parameters according to the platform to be transplanted;
the software difference configuration module is used for configuring the software functions required by the service system and the path of the kernel source code according to the platform to be transplanted;
the source code compiling module is used for generating an image file corresponding to the service system according to the configuration data of the hardware difference configuration module and the software difference configuration module, wherein the image file comprises an application program, all library files required by the application program, and an installation starting process script.
Further, the platform to be transplanted can comprise hardware platforms such as mips, arm or x86, so that application migration between common platforms such as mips, arm or x86 can be solved.
The invention has the beneficial effects that: the business system provided by the invention adopts independent warehouse code management, comprises all libraries and dependent resources required by the start of the business system, comprises all compiling tool chains, and can compile the business systems running on different hardware platforms as long as the compiling tool chains are configured before compiling, the hardware is differentiated, and the software functions are realized, so that the normal running of the business systems running on different hardware platforms and different linux operating systems is ensured. Therefore, the invention can reduce the development period, further carry out customized development, select the running function according to the hardware performance and the customer requirement, rapidly complete the product research and development and greatly shorten the research and development period.
Drawings
FIG. 1 is a migration flow framework diagram of an embodiment.
Detailed Description
These problems need to be solved when a business system needs to operate normally under linux systems of different hardware platforms: first, whether independent or not, the dependency is small; second, whether it is independently compilable; third, whether it is separately configurable; fourth, hardware difference processing.
In order to solve the problems, the specific measures of the invention are as follows:
1. independence: the invention adopts independent warehouse code management, comprises all libraries and dependent resources required by the start of the service system, and can independently operate;
2. compiling: according to the scheme, independent warehouse code management is adopted, directories such as an application, a driver, a kernel module, an open source library and a third-party open source code are respectively set, Makefile is configured for compiling each directory, the method can be applied to each hardware platform as long as a function module is developed once, compiling is carried out layer by layer through Makefile, a file system of a service can be generated through provided script compiling as long as the position of a compiling tool chain is declared, and then the file system is packed into a ubuntu/openwrt system for subsequent service;
providing a compilation entry: sh, calling Makefile compiling according to the provided compiling tool chain;
3. configuration: according to different hardware platform models, selecting a module to be compiled through make menuconfig to generate a required file system;
generating a compiling configuration: make completes the module configuration needed to compile;
4. starting: the service file system only has one starting inlet, and each module corresponding to the service can be started only by calling the script at the starting position corresponding to the ubuntu/openwrt system and the like, so that the service system is formed; after the service system is started, the functions of program monitoring, alarm reporting, web configuration, cloud upgrading and the like can take effect;
providing a start-up entrance: sh, starting each functional module of the service system;
5. the service system provides a hardware information file: the devinfo can know the number and the speed of flash partitions, Ethernet ports, CPU main frequency, memory size, WIFI interfaces, 2.4G/5G and other hardware information through the file, so that adaptation is effective when upgrading and configuring application, different treatment cannot occur in codes, general adaptation can be completed, and portability is greatly improved.
After the aspects of compiling, configuring, starting, hardware difference and the like are in place, the functional module is developed once, so that the perfect transplantation of the service system on different linux systems of different platforms can be completed, the development once and adaptation everywhere are completed, the bug is solved once, all hardware platforms are updated synchronously, and the development period and the effectiveness of problem solving are greatly reduced; due to the effective independence of the system, the system can be quickly transplanted and quickly started, if the system runs on the arm, no problem exists, namely, no problem exists on hardware platforms such as mips/x86, and the subsequent maintenance investment is greatly reduced.
The invention is further illustrated by the following examples and figures.
The embodiment provides a service system capable of being transplanted across hardware platforms, the service system is based on a linux operating system, and a service logic source code and a linux kernel source code in the service system are subjected to code layout of an independent warehouse, wherein the service logic source code is mainly used as an upper layer service module and a kernel module needing to be adapted, does not care about the version, the hardware platform, the operating system and the like of a bottom layer kernel and is independent into an independent code warehouse, and L inux kernel source code is used for forming an independent warehouse by the kernel source code and can be a linux operating system based on any hardware platform.
The service system is provided with a hardware difference configuration module, a software difference configuration module and a source code compiling module. The hardware difference configuration module can configure a cross compiling tool chain and hardware parameters according to the platform to be transplanted; the software difference configuration module can configure the software functions required by the service system and the path of the kernel source code according to the platform to be transplanted; the source code compiling module can generate an image file corresponding to the service system according to the configuration data of the hardware difference configuration module and the configuration data of the software difference configuration module, wherein the image file comprises an application program, all library files required by the application program and an installation starting process script.
The business system migration flow framework of the embodiment is shown in fig. 1, and the specific flow is as follows:
1. confirming a hardware platform to be transplanted currently: the main confirmations were mips, arm, x86, etc.
2. Identifying the linux operating system can be any linux operating system, such as centros, ubuntu, openwt, debian and the like.
3. Hardware differencing configuration
1) And configuring a cross compiling tool chain according to the platform to be transplanted.
2) The method comprises the steps of configuring hardware parameters according to a platform to be transplanted, taking a router or a gateway as an example, wherein the configured hardware parameters specifically comprise the existence of WIFI (wireless fidelity), 2.4G or 5G, the maximum power, the existence of Bluetooth, the existence of an Ethernet port, the name ethx, 100M or 1000M, the existence of a 4G module, whether 3-network communication exists or not, the main frequency and the memory size of a CPU (central processing unit), and the partition names of a starting partition, a file system partition, a configuration partition and the like under the condition of an F L ASH partition so as to facilitate system upgrading and configuration storage.
4. Software function configuration
1) And configuring required software functions according to the platform to be transplanted.
2) And configuring a path of the kernel source code according to the platform to be transplanted.
5. Cloning and compiling source code
And compiling all programs by using a Makefile top layer according to the configuration data of the hardware difference configuration module and the software difference configuration module. The specific way at compile time is as follows:
① declaration toolchain environment variable
②. start compiling with platform _ build.sh under the existing linux system of ubuntu/openwrt et al, the detailed commands are as follows:
cd${GWPATH}&&PRODUCT=${MODEL}KERNELPATH=${LINUX_DIR}host=aarch64-linux-gnu os=Linux mach=aarch64 sh build.sh。
in the above commands, GWPAT is business system code directory, PRODUCT is hardware model name, KERNE L PATH is kernel directory, and host is cross-compilation tool chain name.
6. Packaging to generate a mirror
After compiling is completed, a mirror image file gwos, rootfs, tar and gz of the hardware model is generated, wherein the mirror image file gwos, rootfs, tar and gz comprises all library files and application programs required by the model, and a startup flow script is installed and started. And finally packaging the image file gwos, rootfs, tar and gz into a file system of the platform to be transplanted.
After the service system is transplanted, the operation mode on the transplanting platform is as follows: decompressing a gwos, rootfs, tar and gz system, running a decompression file, and installing a start script install, so that each module corresponding to the service system can be started, and the service system is formed; after the service system is started, the functions of program monitoring, alarm reporting, web configuration, cloud upgrading and the like can take effect.

Claims (2)

1. A business system capable of being transplanted across hardware platforms is characterized in that the business system is based on a linux operating system, and business logic source codes and linux kernel source codes in the business system are subjected to code layout of an independent warehouse; the service system comprises a hardware difference configuration module, a software difference configuration module and a source code compiling module;
the hardware difference configuration module is used for configuring a cross compiling tool chain and hardware parameters according to the platform to be transplanted;
the software difference configuration module is used for configuring the software functions required by the service system and the path of the kernel source code according to the platform to be transplanted;
the source code compiling module is used for generating an image file corresponding to the service system according to the configuration data of the hardware difference configuration module and the software difference configuration module, wherein the image file comprises an application program, all library files required by the application program, and an installation starting process script.
2. The business system that can be migrated across hardware platforms as in claim 1, wherein said platform to be migrated comprises the following platforms: mips, arm or x 86.
CN202010187459.2A 2020-03-17 2020-03-17 Business system capable of being transplanted across hardware platforms Pending CN111399847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010187459.2A CN111399847A (en) 2020-03-17 2020-03-17 Business system capable of being transplanted across hardware platforms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010187459.2A CN111399847A (en) 2020-03-17 2020-03-17 Business system capable of being transplanted across hardware platforms

Publications (1)

Publication Number Publication Date
CN111399847A true CN111399847A (en) 2020-07-10

Family

ID=71430884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010187459.2A Pending CN111399847A (en) 2020-03-17 2020-03-17 Business system capable of being transplanted across hardware platforms

Country Status (1)

Country Link
CN (1) CN111399847A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732333A (en) * 2021-04-02 2021-04-30 北京易捷思达科技发展有限公司 Version release method and device for cloud computing linux operating system and electronic equipment
CN113535230A (en) * 2021-06-07 2021-10-22 上海古鳌电子科技股份有限公司 Method and system for dynamically adapting engineering source code to different hardware resources

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130227573A1 (en) * 2012-02-27 2013-08-29 Microsoft Corporation Model-based data pipeline system optimization
CN106199696A (en) * 2016-06-29 2016-12-07 中国石油天然气股份有限公司 Earthquake data processing system and method
CN109814878A (en) * 2018-12-20 2019-05-28 中国电子科技集团公司第十五研究所 Cross-platform cross commercialization is from the complicated huge information system mixed deployment system of primary climate
CN109871213A (en) * 2018-12-25 2019-06-11 武汉烽火信息集成技术有限公司 OpenStack containerization system and method based on Domestic Platform
CN110399134A (en) * 2019-06-28 2019-11-01 绿漫科技有限公司 A kind of quick deployment method and system based on container
CN110825392A (en) * 2019-10-31 2020-02-21 北京深之度科技有限公司 Customization method, batch deployment method and batch deployment system of operating system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130227573A1 (en) * 2012-02-27 2013-08-29 Microsoft Corporation Model-based data pipeline system optimization
CN106199696A (en) * 2016-06-29 2016-12-07 中国石油天然气股份有限公司 Earthquake data processing system and method
CN109814878A (en) * 2018-12-20 2019-05-28 中国电子科技集团公司第十五研究所 Cross-platform cross commercialization is from the complicated huge information system mixed deployment system of primary climate
CN109871213A (en) * 2018-12-25 2019-06-11 武汉烽火信息集成技术有限公司 OpenStack containerization system and method based on Domestic Platform
CN110399134A (en) * 2019-06-28 2019-11-01 绿漫科技有限公司 A kind of quick deployment method and system based on container
CN110825392A (en) * 2019-10-31 2020-02-21 北京深之度科技有限公司 Customization method, batch deployment method and batch deployment system of operating system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732333A (en) * 2021-04-02 2021-04-30 北京易捷思达科技发展有限公司 Version release method and device for cloud computing linux operating system and electronic equipment
CN113535230A (en) * 2021-06-07 2021-10-22 上海古鳌电子科技股份有限公司 Method and system for dynamically adapting engineering source code to different hardware resources

Similar Documents

Publication Publication Date Title
US10261776B2 (en) Automated deployment and servicing of distributed applications
Fischer et al. Engage: a deployment management system
WO2017092672A1 (en) Method and device for operating docker container
US8533676B2 (en) Single development test environment
US20130232245A1 (en) Automation for virtualized it environments
CN102402427B (en) A kind of update method of java application and device
EP2972821B1 (en) Application compatibility checking in a distributed computing environment
EP2932374A1 (en) Systems, methods, and computer program products for a software build and load process using a compilation and deployment service
CN111399847A (en) Business system capable of being transplanted across hardware platforms
CN111966366A (en) Cluster deployment method and device of multi-CPU architecture
US10514898B2 (en) Method and system to develop, deploy, test, and manage platform-independent software
CN111930465A (en) Kubernetes-based dreams master-slave cluster deployment method and device
CN113434158B (en) Custom management method, device, equipment and medium for big data component
CN107608681A (en) Installation method of operating system, device and server
CN109670299A (en) A kind of method and electronic equipment creating Python sandbox environment
CN102447732A (en) Method for intelligent configuration of host computer embedded environment during BMC (Baseboard Management Controller) development
AU2012201749B2 (en) Single development test environment
CN113986395A (en) Packaging method for applying dependent self-contained technology under linux system
CN111324599A (en) Block chain experiment system and management method
CN112363731A (en) Application automation deployment method and device and computer readable storage medium
CN115291946A (en) Hongmong system transplanting method, device, electronic equipment and readable medium
CN103853557A (en) Method for starting WinCE by utilizing Uboot network
US11561790B2 (en) Orchestrating multi-level tools for the deployment of a network product
CN111930466A (en) Kubernetes-based data synchronization environment deployment method and device
CN114327490B (en) Method for adapting domestic operating system to Ceph

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200710