开源鸿蒙龙架构移植
arkcompiler toolchain | 方舟工具链
Obtaining device status | 获取设备状态
device_soc_loongson
开源鸿蒙5.1版本: 请阅读此文档
完整仓库由 2 部分组成:
master 分支。master 分支打补丁,并命名为 ohos-main 分支。fork 仓库的 ohos-main 分支,可能会落后于主线 master 分支,在持续向上游提交补丁过程中,会不定期 rebase,并解决问题。
具体仓库列表可参见文件: https://gitee.com/openharmony-loongarch/manifest/blob/ohos-main/loongarch.xml
以下 A、B 两种方式可任选其中一种:
openharmony_loongarch,并进入此目录mkdir openharmony_loongarch
cd openharmony_loongarch
如果发行版仓库没有的话,可从此处下载 repo, 并保存在 PATH 环境变量所指定的目录中
export PATH=~/bin:$PATH
mkdir -p ~/bin/
curl https://gitee.com/oschina/repo/raw/main/repo -o ~/bin/repo
chmod +x ~/bin/repo
repo init -u https://gitee.com/openharmony-loongarch/manifest.git -b ohos-main -m loongarch.xml --no-repo-verify -v
repo sync -c
repo forall -c 'git lfs pull'
./build/prebuilts_download.sh
将方式一的操作步骤自动化,自动下载 OHOS 源码及支持 LoongArch 架构的工具链,只需运行下面这条命令:
$ curl -s -k https://gitee.com/openharmony-loongarch/devtools/raw/ohos-main/start.sh | bash -
最小化标准系统虚拟机镜像移植,运行以下命令开始编译:
./build.sh --product-name qemu-loongarch64-linux-min --ccache --gn-args ohos_extra_cppflags="-Wno-format"
OpenHarmony全量接口的SDK,运行以下命令开始编译:
./build.sh --product-name ohos-sdk --gn-args ohos_extra_cppflags="-Wno-format"
使用 3A5000/3A6000 CPU 的 7A 系列主板标准 PC 系统,运行以下命令开始编译:
./build.sh --product-name ls3a5000@loongson --ccache --gn-args ohos_extra_cppflags="-Wno-format"
待补充