OpenHarmony开发者论坛

标题: 编译OpenHarmony 4.0 bete2及master分支,添加参数--no-prebuilt-sdk跳过编译sdk [打印本页]

作者: 润开鸿_贾佳豪    时间: 2023-11-27 11:39
标题: 编译OpenHarmony 4.0 bete2及master分支,添加参数--no-prebuilt-sdk跳过编译sdk
[md]- 笔者之前使用的OpenHarmony 版本是3.2 release ,后来更新到4.0beta2后。编译出现了一些问题,自己排查了好久,才发现是4.0beta2及之后版本执行./build.sh --product-name rk3568 --ccache 命令会默认先编译sdk和sdk-public,sh脚本再执行固件的编译。因此在编译OpenHarmony4.0Beta2的时候需要安装编译sdk的依赖 (编译镜像的时候是不依赖这些包的)

```
sudo apt-get install libxcursor-dev libxrandr-dev libxinerama-dev
```

![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_552,h_274)

- 执行build.sh脚本进行编译时,有什么办法跳过sdk的编译吗?答案如下

## 添加 --no-prebuilt-sdk 跳过默认进行的sdk的编译

例如编译dayu200时,添加`--no-prebuilt-sdk`会直接开始固件的编译

```
./build.sh --product-name rk3568 --ccache --no-prebuilt-sdk
```

![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_611)

## 仓库相关pr和issues

- https://gitee.com/openharmony/bu ... f5bc81c826b71cdec02
  ![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_146)
- https://gitee.com/openharmony/bu ... 86e697b84810edc1db3
  ![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_157)
- https://gitee.com/openharmony/bu ... ?from=project-issue
  ![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_957)

## ps

感谢build仓库成员耐心解答

- https://gitee.com/openharmony/build/issues/I80ZZQ

[/md]




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5