| In recent years,the RISC-V instruction set architecture(ISA)has attracted the attention of many Linux distributions due to its open source and modular design.However,adapting to RISC-V requires porting software in existing repositories,which presents several challenges.The complex dependency network created by source packages can make it difficult for developers to establish a reasonable porting plan.The complexity of porting software can also be difficult to determine,making it challenging for development teams to allocate resources effectively.Therefore,analyzing the dependency characteristics of software repositories from macro perspective,proposing a porting task planning method for RISC-V based on the dependency chain is important for accelerating the construction of RISC-V software environment.This paper aims to address the challenges of porting software to RISC-V by investigating a porting task planning method through RPM source packages from Fedora and Open Euler distributions.Firstly,the paper abstracts the dependency network using the dependency chain of source packages,analyzes the small-world and scale-free characteristics of the network,and discusses the feasibility of network division.Three types of network dividing patterns are summarized,and conditions for parallelized porting are provided.Secondly,the paper deeply analyzes the factors strongly binding to ISA in C/C++ programs,constructs a porting complexity evaluation dataset,and proposes an automated complexity evaluation method for porting to RISC-V.Finally,with the evaluation result,the paper proposes a hierarchical and iterative porting task planning method to assign tasks for different experienced developers.The network dividing,complexity evaluation in porting,and porting task planning methods are verified in corresponding experiments.For network division,the paper evaluates the division of RISC-V repositories of Open Euler and Fedora33,the results show that the complexity of sub-network is reduced by an average of 52.4% after the division.For complexity evaluation in porting,SQLite and Open CV are used as experimental objects,and the analysis shows that the evaluation is accurate and reasonable.For porting task planning method,the paper compares the porting order analyses by manual with the results given by the method proposed in this paper,and the results show that planning results are consistent with the manual analysis order.Based on the above approach,this paper presents a RISC-V RPM source package porting task planning system based on dependency chains.The system automates the porting scheduling process from network construction,network division,porting complexity evaluation to task planning.The system is implemented using a series of modules based on a unified data convention,which ensures good extensibility.The modules can be used as independent tools,providing developers with flexibility in their usage. |