提交 953c6d5c 编写于 作者: C c00565983 提交者: 马明帅
上级 5b1f96af
### 0.0.5 (2021/06/21)
1、更新llvm版本从10.0.1-53907更新到10.0.1-62608。支撑ipcamera_hispark_taurus_linux编译。
2、增加安装bison、flex、bc、u-boot-tools和gcc-arm-linux-gnueabi。
### 0.0.4 (2021/05/18)
1、更新llvm版本从9.0.0-34042更新到10.0.1-53907。
2、增加安装vim、ssh和git工具。
### 0.0.3(2021/04/26)
增加安装hb工具。
### 0.0.2(2020/12/23)
增加安装工具tzdata、default-jre、default-jdk、nodejs、hmos_app_packing_tool、hapsigntoolv2和hpm-cli工具
### 0.0.1(2020/10/28)
提供OpenHarmony 1.0版本docker编译环境,预装编译依赖工具。
\ No newline at end of file
### 0.0.5 (2021/06/21)
1\. Updated LLVM from 10.0.1-53907 to 10.0.1-62608. Introduced support for ipcamera\_hispark\_taurus\_linux.
2\. Added the installation of Bison, Flex, bc, u-boot-tools, and gcc-arm-linux-gnueabi.
### 0.0.4 (2021/05/18)
1\. Updated LLVM from 9.0.0-34042 to 10.0.1-53907.
2\. Added the installation of the Vim, SSH, and Git tools.
### 0.0.3 (2021/04/26)
Added the installation of the hb tool.
### 0.0.2 (2020/12/23)
Added the installation of the tzdata, default-jre, default-jdk, Node.js, hmos\_app\_packing\_tool, hapsigntoolv2, and hpm-cli tools.
### 0.0.1 (2020/10/28)
Provided a Docker build environment for OpenHarmony 1.0 and pre-installed build dependency tools.
\ No newline at end of file
...@@ -36,6 +36,11 @@ RUN apt-get update -y \ ...@@ -36,6 +36,11 @@ RUN apt-get update -y \
&& DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get -y install tzdata \ && DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get -y install tzdata \
&& apt-get install default-jre -y \ && apt-get install default-jre -y \
&& apt-get install default-jdk -y \ && apt-get install default-jdk -y \
&& apt-get install bison -y \
&& apt-get install flex -y \
&& apt-get install bc -y \
&& apt-get install u-boot-tools -y \
&& apt-get install gcc-arm-linux-gnueabi -y \
&& apt-get install build-essential \ && apt-get install build-essential \
&& apt-get install locales \ && apt-get install locales \
&& locale-gen "en_US.UTF-8" \ && locale-gen "en_US.UTF-8" \
...@@ -49,7 +54,7 @@ RUN apt-get update -y \ ...@@ -49,7 +54,7 @@ RUN apt-get update -y \
&& pip3 install --trusted-host mirrors.aliyun.com -i https://mirrors.aliyun.com/pypi/simple ecdsa \ && pip3 install --trusted-host mirrors.aliyun.com -i https://mirrors.aliyun.com/pypi/simple ecdsa \
&& python3 -m pip install --user ohos-build \ && python3 -m pip install --user ohos-build \
&& mkdir -p /home/tools \ && mkdir -p /home/tools \
&& wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-53907/linux/llvm.tar.gz \ && wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz \
&& wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar \ && wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar \
&& wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz \ && wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz \
&& wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar \ && wget -P /home/tools https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar \
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
OpenHarmony的Docker镜像托管在**HuaweiCloud SWR**上,开发者可以通过该镜像在很大程度上简化编译前的环境配置。 目前容器化构建选项支持情况如下: OpenHarmony的Docker镜像托管在**HuaweiCloud SWR**上,开发者可以通过该镜像在很大程度上简化编译前的环境配置。 目前容器化构建选项支持情况如下:
| 硬件平台 | Docker镜像仓库 | 标签 | 说明 | | Docker镜像仓库 | 标签 | 说明 |
| :----------------------------------------------------------- | :----------------------------------------------------------- | :------ | :--------------------------------------------- | | :----------------------------------------------------------- | :------ | :----------------------------------------------------------- |
| ipcamera_hispark_taurus@hisilicon<br>ipcamera_hispark_aries@hisilicon<br>wifiiot_hispark_pegasus@hisilicon | `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `0.0.4` | 已经预安装Openharmony `0.0.4` 版本的编译环境。 | | `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `0.0.5` | 已经预安装HarmonyOSOpenHarmony版本的编译环境,支持轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)的版本构建。 |
### 使用方式及步骤 ### 使用方式及步骤
...@@ -18,17 +18,18 @@ OpenHarmony的Docker镜像托管在**HuaweiCloud SWR**上,开发者可以通 ...@@ -18,17 +18,18 @@ OpenHarmony的Docker镜像托管在**HuaweiCloud SWR**上,开发者可以通
1. 获取Docker镜像 1. 获取Docker镜像
``` ```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.4 docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
``` ```
2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境
``` ```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.4 docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
``` ```
3. 通过如下命令启动不同平台的编译 3. 通过如下命令启动不同平台的编译
``` ```
hb set #设置工作目录,输入点(.)表示当前目录 hb set #设置工作目录。
在显示的页面中通过键盘上下键选择需要编译的平台,通过回车确定选择 . #输入源码所在目录,点(.)表示当前目录。
hb build -f #执行编译 在显示的页面中通过键盘上下键选择需要编译的平台,通过回车确定选择。
hb build -f #执行编译。
``` ```
#### 方式二:通过Dockerfile 构建本地Docker镜像进行构建 #### 方式二:通过Dockerfile 构建本地Docker镜像进行构建
...@@ -43,11 +44,12 @@ OpenHarmony的Docker镜像托管在**HuaweiCloud SWR**上,开发者可以通 ...@@ -43,11 +44,12 @@ OpenHarmony的Docker镜像托管在**HuaweiCloud SWR**上,开发者可以通
``` ```
4. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境 4. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境
``` ```
docker run -it -v $(pwd):/home/openharmony openharmony-docker:0.0.4 docker run -it -v $(pwd):/home/openharmony openharmony-docker:0.0.5
``` ```
5. 通过如下命令启动不同平台的编译 5. 通过如下命令启动不同平台的编译
``` ```
hb set #设置工作目录,输入点(.)表示当前目录 hb set #设置工作目录。
在显示的页面中通过键盘上下键选择需要编译的平台,通过回车确定选择 . #输入源码所在目录,点(.)表示当前目录。
hb build -f #执行编译 在显示的页面中通过键盘上下键选择需要编译的平台,通过回车确定选择。
hb build -f #执行编译。
``` ```
# OpenHarmony Docker Image
### Docker Image
This document provides guidance on building the Docker image for mini- and small-system devices. For details about how to build the Docker image for standard-system devices, see [OpenHarmony Docker Image](https://gitee.com/openharmony/docs/blob/master/docker/standard/Readme-en.md)
The Docker image of OpenHarmony is hosted on [HUAWEI Cloud SWR](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2Fswr%2F%3Fregion%3Dcn-south-1%26cloud_route_state%3D%2Fapp%2Fwarehouse%2FwarehouseMangeDetail%2Fgoldensir%2Fopenharmony-docker%2Fopenharmony-docker%3Ftype%3DownImage&locale=en-us#/login). Using the Docker image will help simplify environment configurations needed for the building. The following table lists container-based options needed for building in the standalone Docker environment.
| Docker Image Repository | Tag | Description |
| :----------------------------------------------------------- | :------ | :----------------------------------------------------------- |
| `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `0.0.5` | The HarmonyOSOpenHarmony build environment has been pre-installed. This repository applies to Mini-System Devices (reference memory ≥ 128 KB) and Small-System Devices (reference memory ≥ 1 MB). |
### Usage
After configuring the development environments, perform the steps below to access the Docker environment. The following steps use Ubuntu as an example (Windows is also supported).
#### **Method 1: Obtaining the Docker image from HuaweiCloud SWR**:
1. Obtain the Docker image.
```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
```
2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5
```
3. Run the following script to start building for different platforms.
```
hb set # Set the working directory.
. # Enter the directory where the source code is stored. If the code is stored in the current directory, enter a period (.).
Press the Up or Down key to select the platform to build on, then press Enter.
hb build -f # Start building.
```
#### **Method 2: Using the Dockerfile to Build a Local Docker Image**
1. Obtain the Dockerfile script for a local Docker image.
```
git clone https://gitee.com/openharmony/docs.git
```
2. Go to the directory of the Dockerfile code and run the following command to build the Docker image:
```
cd docs/docker
./build.sh
```
4. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
```
docker run -it -v $(pwd):/home/openharmony openharmony-docker:0.0.5
```
5. Run the following script to start building for different platforms.
```
hb set # Set the working directory.
. # Enter the directory where the source code is stored. If the code is stored in the current directory, enter a period (.).
Press the Up or Down key to select the platform to build on, then press Enter.
hb build -f # Start building.
```
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
#!/bin/sh #!/bin/sh
docker build -t openharmony-docker:0.0.4 . docker build -t openharmony-docker:0.0.5 .
### 0.0.1(2021/06/02)
提供OpenHarmony 2.0版本docker编译环境,预装编译依赖工具。
\ No newline at end of file
### 0.0.1(2021/06/02)
Provided a Docker build environment for OpenHarmony 2.0 and pre-installed build dependency tools.
\ No newline at end of file
## Standalone Docker Environment ## Standalone Docker Environment
This document provides guidance on building the Docker image for standard-system devices. For details about how to build the Docker image for mini- and small-system devices, see [OpenHarmony Docker Image]() This document provides guidance on building the Docker image for standard-system devices. For details about how to build the Docker image for mini- and small-system devices, see [OpenHarmony Docker Image](https://gitee.com/openharmony/docs/blob/master/docker/README_en.md)
The Docker image of OpenHarmony is hosted on [HUAWEI Cloud SWR](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2Fswr%2F%3Fregion%3Dcn-south-1%26cloud_route_state%3D%2Fapp%2Fwarehouse%2FwarehouseMangeDetail%2Fgoldensir%2Fopenharmony-docker%2Fopenharmony-docker%3Ftype%3DownImage&locale=en-us#/login). Using the Docker image will help simplify environment configurations needed for the building. After configuring the development environments, perform the steps below to access the Docker environment. The following steps use Ubuntu as an example (Windows is also supported). The Docker image of OpenHarmony is hosted on [HUAWEI Cloud SWR](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2Fswr%2F%3Fregion%3Dcn-south-1%26cloud_route_state%3D%2Fapp%2Fwarehouse%2FwarehouseMangeDetail%2Fgoldensir%2Fopenharmony-docker%2Fopenharmony-docker%3Ftype%3DownImage&locale=en-us#/login). Using the Docker image will help simplify environment configurations needed for the building. After configuring the development environments, perform the steps below to access the Docker environment. The following steps use Ubuntu as an example (Windows is also supported).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册