当前位置:网站首页>[play with Huawei cloud] Kunpeng devkit migration practice

[play with Huawei cloud] Kunpeng devkit migration practice

2022-06-10 17:06:00 Hua Weiyun

1. Preface

Kunpeng development kit DevKit Provide migration for the entire R & D workflow 、 Code development 、 Compile debugging 、 test 、 Performance analysis and tuning 、 System diagnosis and other capabilities , Realize rapid migration and minimalist development of massive applications to Kunpeng platform , It is convenient for developers to quickly develop Kunpeng friendly high-performance software .

2. actual combat

2.1 Actual combat content

Use the scan migration tool for source code analysis , Modify the source code according to the scanning suggestions , Let the source code compile and run normally on the Kunpeng platform .

2.2 Premise of operation

2.2.1 Application resources

1) Watch the actual video of the migration tool carefully .

Migrating live video :https://www.hikunpeng.com/zh/developer/live/detail/1534417825342652417

2) Apply for remote laboratory in Kunpeng community ,

https://www.hikunpeng.com/zh/developer/devkit

Click cloud test service

image-20220610113436007

Click to enter the remote laboratory

image-20220610113714463

Click Apply now

Apply for free Kunpeng virtualization environment through email (Kunpeng 920 | 8vCPU | 16GB Memory | 200GB System disk ), Kunpeng development kit has been pre installed in the environment Kunpeng DevKit.

image-20220610114720175

Operating system selection OpenEuler

image-20220610114825071

Successful application

image-20220610114856170

image-20220610114918720

2.2.2 install finalshell

finalshell For remote ssh Login tools

finalshell Download link

http://www.hostbuf.com/t/988.html

2.2.3 install uin-vpn

Download link :http://www.leagsoft.com/doc/article/103107.html

Click the new link

image-20220610120158059

Enter the information obtained in the mailbox and log in

image-20220610120455456

Login again finalshell

image-20220610121149407

2.2.3 Source download

1) Get into “ Kunpeng code migration tool ” Source file storage path .

cd /opt/portadv/portadmin/sourcecode/

image-20220610121354062

2) download Megahit Source code .

git clone https://github.com/voutcn/megahit.git

image-20220610130007576

3) Merge the code .

cd megahit/ && git submodule update

image-20220610133411453

4) Create the build folder and go to .

mkdir build && cd build

image-20220610133424961

Tips : Manual installation is required here cmake

5) Generate Makefile file .

cmake -DCMAKE_BUILD_TYPE=Release

image-20220610141728876

6) modify megahit Catalogue group .

cd …/ && chown -R porting:porting *

image-20220610141749000

3. Code migration

Log in to the migration website platform https://172.36.86.41:8084/

image-20220610120655133

image-20220610141804390

1) Source code analysis parameter filling

2) Start a source migration task , The task was executed successfully , View the source code report .

image-20220610143108111

Click start analysis

image-20220610143029056

The lower left corner can display the progress of source migration analysis

image-20220610143123992

The compiler version can only be selected here GCC, Unable to select the Pentium compiler in the legend

After the report is generated, click View report

image-20220610143956872

3) Click report source code migration suggestions , View the files to be migrated .

image-20220610144139789

4) Modify according to the modification suggestions prompted by the system .

image-20220610144217874

5) Recompile after migration , View the compilation results .

img

6) Run the program , View echo information .

img

4. Experimental experience

4.1 cmake install

You need to configure yourself in the experiment cmake Environmental Science

  1. download cmake-3.12.2.tar.gz:

wget https://github.com/Kitware/CMake/releases/download/v3.13.2/cmake-3.13.2.tar.gz

  1. decompression :

tar -zxvf cmake-3.13.2.tar.gz

  1. Go to unzip directory :

cd cmake-3.13.2

  1. Execute the command to install :

./bootstrap && make && make install

  1. View version information , And check if the installation is successful

cmake -version

After studying this article , Have a certain understanding of cross platform software migration , At the same time, master the use of code migration tools , Be able to skillfully use migration tools to perform migration tasks .

原网站

版权声明
本文为[Hua Weiyun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101605115692.html