Porting Advisor CLI
The Porting Advisor is one of the tools provided by the Kunpeng DevKit. It runs on the x86 or Kunpeng platform and works in VS Code, WebUI, or CLI mode. The Porting Advisor CLI performs the following functions:
- Source code porting: Checks and analyzes source files in C/C++/ASM/Fortran/interpreted languages, identifies the code to be ported, and provides porting suggestions. It also supports source code editing and one-click code replacement.
- Software porting assessment: Analyzes the software packages (non-source packages) and installed software to be ported, and assesses the porting feasibility.
You can integrate the Porting Advisor CLI in the CI/CD pipeline to intercept code that does not adapt to the Kunpeng server.
For details about how to use the Porting Advisor CLI, see Source Code Porting (CLI) in the Kunpeng DevKit Source Code Porting User Guide and Software Porting Assessment (CLI) in the Kunpeng DevKit Software Porting Assessment User Guide.
Software Porting Assessment
The software porting assessment function analyzes the SO library files in the software installation path in the x86 environment and checks whether these files are compatible with the Kunpeng platform.
Syntax:
devkit porting pkg-mig {-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]
Source Code Porting
The source code porting function analyzes the portability of software written in C/C++/ASM/Fortran/Go or an interpreted language.
Syntax:
devkit porting src-mig {-i INPUT_PATH | --input INPUT_PATH} {-c 'command' | --cmd 'command'} [-s {c|c++|asm|fortran|go| interpreted}* | --source-type {c|c++|asm|fortran|go| interpreted}*] [-t target_os | --target-os target_os] [-p compiler_version | --compiler compiler_version] [-f fortran-compiler-version | --fortran-compiler fortran-compiler-version] [-o OUTPUT_PATH | --output OUTPUT_PATH] [-b {make,cmake,automake,go} | --build-tool {make,cmake,automake,go}] [-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] [--ignore ignore_file] [--macro MACRO] [--keep-going {True,False}] [--ignore-path IGNORE_PATH]