步骤二:源码迁移
说明:下载的待扫描源码包是能在x86平台上能正常编译的,通过“鲲鹏代码迁移工具”扫描后,识别出在鲲鹏平台上需要适配修改的代码,通过修改,达到能在鲲鹏平台上正常编译和使用的目的,从而实现源码迁移。
1. 准备Megahit源码
(1)打开Terminal窗口
(2)进入“鲲鹏代码迁移工具”源码文件存放路径
cd /opt/portadv/portadmin/sourcecode/
(3)下载Megahit源码
git clone https://github.com/voutcn/megahit.git
(4)将代码进行合并
cd megahit/ && git submodule update --init
(5)创建构建文件夹并进入
mkdir build && cd build
(6)生成Makefile文件
cmake .. -DCMAKE_BUILD_TYPE=Release
(7)修改megahit目录属组
cd ../ && chown -R porting:porting *
说明:porting工具的待扫描的源码目录群组必须为porting才能扫描

步骤二:源码迁移
说明:下载的待扫描源码包是能在x86平台上能正常编译的,通过“鲲鹏代码迁移工具”扫描后,识别出在鲲鹏平台上需要适配修改的代码,通过修改,达到能在鲲鹏平台上正常编译和使用的目的,从而实现源码迁移。
1. 准备Megahit源码
(1)打开Terminal窗口
(2)进入“鲲鹏代码迁移工具”源码文件存放路径
cd /opt/portadv/portadmin/sourcecode/
(3)下载Megahit源码
git clone https://github.com/voutcn/megahit.git
(4)将代码进行合并
cd megahit/ && git submodule update --init
(5)创建构建文件夹并进入
mkdir build && cd build
(6)生成Makefile文件
cmake .. -DCMAKE_BUILD_TYPE=Release
(7)修改megahit目录属组
cd ../ && chown -R porting:porting *
说明:porting工具的待扫描的源码目录群组必须为porting才能扫描