Rate This Document
Findability
Accuracy
Completeness
Readability

Software Porting Assessment (CLI)

The software porting assessment feature analyzes the SO library and DLL files in the software package installation path on x86, verifies their compatibility with the Kunpeng architecture, and provides replacement download links for any incompatible files.

When multiple modules are running concurrently, only one log level can be set at the same time.

Prerequisites

  • The Porting Advisor has been installed.
  • If you have installed the tool using a compressed package, decompress the package and switch to the tool directory. Then run the command in ./ mode, for example, ./devkit porting -h. If you have installed the tool using an RPM package, run devkit porting -h. This section uses an RPM package as an example.

Command Function

Scans and analyzes software packages (non-source packages) and installed software, and provides porting assessment reports.

Syntax

1
devkit porting pkg-mig [-h | --help] {-i INPUT_PATH | --input INPUT_PATH} [-o OUTPUT_PATH | --output OUTPUT_PATH] [-r {all,json,html,csv} | --report-type {all,json,html,csv}] [-l {0,1,2,3} | --log-level {0,1,2,3}] [--set-timeout TIMEOUT] [-t target-os | --target-os target-os] [-s FILE_PATH | --skip-config FILE_PATH] [--kp-compatibility]

Parameter Description

Table 1 Parameter description

Parameter

Option

Description

-h/--help

-

(Optional) Obtains help information.

-i/--input

-

(Mandatory) Path to the software package or software package folder to be scanned. Use spaces to separate multiple paths. The supported software package formats include RPM, DEB, JAR/WAR, TAR, ZIP, and GZIP.

Example: /home/test1 /home/test2.jar

-o/--output

-

Path for storing scan reports. By default, scan reports are stored in the current execution path. A report name is the format of Feature-name_Timestamp. This parameter is optional.

-r/--report-type

all/json/html/csv

Scan report format, which defaults to all. This parameter is optional.
  • all: generates reports in JSON, HTML, and CSV formats.
  • json: generates a report only in JSON format.
  • html: generates a report only in HTML format.
  • csv: generates a report only in CSV format.

-l/--log-level

0/1/2/3

Log level, which defaults to 1. This parameter is optional.
  • 0: DEBUG
  • 1: INFO
  • 2: WARNING
  • 3: ERROR

--set-timeout

-

Timeout interval of a task, in minutes. If the execution duration exceeds the timeout interval, the task exits. This parameter is optional. By default, there is no timeout interval. The task will be executed until it is complete.

-t/--target-os

See the -h help information.

Target OS. If this parameter is not set, the current OS is used by default. This parameter is optional.

-s/--skip-config

-

(Optional) Configures the scan trustlist. The value must be an absolute path. Enter a JAR package to be skipped in each line. These JAR packages will not be displayed in the scan result. The following is an example:

leveldbjni-all-1.8.jar
snappy-java-1.0.4.1.jar

--kp-compatibility

-

(Optional) If you enable this option, the tool checks only the cross-generation compatibility check of the Kunpeng platform. The target platform is the new Kunpeng 920 processor model. You are advised to enable this option after the porting from x86 to Kunpeng is complete.

NOTE:

Java and Python are supported.

Example

This example analyzes the impala-2.9.0+cdh5.12.1+0-1.cdh5.12.1.p0.3.el7.x86_64.rpm software. Replace the example path with the actual path to the software package to be scanned.

1
devkit porting pkg-mig -i impala-2.9.0+cdh5.12.1+0-1.cdh5.12.1.p0.3.el7.x86_64.rpm

The following information is displayed and a report is generated:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
Current progress: ################################# [100%]
Scanned time: 2025/03/31 11:27:34

Task Information:
    Task name: 20250331112734
    Software package path: /home/software/impala-2.9.0+cdh5.12.1+0-1.cdh5.12.1.p0.3.el7.x86_64.rpm
    Target OS: openeuler20.03sp1
    Target OS Kernel Version: 4.19.90
    Task Status: Software porting assessment succeeded. Prepare the dependency files based on the suggestions.

Dependency file statistics:
    Adaptable for Compatibility: 6, To be Modified: 25, Total Dependencies: 31

For the detailed information, please check:
/home/DevKit_Software/pkg-mig_20250331032734_6daQmE_zh.csv
/home/DevKit_Software/pkg-mig_20250331032734_6daQmE.html
/home/DevKit_Software/pkg-mig_20250331032734_6daQmE_zh.json

Output Report

Table 2 Output report parameters (using CSV as an example)

Parameter

Description

Scanned Time

Time when the report is generated.

Task Information

Displays the task name, software package path, software package name, target OS, target OS kernel version, and task status.

Dependency File Statistics

Number of architecture-related files on which the software package depends.

Architecture-Related Dependencies

Displays the SO and DLL files.

  • You can click the links provided in the URL column in the report to download the dynamic libraries, static library files, software packages, executable files, and JAR packages that are compatible with the Kunpeng platform. You can also download the source code of the Kunpeng version and compile it. For some non–open-source dependency files, the download URLs are not available. You need to obtain the files yourself and use them to replace the architecture-related dependency files. For details, see Replacing Dependency Files.
  • If the compatibility with the Kunpeng platform is unknown, verify the compatibility on the Kunpeng platform first. If the software is not compatible with the Kunpeng platform, obtain a compatible version from the vendor, obtain the source code and compile it, or use alternative software.
    NOTE:

    If Handling Suggestions indicates that the file is compatible with the Kunpeng platform (the file and link exist in the trustlist used by the tool and the Download button is displayed), the analysis object is a migrated software package or source package, and the x86 dependency file has a corresponding Kunpeng dependency file on the Kunpeng platform. Therefore, you do not need to replace the file.