CN109828786A - Automated tool based on code-level support sw _64 architecture - Google Patents

Automated tool based on code-level support sw _64 architecture Download PDF

Info

Publication number
CN109828786A
CN109828786A CN201711182567.5A CN201711182567A CN109828786A CN 109828786 A CN109828786 A CN 109828786A CN 201711182567 A CN201711182567 A CN 201711182567A CN 109828786 A CN109828786 A CN 109828786A
Authority
CN
China
Prior art keywords
source code
srpm
packet
framework
code packet
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
CN201711182567.5A
Other languages
Chinese (zh)
Other versions
CN109828786B (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.)
China Standard Software Co Ltd
Original Assignee
China Standard 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 China Standard Software Co Ltd filed Critical China Standard Software Co Ltd
Priority to CN201711182567.5A priority Critical patent/CN109828786B/en
Publication of CN109828786A publication Critical patent/CN109828786A/en
Application granted granted Critical
Publication of CN109828786B publication Critical patent/CN109828786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to an automation tool based on code level support sw _64 architecture, which comprises the following steps: step S1: performing one-time batch processing on the source code packets, and filtering out the source code packets related to the code level support sw _64 architecture; step S2: installing the srpm source code packet in the filtered source code packet list; step S3: executing an aname command on the srpm source code packet in the filtered source code packet list so as to filter and replace the text; step S4: and generating patch files for the files before and after replacement. In the process of transplanting the software package, the invention only needs to pay attention to the source code related to the architecture, and when a brand-new architecture platform is used for transplanting the source code package, the automatic tool can be applied to other platforms by slightly modifying the automatic tool, so that the readability is strong, the maintenance is convenient, the transportability is strong, the work content can be greatly simplified, the labor is saved, and the work efficiency is improved.

Description

A kind of automation tools for supporting sw_64 framework based on code level
Technical field
The present invention relates to computer software programs technical field, specific one kind is related to supporting sw_64 framework based on code level Automation tools.
Background technique
For operating system, be made of thousands of software packages, a completely new framework to these source code packets into Row transplanting, need to spend a large amount of eyesight, mental.
Shen prestige framework originates from alpha framework, and prestige initial instruction set in Shen derives from alpha instruction set, subsequent to carry out Modification and dilatation.When in Shen, prestige platform carries out transplanting and the framework relevant code of source code packet, sw_64 framework and alpha framework What is walked is identical code branch, carries out text replacement to this partial code, it can realize the transplanting of Shen prestige platform source code packet.
However, needing to learn when the source code packet thousands of to file system level carries out the transplanting of Shen prestige framework Whether the source code packet is related to framework, in situation relevant to framework, it is also necessary to carry out text replacement to this partial source symbols.
Accordingly, it is desirable to provide a kind of new source code package transplanting tool, solves the above problems.
Summary of the invention
To solve the shortcomings of the prior art, the present invention provides it is a kind of based on code level support sw_64 framework from Dynamic chemical industry tool, implementation procedure include the following steps:
Step S1: carrying out disposable batch processing to source code packet, filters out source relevant with code level support sw_64 framework Code packet;
Step S2: the srpm source code packet in the source code the package list filtered out is installed;
Step S3: aname order is run to the srpm source code packet in the source code the package list filtered out, to carry out text filtering And replacement;
Step S4: to the file generated patch file of replacement front and back.
Wherein, the implementation procedure of the automation tools further include:
Step S5: if the patch file generated is not sky, the srpm source code packet of a more highest version is directly generated, this is more The srpm source code packet of highest version includes newly-generated patch file, and executes step S6;If the patch file generated is sky, directly It connects and executes step S6;
Step S6: the srpm source code packet name of more highest version is added as success.txt;
Step S7: terminate the transplanting of source code packet.
Wherein, the step S2 includes:
Step S21: srpm source code the package list is read line by line;
Step S22: srpm source code packet is searched from specified directory;If finding, S23 is thened follow the steps, if not finding, is held Row step S24;
Step S23: calling rpm order to install srpm source code packet, carries out step S3 later;
Step S24: by the additional fail.txt of srpm source code packet name, and it re-execute the steps S21.
Wherein, in the step S4, diff is carried out by the file to replacement front and back and is operated to generate patch file.
The automation tools provided by the invention that sw_64 framework is supported based on code level, in the mistake for carrying out software package transplanting Cheng Zhong need to only pay close attention to the relevant source code of framework, also, when a completely new architecture platform carries out the transplanting of source code packet, right The automation tools just can be applied to other platform with minor modifications, readable strong, convenient for safeguarding, portable strong, can be significantly simple Change action, saves manpower, improves working efficiency.
Detailed description of the invention
Fig. 1: the implementation flow chart of the automation tools of the invention that sw_64 framework is supported based on code level.
Specific embodiment
In order to have further understanding to technical solution of the present invention and beneficial effect, it is described in detail with reference to the accompanying drawing Technical solution of the present invention and its beneficial effect of generation.
Design concept of the invention is to realize a kind of tool, after inputting source code the package list, can automatic fitration go out frame Structure correlation source code is gone forward side by side this replacement of composing a piece of writing, the corresponding patch file of each source code packet of final output, to greatly improve transplanting Efficiency.Based on the imagination, inventor carries out modeling test, gradual perfection and improvement to a large amount of source code packet, ultimately provides base The source code packet transplantation method of the automation tools of sw_64 framework is supported in code level.
Code level supports main two function points of automation tools of sw_64 framework, and one is srpm software package transplanting skill Art, one is text filtering and replacement technology based on aname order.
Srpm software package implantation technique refers to that srpm packet is compiled and ultimately generated on target architecture can be on target architecture The rpm packet of operation.Srpm packet source redhat release supports mainstream framework in society, and more satisfactory situation is the source srpm Code packet direct compilation on target architecture passes through simultaneously operational excellence.Period encounters problems, and needs special according to target environment and framework Point carries out patch installing operation, the smooth transplanting of Lai Shixian srpm source code packet to source code packet.Srpm software package implantation technique, to base It is a basic technical ability for the manufacturer of redhat release publication operating system version.To the ripe of this skill master It is mainly reflected in the transplanting of the relevant source code of framework whether white silk.And the transplanting for carrying out srpm software package is also to transport to System build Row environment is inspected, and known srpm packet is needed to generate a series of processes and target program compiling process, operational process of rpm packet Basic principle.
Filtering and replacement technology based on aname command text, exactly run aname order, and parameter is need to filter and replace The text changed exports replaced text.Aname order is to support the automation tools of sw_64 framework specially to grind for code level System, there are also the order of text filtering and replacement in system, for example sed.Aname order is that Shen prestige framework is distinctive, It can be filtered text according to a series of Rule of judgment, and the relevant text of qualified alpha framework is replaced with Shen Prestige framework (sw_64).
Therefore, the code level that the present invention is based on supports that the essence of the automation tools of sw_64 framework is a shell foot This, is equivalent to batch processing tool, which first installs srpm source code packet in the package list, then to the file in source code packet It runs aname order and carries out text filtering and replacement, diff operation finally is carried out to the file of replacement front and back and generates patch file. If source code framework is unrelated, then the patch file generated will be sky.There are also one for the automation tools of code level support sw_64 framework A more advanced function can directly generate the srpm source code packet of a high version, the source code packet if patch file is not sky Newly-generated patch file is contained.
Fig. 1 is the implementation flow chart of the automation tools of the invention that sw_64 framework is supported based on code level, such as Fig. 1 institute Show, automation tools provided by the invention, realization process includes the following steps:
Step S1: since sw_64 framework is the domestic Shen CPU prestige framework, Shen prestige framework is completely new framework, is not belonging to official The mainstream framework of support, but it is similar with alpha framework, and therefore, the first step of the invention needs disposably to criticize source code packet Amount processing filters out source code packet relevant with code level support sw_64 framework, so that its is supported Shen prestige framework, and mention significantly simultaneously High working efficiency;
Step S2: the srpm source code packet in the source code the package list filtered out is installed;
Step S3: aname order is run to the srpm source code packet in the source code the package list filtered out, to carry out text filtering And replacement;
Step S4: diff is carried out to the file of replacement front and back and is operated to generate patch file;
Step S5: if the patch file generated is not sky, the srpm source code packet of a more highest version is directly generated, this is more The srpm source code packet of highest version includes newly-generated patch file, and executes step S6;If the patch file generated is sky, directly It connects and executes step S6;
Step S6: the srpm source code packet name of more highest version is added as success.txt;
Step S7: terminate the transplanting of source code packet.
Wherein, step S2 is specifically included:
Step S21: srpm source code the package list is read line by line;
Step S22: srpm source code packet is searched from specified directory;If finding, S23 is thened follow the steps, if not finding, is held Row step S24;
Step S23: calling rpm order to install srpm source code packet, carries out step S3 later;
Step S24: by the additional fail.txt of srpm source code packet name, and it re-execute the steps S21.
Of the invention supports the automation tools of sw_64 framework to operate in acceptance of the bid kylin operating system (Shen based on code level Prestige version) on, main shell script remove_alpah.sh and aname command component composition, remove_alpha.sh Aname can be called.
Aname command component is designed by C language and is realized, is ultimately generated object code aname, is stored in/usr/bin catalogue Under.Aname belongs to base command component in Shen prestige platform, is under the jurisdiction of packet binutils.
The function of aname is that progress text filtering and replacement, the text that need to be filtered are passed to as command line parameter Aname exports replaced text.
The replacement of text is carried out by following rule:
It is so-called " sw_64 framework " in the present invention, refer to that the English mark of the domestic Shen CPU prestige framework, sw_64 framework are Shen prestige framework.
It is so-called " automation tools of code level support sw_64 framework " in the present invention, refer to tool under the prestige framework of Shen Packet, patch file will be exported by being mainly used for transplanting source code packet by running the tool.
It is so-called " rpm " in the present invention, it is the packet management system that redhat release uses, facilitates the peace loading, unloading of software It carries, inquiry, upgrading.File system is constructed by rpm packet, and the source code of rpm packet is srpm packet.
It is so-called " shell script " in the present invention, refer to a kind of script and windows operated in Linux system System autoexec is similar, that is, is placed in advance in all kinds of orders into a file, convenient one disposably executed Program file.
It is so-called " aname " in the present invention, it is a command component of system-based tool set, which can carry out Text filtering and replacement.
It is so-called " diff " in the present invention, it is an order of system tool collection, running the order can be according to text difference Generate patch file.
Beneficial effects of the present invention are as follows:
1, the code level that the present invention is based on supports the automation tools of sw_64 framework, is in the nature shell script, As soon as completely new architecture platform carries out the transplanting of source code packet, which can be applied to minor modifications other flat Platform so that the present invention have the advantages that it is readable strong, convenient for safeguarding, portable strong, can also according to itself demand into The flexible customization of row.
2, the automation tools that sw_64 framework is supported by operation code level, can be according to source code the package list of input, directly Export framework correlated source code packet patch file, can significant increase transplanting software package efficiency.
3, the use that the automation tools of sw_64 framework are supported by code level, during carrying out software package transplanting, The relevant source code of framework only need to be paid close attention to, the patch file generated to tool is checked and verified, and turns around to constantly improve foot again This, can greatly enhance the reliability of patch file, can also greatly simplify action, save manpower, improve working efficiency.
Although the present invention is illustrated using above-mentioned preferred embodiment, the protection model that however, it is not to limit the invention It encloses, anyone skilled in the art are not departing within the spirit and scope of the present invention, and opposite above-described embodiment carries out various changes It is dynamic still to belong to the range that the present invention is protected with modification, therefore protection scope of the present invention subjects to the definition of the claims.

Claims (4)

1. supporting the automation tools of sw_64 framework based on code level, which is characterized in that the implementation procedure of the automation tools Include the following steps:
Step S1: carrying out disposable batch processing to source code packet, filters out source code relevant with code level support sw_64 framework Packet;
Step S2: the srpm source code packet in the source code the package list filtered out is installed;
Step S3: aname order is run to the srpm source code packet in the source code the package list filtered out, to carry out text filtering and replace It changes;
Step S4: to the file generated patch file of replacement front and back.
2. as described in claim 1 based on code level support sw_64 framework automation tools, which is characterized in that it is described from The implementation procedure of dynamic chemical industry tool further include:
Step S5: if the patch file generated is not sky, the srpm source code packet of a more highest version, the higher version are directly generated This srpm source code packet includes newly-generated patch file, and executes step S6;If the patch file generated is sky, directly hold Row step S6;
Step S6: the srpm source code packet name of more highest version is added as success.txt;
Step S7: terminate the transplanting of source code packet.
3. the automation tools of sw_64 framework are supported based on code level as described in claim 1, which is characterized in that the step Suddenly S2 includes:
Step S21: srpm source code the package list is read line by line;
Step S22: srpm source code packet is searched from specified directory;If finding, S23 is thened follow the steps, if not finding, executes step Rapid S24;
Step S23: calling rpm order to install srpm source code packet, carries out step S3 later;
Step S24: by the additional fail.txt of srpm source code packet name, and it re-execute the steps S21.
4. the automation tools of sw_64 framework are supported based on code level as described in claim 1, it is characterised in that: the step In rapid S4, diff is carried out by the file to replacement front and back and is operated to generate patch file.
CN201711182567.5A 2017-11-23 2017-11-23 Automated tool based on code-level support sw _64 architecture Active CN109828786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711182567.5A CN109828786B (en) 2017-11-23 2017-11-23 Automated tool based on code-level support sw _64 architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711182567.5A CN109828786B (en) 2017-11-23 2017-11-23 Automated tool based on code-level support sw _64 architecture

Publications (2)

Publication Number Publication Date
CN109828786A true CN109828786A (en) 2019-05-31
CN109828786B CN109828786B (en) 2022-05-13

Family

ID=66859301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711182567.5A Active CN109828786B (en) 2017-11-23 2017-11-23 Automated tool based on code-level support sw _64 architecture

Country Status (1)

Country Link
CN (1) CN109828786B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750298A (en) * 2019-10-29 2020-02-04 南京星环智能科技有限公司 AI model compiling method, equipment and storage medium
CN112860316A (en) * 2021-02-08 2021-05-28 中科院软件研究所南京软件技术研究院 Kernel of openEular open source system and BSP transplanting method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011669A1 (en) * 2005-07-06 2007-01-11 International Business Machines Corporation Software migration
US20080127088A1 (en) * 2006-11-27 2008-05-29 Red Hat, Inc. Cross-platform software package generation
US20080295069A1 (en) * 2007-05-21 2008-11-27 International Business Machines Corporation User-extensible rule-based source code modification
US20130007216A1 (en) * 2011-06-29 2013-01-03 Microsoft Corporation Virtual machine migration tool
CN103605520A (en) * 2013-11-22 2014-02-26 中标软件有限公司 Rpm software package conversion method and Rpm software package conversion system
CN106293756A (en) * 2016-08-16 2017-01-04 汉柏科技有限公司 A kind of for quick-replaceable self-defined linux kernel system
US20170192758A1 (en) * 2016-01-04 2017-07-06 Syntel, Inc. Method and apparatus for migration of application source code

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011669A1 (en) * 2005-07-06 2007-01-11 International Business Machines Corporation Software migration
US20080127088A1 (en) * 2006-11-27 2008-05-29 Red Hat, Inc. Cross-platform software package generation
US20080295069A1 (en) * 2007-05-21 2008-11-27 International Business Machines Corporation User-extensible rule-based source code modification
US20130007216A1 (en) * 2011-06-29 2013-01-03 Microsoft Corporation Virtual machine migration tool
CN103605520A (en) * 2013-11-22 2014-02-26 中标软件有限公司 Rpm software package conversion method and Rpm software package conversion system
US20170192758A1 (en) * 2016-01-04 2017-07-06 Syntel, Inc. Method and apparatus for migration of application source code
CN106293756A (en) * 2016-08-16 2017-01-04 汉柏科技有限公司 A kind of for quick-replaceable self-defined linux kernel system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李鑫: "uClinux2.6内核在s3c44b0x平台上的移植研究与实践", 《电脑知识与技术》 *
良少: "修改、重新生成和安装srpm源码包", 《HTTPS://BLOG.CSDN.NET/SHENDL/ARTICLE/DETAILS/19992993》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750298A (en) * 2019-10-29 2020-02-04 南京星环智能科技有限公司 AI model compiling method, equipment and storage medium
CN112860316A (en) * 2021-02-08 2021-05-28 中科院软件研究所南京软件技术研究院 Kernel of openEular open source system and BSP transplanting method
CN112860316B (en) * 2021-02-08 2024-03-08 中科院软件研究所南京软件技术研究院 Kernel and BSP transplanting method of openEular open source system

Also Published As

Publication number Publication date
CN109828786B (en) 2022-05-13

Similar Documents

Publication Publication Date Title
US8745585B2 (en) Meta-data for single development test environment
US8533676B2 (en) Single development test environment
US20130174124A1 (en) Version numbering in single development and test environment
Jayasinghe et al. Expertus: A generator approach to automate performance testing in iaas clouds
US9823909B1 (en) Program code conversion for cross-platform compatibility
CN106909510A (en) A kind of method and server for obtaining test case
CN106293808A (en) The compiling of multilingual cloud realizes the method and system of systemic-function dynamic interception extension
AU2012201749B2 (en) Single development test environment
CN106874195A (en) A kind of bug for android applications repairs and continues delivery scheme
CN109828786A (en) Automated tool based on code-level support sw _64 architecture
CN104991810B (en) Method and processing system in automatic addition APK to Android system
CN113254054B (en) Intelligent contract one-stop development system and method
CN106933591A (en) The method and device that code merges
CN105373381A (en) Method and system for making launchers of mobile terminal
CN105094939A (en) Method for realizing static analysis of software source files based on Makefile automatic compilation technology
CN103645888A (en) System and method for automatically building operation system
CN116629172A (en) Method, device, equipment and medium for automatically generating and integrating modules in chip design
CN112363729B (en) Monitoring method and device for mixed compiling of multiple compilers for static analysis
CN105260184B (en) A kind of adjustment method and device for restoring image file
CN103927213B (en) A kind of file compiling method and compilation device
CN102819445B (en) Quick transplanting method of comprehensive software of transformer substation on embedded system hardware platform
CN105335185B (en) Red cap source code assures the processing method and processing device of reason SRPM packet
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
CN104820627A (en) Method for automatically testing CPU computing performance
CN102270174A (en) Automatic test method and device

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