OpenHarmony开发者论坛
标题:
通过特定命令单独获取OpenHarmony标准、轻量、小型系统指定开发板的代码
[打印本页]
作者:
离北况归
时间:
2023-10-17 15:25
标题:
通过特定命令单独获取OpenHarmony标准、轻量、小型系统指定开发板的代码
[md]- 当社区每推出一个OpenHarmony版本,笔者通常都是拉取全量代码,里面包含标准、轻量、小型系统的各个芯片平台开发板的全部代码。
- 有时候需要只拉取主干仓库上RK3568芯片的dayu200开发板或者hi3861的代码该怎么做呢
---
## 1.只下载RK3568芯片的dayu200开发板相关代码,并且编译
```
# 下载master版本RK3568源码
repo init -u
https://gitee.com/openharmony/manifest
-b master -m chipsets/dayu200.xml -g ohos:standard
repo sync -c
repo forall -c 'git lfs pull'
# 安装依赖
./build/build_scripts/env_setup.sh
source ~/.bashrc
# 下载编译工具
bash build/prebuilts_download.sh
# 编译RK3568,添加 --no-prebuilt-sdk 跳过默认进行的sdk的编译
./build.sh --product-name rk3568--ccache --no-prebuilt-sdk
```
https://gitee.com/openharmony/manifest
## 2.只下载RK3588芯片的dayu210开发板相关代码,并且编译
```
# 下载master版本RK3568源码
repo init -u
https://gitee.com/openharmony/manifest
-b master -m chipsets/dayu210.xml -g ohos:standard
repo sync -c
repo forall -c 'git lfs pull'
# 安装依赖
./build/build_scripts/env_setup.sh
source ~/.bashrc
# 下载编译工具
bash build/prebuilts_download.sh
# 编译RK3588,添加 --no-prebuilt-sdk 跳过默认进行的sdk的编译
./build.sh --product-name dayu210 --ccache --no-prebuilt-sdk
```
- `-m chipsets/dayu210/dayu210.xml` 和 `-m chipsets/dayu210.xml` 的区别
- /dayu210/dayu210.xml会单独拉device_board_hihope和device_soc_rockchip和vendor_hihope,/dayu210.xml是拉dayu210整个代码
## 3.只下载hi3861开发板相关代码,并且编译
1. 下载master版本hi3861源码并且编译
```
# 下载master版本hi3861源码
repo init -u
https://gitee.com/openharmony/manifest
-b master -m chipsets/hispark_pegasus.xml -g ohos:mini
repo sync -c
repo forall -c 'git lfs pull'
# 安装依赖
./build/build_scripts/env_setup.sh
source ~/.bashrc
# 下载编译工具
bash build/prebuilts_download.sh
# 编译hi3861,添加 --no-prebuilt-sdk 跳过默认进行的sdk的编译
./build.sh --product-name wifiiot_hispark_pegasus --ccache --no-prebuilt-sdk
```
2.下载3.2r版本hi3861源码
```
# 下载3.2r版本hi3861源码
repo init -u
https://gitee.com/openharmony/manifest
-b refs/tags/OpenHarmony-v3.2-Release -m chipsets/hispark_pegasus.xml -g ohos:mini
repo sync -c
repo forall -c 'git lfs pull'
# 安装依赖
./build/build_scripts/env_setup.sh
source ~/.bashrc
# 下载编译工具
bash build/prebuilts_download.sh
# 编译hi3861
./build.sh --product-name wifiiot_hispark_pegasus --ccache
```
![image.png](
https://dl-harmonyos.51cto.com/i ... rocess=image/resize
,w_820,h_703)
## 4.参考资料
更多不同芯片开发板的代码拉取,请参考
https://gitee.com/openharmony/manifest
[/md]
欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/)
Powered by Discuz! X3.5