# devtools **Repository Path**: dbhrscom/devtools ## Basic Information - **Project Name**: devtools - **Description**: Devtools for Openhamony LoongArch - **Primary Language**: Shell - **License**: GPL-2.0 - **Default Branch**: ohos-main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-06-02 - **Last Updated**: 2025-06-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 开源鸿蒙(OHOS)龙架构(LoongArch)主线移植项目 ## 一、开发环境准备 以下 A、B 两种方式可任选其中一种: ### A. 方式一(手动) 1. 创建项目目录 `openharmony_loongarch`,并进入此目录 ``` mkdir openharmony_loongarch cd openharmony_loongarch ``` 2. 安装 repo 命令 如果发行版仓库没有的话,可从此处下载 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 ``` 3. 下载代码 ``` 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' ``` 4. 执行预编译下载,安装编译工具链及Sdk。 ``` ./build/prebuilts_download.sh ``` ### B. 方式二(自动) 将方式一的操作步骤自动化,自动下载 OHOS 源码及支持 LoongArch 架构的工具链,只需运行下面这条命令: ``` $ curl -s -k https://gitee.com/openharmony-loongarch/devtools/raw/ohos-main/start.sh | bash - ``` ## 二、编译项目 1. 编译虚拟机镜像 最小化标准系统虚拟机镜像移植,运行以下命令开始编译: ``` ./build.sh --product-name qemu-loongarch64-linux-min --ccache ``` 2. 编译 ohos-sdk OpenHarmony全量接口的SDK,运行以下命令开始编译: ``` ./build.sh --product-name ohos-sdk ``` 3. 编译龙架构PC镜像 使用 3A5000/3A6000 CPU 的 7A 系列主板标准 PC 系统,运行以下命令开始编译: ``` ./build.sh --product-name ls3a5000@loongson --ccache ``` ## 三、镜像安装测试 待补充 ## 四、主线合并进度跟踪 [跟踪链接](https://gitee.com/openharmony-loongarch/devtools/issues/IBN2XK)