提交 ab8e075a 编写于 作者: O openharmony_ci 提交者: Gitee

!708 更新标准系统docker镜像版本

Merge pull request !708 from 丛林/OpenHarmony-3.0-LTS
### 0.0.4(2021/09/18)
1、删除编译依赖的工具预装。
2、增加安装ruby。
### 0.0.3(2021/08/30) ### 0.0.3(2021/08/30)
1、更新llvm版本从10.0.1-62608更新到10.0.1-69957。 1、更新llvm版本从10.0.1-62608更新到10.0.1-69957。
......
### 0.0.2(2021/08/11) ### 0.0.4(2021/09/18)
1\. dropped pre-installed build dependency tools.
2\. Added the installation of ruby.
### 0.0.3(2021/08/30)
1\. Updated LLVM from 10.0.1-62608 to 10.0.1-69957. 1\. Updated LLVM from 10.0.1-62608 to 10.0.1-69957.
......
...@@ -10,11 +10,11 @@ The Docker image of OpenHarmony is hosted on [HUAWEI Cloud SWR](https://auth.hua ...@@ -10,11 +10,11 @@ The Docker image of OpenHarmony is hosted on [HUAWEI Cloud SWR](https://auth.hua
1. Obtain the Docker image. 1. Obtain the Docker image.
``` ```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: 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-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
##### **Method 2: Using the Dockerfile to Build a Local Docker Image** ##### **Method 2: Using the Dockerfile to Build a Local Docker Image**
...@@ -30,15 +30,12 @@ cd docs/docker/standard ...@@ -30,15 +30,12 @@ cd docs/docker/standard
``` ```
3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: 3. 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-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.4
``` ```
### Building for Standard-System Devices (reference memory ≥ 128 MB) ### Building for Standard-System Devices (reference memory ≥ 128 MB)
1. Run the preprocessing script in the root directory of the source code. Run the following script to start building for Standard-System Devices (reference memory ≥ 128 MB)
```
../scripts/prepare.sh
```
2. Run the following script to start building for Standard-System Devices (reference memory ≥ 128 MB)
``` ```
./build.sh --product-name {product_name} ./build.sh --product-name {product_name}
``` ```
......
...@@ -10,11 +10,11 @@ OpenHarmony的Docker镜像托管在HuaweiCloud SWR上。开发者可以通过该 ...@@ -10,11 +10,11 @@ OpenHarmony的Docker镜像托管在HuaweiCloud SWR上。开发者可以通过该
1. 获取Docker镜像。 1. 获取Docker镜像。
``` ```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。
``` ```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
##### 方式二:通过Dockerfile 构建本地Docker镜像进行构建 ##### 方式二:通过Dockerfile 构建本地Docker镜像进行构建
...@@ -30,15 +30,12 @@ cd docs/docker/standard ...@@ -30,15 +30,12 @@ cd docs/docker/standard
``` ```
3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。
``` ```
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.4
``` ```
### 编译源码-标准系统类设备(参考内存≥128MB) ### 编译源码-标准系统类设备(参考内存≥128MB)
1. 在源码的根目录执行预处理脚本。 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。
```
../scripts/prepare.sh
```
2. 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。
``` ```
./build.sh --product-name {product_name} ./build.sh --product-name {product_name}
``` ```
......
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
#!/bin/sh #!/bin/sh
docker build -t openharmony-docker-standard:0.0.3 . docker build -t openharmony-docker-standard:0.0.4 .
...@@ -17,14 +17,11 @@ WORKDIR /home/openharmony ...@@ -17,14 +17,11 @@ WORKDIR /home/openharmony
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
ARG PREBUILTS_DIR=/home/prebuilts ARG PREBUILTS_DIR=/home/prebuilts
ARG HOME_TOOLS=/home/tools ARG HOME_TOOLS=/home/tools
ARG HOME_SCRIPTS=/home/scripts
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
COPY sources.list /etc/apt COPY sources.list /etc/apt
COPY prebuilts_download.sh prepare.sh $HOME_SCRIPTS/
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y \ && apt-get install -y \
apt-utils \ apt-utils \
...@@ -85,9 +82,10 @@ RUN apt-get update \ ...@@ -85,9 +82,10 @@ RUN apt-get update \
libc6-dev-i386 \ libc6-dev-i386 \
lib32z-dev \ lib32z-dev \
openjdk-8-jdk \ openjdk-8-jdk \
ruby \
&& rm -rf /bin/sh \ && rm -rf /bin/sh \
&& ln -s /bin/bash /bin/sh \ && ln -s /bin/bash /bin/sh \
&& mkdir -p $PREBUILTS_DIR/prebuilts $HOME_TOOLS $HOME_SCRIPTS && mkdir -p $PREBUILTS_DIR/prebuilts $HOME_TOOLS
RUN wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12.18.4-linux-x64.tar.gz \ RUN wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12.18.4-linux-x64.tar.gz \
&& wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12.18.4-darwin-x64.tar.gz \ && wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12.18.4-darwin-x64.tar.gz \
...@@ -98,7 +96,4 @@ RUN wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12 ...@@ -98,7 +96,4 @@ RUN wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12
&& export PATH=$PATH:$PREBUILTS_DIR/prebuilts/node-v12.18.4-linux-x64/bin \ && export PATH=$PATH:$PREBUILTS_DIR/prebuilts/node-v12.18.4-linux-x64/bin \
&& export PATH=$PATH:$PREBUILTS_DIR/prebuilts/hc-gen \ && export PATH=$PATH:$PREBUILTS_DIR/prebuilts/hc-gen \
&& rm -rf $HOME_TOOLS \ && rm -rf $HOME_TOOLS \
&& chmod -R 777 $HOME_SCRIPTS/*.sh \
&& $HOME_SCRIPTS/prebuilts_download.sh \
&& rm -rf /tmp/prebuilts \
&& npm install -g @ohos/hpm-cli --registry https://registry.npm.taobao.org && npm install -g @ohos/hpm-cli --registry https://registry.npm.taobao.org
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
# 代码下载目录
code_dir=/home/prebuilts
# 二进制所在目录,用于临时存放二进制,二进制整个大小约10G,请确保有足够的空间
bin_dir=/tmp/prebuilts
# 二进制关系
copy_config="""
prebuilts/cmake,https://repo.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/darwin/cmake-darwin-x86-3.16.5.tar.gz
prebuilts/cmake,https://repo.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/linux/cmake-linux-x86-3.16.5.tar.gz
prebuilts/cmake,https://repo.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/windows/cmake-windows-x86-3.16.5.tar.gz
prebuilts/build-tools/darwin-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/darwin/gn-darwin-x86-1717.tar.gz
prebuilts/build-tools/linux-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz
prebuilts/build-tools/darwin-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.10.1/darwin/ninja-darwin-x86-1.10.1.tar.gz
prebuilts/build-tools/linux-x86/bin,https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.10.1/linux/ninja-linux-x86-1.10.1.tar.gz
prebuilts/python,https://repo.huaweicloud.com/harmonyos/compiler/python/3.8.5/darwin/python-darwin-x86-3.8.5.tar.gz
prebuilts/python,https://repo.huaweicloud.com/harmonyos/compiler/python/3.8.5/linux/python-linux-x86-3.8.5.tar.gz
prebuilts/mingw-w64/ohos/linux-x86_64,https://repo.huaweicloud.com/harmonyos/compiler/mingw-w64/7.0.0/clang-mingw.tar.gz
prebuilts,https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar
prebuilts/gcc/linux-x86/arm,https://repo.huaweicloud.com/harmonyos/compiler/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi/1.0/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi.tar.gz
prebuilts/gcc/linux-x86/aarch64,https://repo.huaweicloud.com/harmonyos/compiler/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi/1.0/gcc-linaro-7.5.0-2019.12-x86_64-aarch64-linux-gnu.tar.xz
prebuilts/sdk/js-loader/build-tools,https://repo.huaweicloud.com/harmonyos/compiler/ace-loader/1.0/ace-loader.tar.gz
prebuilts/clang/ohos/linux-x86_64,https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-69957/linux/clang-69957-linux-x86_64.tar.bz2
prebuilts/build-tools/common,https://repo.huaweicloud.com/harmonyos/compiler/restool/1.023-c/restool.tar.gz
"""
if [ ! -d "${bin_dir}" ];then
mkdir -p "${bin_dir}"
fi
for i in `echo ${copy_config}`
do
unzip_dir=`echo $i|awk -F ',' '{print $1}'`
huaweicloud_url=`echo $i|awk -F ',' '{print $2}'`
md5_huaweicloud_url=`echo ${huaweicloud_url}|md5sum|awk '{print $1}'`
bin_file=`basename ${huaweicloud_url}`
bin_file_suffix=${bin_file#*.}
#huaweicloud_file_name=`echo ${huaweicloud_url}|awk -F '/' '{print $NF}'`
if [ ! -d "${code_dir}/${unzip_dir}" ];then
mkdir -p "${code_dir}/${unzip_dir}"
fi
if [ ! -f "${bin_dir}/${md5_huaweicloud_url}.${bin_file_suffix}" ];then
# 代理不需要鉴权: wget -P ${bin_dir} -e "https_proxy=http://domain.com:port" ${huaweicloud_url}
# 代理需要鉴权(账号密码特殊字符均需要URL转义): wget -P ${bin_dir} -e "https_proxy=http://username:password@domain.com:port" ${huaweicloud_url}
# 不需要代理
wget -O ${bin_dir}/${md5_huaweicloud_url}.${bin_file_suffix} ${huaweicloud_url}
fi
if [ "X${bin_file_suffix:0-3}" = "Xzip" ];then
unzip "${bin_dir}/${md5_huaweicloud_url}.${bin_file_suffix}" -d "${code_dir}/${unzip_dir}/"
elif [ "X${bin_file_suffix:0-6}" = "Xtar.gz" ];then
tar -xvzf "${bin_dir}/${md5_huaweicloud_url}.${bin_file_suffix}" -C "${code_dir}/${unzip_dir}"
else
tar -xvf "${bin_dir}/${md5_huaweicloud_url}.${bin_file_suffix}" -C "${code_dir}/${unzip_dir}"
fi
done
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
WORKDIR=/home/openharmony
TOOLSDIR=/home/prebuilts/prebuilts
rm -rf /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
if [[ -d $WORKDIR/third_party/jsframework ]]; then
echo copy jsframework node_modules
cd $WORKDIR/third_party/jsframework
npm install --registry https://registry.npm.taobao.org
fi
if [[ -d $TOOLSDIR/build-tools/common/js-framework ]]; then
rm -rf $TOOLSDIR/build-tools/common/js-framework
fi
mkdir -p $TOOLSDIR/build-tools/common/js-framework
cp -r $WORKDIR/third_party/jsframework/node_modules $TOOLSDIR/build-tools/common/js-framework
if [[ -d $TOOLSDIR/build-tools/common/nodejs ]]; then
rm -rf $TOOLSDIR/build-tools/common/nodejs
fi
mkdir -p $TOOLSDIR/build-tools/common/nodejs
cp -r $TOOLSDIR/node-v12.18.4-linux-x64 $TOOLSDIR/build-tools/common/nodejs
cp -r $TOOLSDIR/node-v12.18.4-darwin-x64 $TOOLSDIR/build-tools/common/nodejs
if [[ -h $WORKDIR/prebuilts/cmake ]]; then
rm $WORKDIR/prebuilts/cmake
fi
echo link cmake
ln -s $TOOLSDIR/cmake $WORKDIR/prebuilts/cmake
if [[ -h $WORKDIR/prebuilts/build-tools ]]; then
rm $WORKDIR/prebuilts/build-tools
fi
echo link build-tools
ln -s $TOOLSDIR/build-tools $WORKDIR/prebuilts/build-tools
if [[ -h $WORKDIR/prebuilts/python ]]; then
rm $WORKDIR/prebuilts/python
fi
echo link python
ln -s $TOOLSDIR/python $WORKDIR/prebuilts/python
if [[ -h $WORKDIR/prebuilts/mingw-w64 ]]; then
rm $WORKDIR/prebuilts/mingw-w64
fi
echo link mingw-w64
ln -s $TOOLSDIR/mingw-w64 $WORKDIR/prebuilts/mingw-w64
mv $TOOLSDIR/clang/ohos/linux-x86_64/clang-69957 $TOOLSDIR/clang/ohos/linux-x86_64/llvm
if [[ -h $WORKDIR/prebuilts/clang ]]; then
rm $WORKDIR/prebuilts/clang
fi
echo link clang
ln -snf 10.0.1 $TOOLSDIR/clang/ohos/linux-x86_64/llvm/lib/clang/current
ln -s $TOOLSDIR/clang $WORKDIR/prebuilts/clang
mv $TOOLSDIR/gcc/linux-x86/arm/prebuilts_gcc_linux-x86_arm_gcc-linaro-7.5.0-arm-linux-gnueabi $TOOLSDIR/gcc/linux-x86/arm/gcc-linaro-7.5.0-arm-linux-gnueabi
if [[ -h $WORKDIR/prebuilts/gcc ]]; then
rm $WORKDIR/prebuilts/gcc
fi
echo link gcc
ln -s $TOOLSDIR/gcc $WORKDIR/prebuilts/gcc
if [[ -h $WORKDIR/prebuilts/sdk ]]; then
rm $WORKDIR/prebuilts/sdk
fi
echo link sdk
ln -s $TOOLSDIR/sdk $WORKDIR/prebuilts/sdk
...@@ -52,7 +52,7 @@ OpenHarmony provides the following two types of Docker environments for you to q ...@@ -52,7 +52,7 @@ OpenHarmony provides the following two types of Docker environments for you to q
</td> </td>
<td class="cellrowborder" valign="top" headers="mcps1.2.6.1.3 "><p id="p552616549297"><a name="p552616549297"></a><a name="p552616549297"></a>swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard</p> <td class="cellrowborder" valign="top" headers="mcps1.2.6.1.3 "><p id="p552616549297"><a name="p552616549297"></a><a name="p552616549297"></a>swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard</p>
</td> </td>
<td class="cellrowborder" valign="top" headers="mcps1.2.6.1.4 "><p id="p1633303300"><a name="p1633303300"></a><a name="p1633303300"></a>0.0.3</p> <td class="cellrowborder" valign="top" headers="mcps1.2.6.1.4 "><p id="p1633303300"><a name="p1633303300"></a><a name="p1633303300"></a>0.0.4</p>
</td> </td>
</tr> </tr>
<tr id="row5986201731214"><td class="cellrowborder" align="center" valign="top" width="15.831583158315832%" headers="mcps1.2.6.1.1 "><p id="p136981216143"><a name="p136981216143"></a><a name="p136981216143"></a>HPM-based Docker environment</p> <tr id="row5986201731214"><td class="cellrowborder" align="center" valign="top" width="15.831583158315832%" headers="mcps1.2.6.1.1 "><p id="p136981216143"><a name="p136981216143"></a><a name="p136981216143"></a>HPM-based Docker environment</p>
...@@ -69,6 +69,7 @@ OpenHarmony provides the following two types of Docker environments for you to q ...@@ -69,6 +69,7 @@ OpenHarmony provides the following two types of Docker environments for you to q
</tbody> </tbody>
</table> </table>
## Preparations<a name="section7337134183512"></a> ## Preparations<a name="section7337134183512"></a>
Before using the Docker environment, perform the following operations: Before using the Docker environment, perform the following operations:
...@@ -178,7 +179,7 @@ hb set ...@@ -178,7 +179,7 @@ hb set
1. Obtain the Docker image. 1. Obtain the Docker image.
``` ```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: 2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
...@@ -212,21 +213,15 @@ hb set ...@@ -212,21 +213,15 @@ hb set
### Building for Standard-System Devices \(reference memory ≥ 128 MB\)<a name="section193711513406"></a> ### Building for Standard-System Devices \(reference memory ≥ 128 MB\)<a name="section193711513406"></a>
1. Run the preprocessing script in the root directory of the source code. Run the following script to start building for standard-system devices \(reference memory ≥ 128 MB\).
```
../scripts/prepare.sh
```
2. Run the following script to start building for standard-system devices \(reference memory ≥ 128 MB\).
``` ```
./build.sh --product-name {product_name} ./build.sh --product-name {product_name}
``` ```
**product\_name** indicates the platform supported by the current distribution, for example, Hi3516D V300. **product\_name** indicates the platform supported by the current distribution, for example, Hi3516D V300.
Files generated during building are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. Files generated during building are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory.
>![](../public_sys-resources/icon-note.gif) **NOTE:** >![](../public_sys-resources/icon-note.gif) **NOTE:**
...@@ -307,4 +302,3 @@ Start building. Docker can be automatically installed only in Ubuntu. If you are ...@@ -307,4 +302,3 @@ Start building. Docker can be automatically installed only in Ubuntu. If you are
hpm run distWithDocker solution={product} hpm run distWithDocker solution={product}
``` ```
...@@ -44,6 +44,7 @@ Method 1 \(recommended\): Use the **repo** tool to download the source code ov ...@@ -44,6 +44,7 @@ Method 1 \(recommended\): Use the **repo** tool to download the source code ov
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c repo sync -c
repo forall -c 'git lfs pull' repo forall -c 'git lfs pull'
bash build/prebuilts_download.sh
``` ```
Method 2: Use the **repo** tool to download the source code over HTTPS. Method 2: Use the **repo** tool to download the source code over HTTPS.
...@@ -52,6 +53,7 @@ Method 2: Use the **repo** tool to download the source code over HTTPS. ...@@ -52,6 +53,7 @@ Method 2: Use the **repo** tool to download the source code over HTTPS.
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c repo sync -c
repo forall -c 'git lfs pull' repo forall -c 'git lfs pull'
bash build/prebuilts_download.sh
``` ```
## Obtaining the Docker Environment<a name="section181431248132513"></a> ## Obtaining the Docker Environment<a name="section181431248132513"></a>
...@@ -61,13 +63,13 @@ repo forall -c 'git lfs pull' ...@@ -61,13 +63,13 @@ repo forall -c 'git lfs pull'
1. Obtain the Docker image. 1. Obtain the Docker image.
``` ```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: 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-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
...@@ -89,27 +91,21 @@ repo forall -c 'git lfs pull' ...@@ -89,27 +91,21 @@ repo forall -c 'git lfs pull'
3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: 3. 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-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.4
``` ```
## Building Source Code<a name="section92391739152318"></a> ## Building Source Code<a name="section92391739152318"></a>
1. Run the preprocessing script in the root directory of the source code. 1. Run the following script to start building for Standard-System Devices \(reference memory ≥ 128 MB\):
``` ```
../scripts/prepare.sh ./build.sh --product-name {product_name}
``` ```
2. Run the following script to start building for Standard-System Devices \(reference memory ≥ 128 MB\):
```
./build.sh --product-name {product_name}
```
**product\_name** indicates the product supported by the current distribution, for example, **Hi3516DV300**. **product\_name** indicates the product supported by the current distribution, for example, **Hi3516DV300**.
Files generated during the build are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. Files generated during the build are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory.
3. Burn the image. For details, see [Burning Images](quickstart-standard-burn.md). 3. Burn the image. For details, see [Burning Images](quickstart-standard-burn.md).
......
...@@ -52,7 +52,7 @@ OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完 ...@@ -52,7 +52,7 @@ OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完
</td> </td>
<td class="cellrowborder" valign="top" headers="mcps1.2.6.1.3 "><p id="p552616549297"><a name="p552616549297"></a><a name="p552616549297"></a>swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard</p> <td class="cellrowborder" valign="top" headers="mcps1.2.6.1.3 "><p id="p552616549297"><a name="p552616549297"></a><a name="p552616549297"></a>swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard</p>
</td> </td>
<td class="cellrowborder" valign="top" headers="mcps1.2.6.1.4 "><p id="p1633303300"><a name="p1633303300"></a><a name="p1633303300"></a>0.0.3</p> <td class="cellrowborder" valign="top" headers="mcps1.2.6.1.4 "><p id="p1633303300"><a name="p1633303300"></a><a name="p1633303300"></a>0.0.4</p>
</td> </td>
</tr> </tr>
<tr id="row5986201731214"><td class="cellrowborder" align="center" valign="top" width="15.831583158315832%" headers="mcps1.2.6.1.1 "><p id="p136981216143"><a name="p136981216143"></a><a name="p136981216143"></a>HPM Docker环境</p> <tr id="row5986201731214"><td class="cellrowborder" align="center" valign="top" width="15.831583158315832%" headers="mcps1.2.6.1.1 "><p id="p136981216143"><a name="p136981216143"></a><a name="p136981216143"></a>HPM Docker环境</p>
...@@ -69,6 +69,7 @@ OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完 ...@@ -69,6 +69,7 @@ OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完
</tbody> </tbody>
</table> </table>
## 环境准备<a name="section7337134183512"></a> ## 环境准备<a name="section7337134183512"></a>
在使用docker环境前需要先完成以下操作: 在使用docker环境前需要先完成以下操作:
...@@ -178,13 +179,13 @@ hb set ...@@ -178,13 +179,13 @@ hb set
1. 获取Docker镜像。 1. 获取Docker镜像。
``` ```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。
``` ```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
...@@ -212,21 +213,15 @@ hb set ...@@ -212,21 +213,15 @@ hb set
### 编译源码-标准系统类设备(参考内存≥128MB)<a name="section193711513406"></a> ### 编译源码-标准系统类设备(参考内存≥128MB)<a name="section193711513406"></a>
1. 在源码的根目录执行预处理脚本。 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。
```
../scripts/prepare.sh
```
2. 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。
``` ```
./build.sh --product-name {product_name} ./build.sh --product-name {product_name}
``` ```
\{product\_name\}为当前版本支持的平台。比如:Hi3516DV300等。 \{product\_name\}为当前版本支持的平台。比如:Hi3516DV300等。
编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。
>![](../public_sys-resources/icon-note.gif) **说明:** >![](../public_sys-resources/icon-note.gif) **说明:**
...@@ -307,4 +302,3 @@ docker\_dist是一个[HPM](https://hpm.harmonyos.com/)系统中的模板组件 ...@@ -307,4 +302,3 @@ docker\_dist是一个[HPM](https://hpm.harmonyos.com/)系统中的模板组件
hpm run distWithDocker solution={product} hpm run distWithDocker solution={product}
``` ```
...@@ -44,6 +44,7 @@ OpenHarmony标准系统为开发者提供的Docker环境已经将对应的编译 ...@@ -44,6 +44,7 @@ OpenHarmony标准系统为开发者提供的Docker环境已经将对应的编译
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c repo sync -c
repo forall -c 'git lfs pull' repo forall -c 'git lfs pull'
bash build/prebuilts_download.sh
``` ```
方式二:通过repo + https 下载。 方式二:通过repo + https 下载。
...@@ -52,6 +53,7 @@ repo forall -c 'git lfs pull' ...@@ -52,6 +53,7 @@ repo forall -c 'git lfs pull'
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c repo sync -c
repo forall -c 'git lfs pull' repo forall -c 'git lfs pull'
bash build/prebuilts_download.sh
``` ```
## 获取Docker环境<a name="section181431248132513"></a> ## 获取Docker环境<a name="section181431248132513"></a>
...@@ -61,13 +63,13 @@ repo forall -c 'git lfs pull' ...@@ -61,13 +63,13 @@ repo forall -c 'git lfs pull'
1. 获取Docker镜像。 1. 获取Docker镜像。
``` ```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。
``` ```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4
``` ```
...@@ -89,27 +91,21 @@ repo forall -c 'git lfs pull' ...@@ -89,27 +91,21 @@ repo forall -c 'git lfs pull'
3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。
``` ```
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.3 docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.4
``` ```
## 编译<a name="section92391739152318"></a> ## 编译<a name="section92391739152318"></a>
1. 在源码的根目录执行预处理脚本 1. 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译
``` ```
../scripts/prepare.sh ./build.sh --product-name {product_name}
``` ```
2. 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。
```
./build.sh --product-name {product_name}
```
\{product\_name\}为当前版本支持的平台,比如:Hi3516DV300 \{product\_name\}为当前版本支持的平台,比如:Hi3516DV300
编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。
3. 编译源码完成,请进行镜像烧录,具体请参见[镜像烧录](quickstart-standard-burn.md) 3. 编译源码完成,请进行镜像烧录,具体请参见[镜像烧录](quickstart-standard-burn.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册