From 0d5318ad966852d5236603b5f0336e21710b8849 Mon Sep 17 00:00:00 2001 From: conglin Date: Wed, 9 Mar 2022 14:47:41 +0800 Subject: [PATCH 1/2] combine the docker of L01 and L2 Signed-off-by: conglin --- docker/CHANGELOG.md | 0 docker/CHANGELOG_en.md | 0 docker/Dockerfile | 89 ++++++++++++------------- docker/README_en.md | 0 docker/build.sh | 2 +- docker/standard/CHANGELOG.md | 36 ---------- docker/standard/CHANGELOG_en.md | 35 ---------- docker/standard/Readme-en.md | 31 --------- docker/standard/Readme.md | 31 --------- docker/standard/build.sh | 16 ----- docker/standard/dockerfile | 112 -------------------------------- docker/standard/sources.list | 24 ------- 12 files changed, 41 insertions(+), 335 deletions(-) mode change 100644 => 100755 docker/CHANGELOG.md mode change 100644 => 100755 docker/CHANGELOG_en.md mode change 100644 => 100755 docker/README_en.md delete mode 100644 docker/standard/CHANGELOG.md delete mode 100644 docker/standard/CHANGELOG_en.md delete mode 100755 docker/standard/Readme-en.md delete mode 100755 docker/standard/Readme.md delete mode 100755 docker/standard/build.sh delete mode 100755 docker/standard/dockerfile delete mode 100755 docker/standard/sources.list diff --git a/docker/CHANGELOG.md b/docker/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/docker/CHANGELOG_en.md b/docker/CHANGELOG_en.md old mode 100644 new mode 100755 diff --git a/docker/Dockerfile b/docker/Dockerfile index 9e5371eae3b..70560a93c1d 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,80 +12,71 @@ # limitations under the License. -FROM ubuntu:20.04 -MAINTAINER dongjinguang@huawei.com +FROM ubuntu:18.04 WORKDIR /home/openharmony -RUN apt-get update -y \ - && apt-get install curl wget -y \ - && apt-get install vim -y \ - && apt-get install ssh -y \ - && apt-get install git -y \ - && apt-get install python3.8 -y \ - && apt-get install python3-pip -y \ - && apt-get install dosfstools -y \ - && apt-get install mtools -y \ - && apt-get install scons -y \ - && apt-get install make -y \ - && apt-get install libffi-dev -y \ - && apt-get install zip -y \ - && apt-get install python3-distutils -y \ - && apt-get install binutils -y \ - && apt-get install mtd-utils -y \ - && apt-get install libc6-dev-x32 -y \ - && DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get -y install tzdata \ - && apt-get install default-jre -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 doxygen -y \ - && apt-get install u-boot-tools -y \ - && apt-get install gcc-arm-linux-gnueabi -y \ - && apt-get install build-essential \ - && apt-get install locales \ - && apt-get install ruby -y \ +RUN sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list \ + && sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list \ + && apt-get update -y \ + && apt-get install -y apt-utils binutils bison flex bc build-essential make mtd-utils gcc-arm-linux-gnueabi u-boot-tools python3.8 python3-pip git zip unzip curl wget gcc g++ ruby=1:2.5.1 dosfstools mtools default-jre default-jdk scons python3.8-distutils perl openssl libssl-dev cpio git-lfs m4 ccache zlib1g-dev tar rsync liblz4-tool genext2fs binutils-dev device-tree-compiler e2fsprogs git-core gnupg gnutls-bin gperf lib32ncurses5-dev libffi-dev zlib* libelf-dev libx11-dev libgl1-mesa-dev lib32z1-dev xsltproc x11proto-core-dev libc6-dev-i386 libxml2-dev lib32z-dev libdwarf-dev \ + && apt-get install -y grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5 libncurses5-dev libncursesw5 libstdc++6 python2.7 gcc-arm-none-eabi \ + && apt-get install -y vim ssh locales \ + && apt-get install -y doxygen \ && locale-gen "en_US.UTF-8" \ - && rm -rf /bin/sh /usr/bin/python /usr/bin/python3 \ + && rm -rf /bin/sh /usr/bin/python /usr/bin/python3 /usr/bin/python3m \ && ln -s /bin/bash /bin/sh \ && ln -s /usr/bin/python3.8 /usr/bin/python3 \ + && ln -s /usr/bin/python3.8 /usr/bin/python3m \ && ln -s /usr/bin/python3.8 /usr/bin/python \ - && pip3 install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple setuptools \ - && pip3 install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple kconfiglib \ - && pip3 install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple pycryptodome \ - && pip3 install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple ecdsa \ - && pip3 install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple ohos-build \ + && curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/bin/repo \ + && chmod +x /usr/bin/repo \ + && pip3 install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple requests setuptools pymongo kconfiglib pycryptodome ecdsa ohos-build pyyaml prompt_toolkit==1.0.14 redis json2html yagmail python-jenkins \ + && pip3 install esdk-obs-python --trusted-host pypi.org \ + && pip3 install six --upgrade --ignore-installed six \ && mkdir -p /home/tools \ + && mkdir -p /home/tools/gn \ && 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/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/gn/1717/linux/gn-linux-x86-1717.tar.gz \ - && wget -P /home/tools https://mirrors.huaweicloud.com/nodejs/v12.20.0/node-v12.20.0-linux-x64.tar.gz \ - && wget -P /home/tools https://repo.huaweicloud.com/harmonyos/develop_tools/hmos_app_packing_tool.jar \ - && wget -P /home/tools https://repo.huaweicloud.com/harmonyos/develop_tools/hapsigntoolv2.jar \ - && tar xvf /home/tools/llvm.tar.gz -C /home/tools \ - && tar xvf /home/tools/hc-gen-0.65-linux.tar -C /home/tools \ - && tar xvf /home/tools/gcc_riscv32-linux-7.3.0.tar.gz -C /home/tools \ - && tar xvf /home/tools/ninja.1.9.0.tar -C /home/tools \ - && tar xvf /home/tools/gn-linux-x86-1717.tar.gz -C /home/tools \ - && tar xvf /home/tools/node-v12.20.0-linux-x64.tar.gz -C /home/tools \ + && wget -P /home/tools https://mirrors.huaweicloud.com/nodejs/v14.15.4/node-v14.15.4-linux-x64.tar.xz \ + && wget -P /home/tools https://hm-verify.obs.cn-north-4.myhuaweicloud.com/qemu-5.2.0.tar.xz \ + && tar -xvf /home/tools/llvm.tar.gz -C /home/tools \ + && tar -xvf /home/tools/hc-gen-0.65-linux.tar -C /home/tools \ + && tar -xvf /home/tools/gcc_riscv32-linux-7.3.0.tar.gz -C /home/tools \ + && tar -xvf /home/tools/ninja.1.9.0.tar -C /home/tools \ + && tar -xvf /home/tools/gn-linux-x86-1717.tar.gz -C /home/tools/gn \ + && tar -xJf /home/tools/node-v14.15.4-linux-x64.tar.xz -C /home/tools \ + && cp /home/tools/node-v14.15.4-linux-x64/bin/node /usr/local/bin \ + && ln -s /home/tools/node-v14.15.4-linux-x64/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ + && ln -s /home/tools/node-v14.15.4-linux-x64/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \ + && tar -xJf /home/tools/qemu-5.2.0.tar.xz -C /home/tools \ && sed -i '$aexport PATH=/home/tools/llvm/bin:$PATH' /root/.bashrc \ && sed -i '$aexport PATH=/home/tools/hc-gen:$PATH' /root/.bashrc \ && sed -i '$aexport PATH=/home/tools/gcc_riscv32/bin:$PATH' /root/.bashrc \ && sed -i '$aexport PATH=/home/tools/ninja:$PATH' /root/.bashrc \ - && sed -i '$aexport PATH=/home/tools/node-v12.20.0-linux-x64/bin:$PATH' /root/.bashrc \ - && sed -i '$aexport PATH=/home/tools:$PATH' /root/.bashrc \ + && sed -i '$aexport PATH=/home/tools/node-v14.15.4-linux-x64/bin:$PATH' /root/.bashrc \ + && sed -i '$aexport PATH=/home/tools/gn:$PATH' /root/.bashrc \ && sed -i '$aexport PATH=/root/.local/bin:$PATH' /root/.bashrc \ && export PATH=/home/tools/llvm/bin:$PATH \ && export PATH=/home/tools/hc-gen:$PATH \ && export PATH=/home/tools/gcc_riscv32/bin:$PATH \ && export PATH=/home/tools/ninja:$PATH \ && export PATH=/home/tools/node-v12.20.0-linux-x64/bin:$PATH \ - && export PATH=/home/tools:$PATH \ + && export PATH=/home/tools/gn:$PATH \ && export PATH=/root/.local/bin:$PATH \ + && cd /home/tools/qemu-5.2.0 \ + && mkdir build \ + && cd build \ + && ../configure --target-list=arm-softmmu \ + && make -j \ + && make install \ + && cd /home/openharmony \ && rm -rf /home/tools/*.tar \ && rm -rf /home/tools/*.gz \ + && rm -rf /home/tools/*.xz \ + && rm -rf /home/tools/qemu-5.2.0 \ && npm install -g @ohos/hpm-cli --registry https://mirrors.huaweicloud.com/repository/npm/ ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 diff --git a/docker/README_en.md b/docker/README_en.md old mode 100644 new mode 100755 diff --git a/docker/build.sh b/docker/build.sh index 0c8b1fc8b36..e1a76182519 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -docker build -t openharmony-docker:0.0.7 . +docker build -t openharmony-docker:1.0.0 . diff --git a/docker/standard/CHANGELOG.md b/docker/standard/CHANGELOG.md deleted file mode 100644 index c37b6bc9eef..00000000000 --- a/docker/standard/CHANGELOG.md +++ /dev/null @@ -1,36 +0,0 @@ - ### 0.0.8(2022/01/16) - -新增安装doxygen。 - - ### 0.0.7(2022/01/11) - -新增安装genext2fs和liblz4-tool。 - - ### 0.0.6(2022/01/04) - -新增安装hb。 - - ### 0.0.5(2021/10/28) - -新增安装tar、binutils、git-lfs、gnutls-bin、python3.8、python3-pip、cpio。 - - ### 0.0.4(2021/09/18) - -1、删除编译依赖的工具预装。 - -2、增加安装ruby。 - - ### 0.0.3(2021/08/30) - -1、更新llvm版本从10.0.1-62608更新到10.0.1-69957。 - -2、增加安装gcc_aarch64。 - - ### 0.0.2(2021/08/11) - -新增安装llvm-10.0.1-62608和restool工具。 - - ### 0.0.1(2021/06/02) - -提供OpenHarmony 2.0版本docker编译环境,预装编译依赖工具。 - diff --git a/docker/standard/CHANGELOG_en.md b/docker/standard/CHANGELOG_en.md deleted file mode 100644 index ce1cceda1cc..00000000000 --- a/docker/standard/CHANGELOG_en.md +++ /dev/null @@ -1,35 +0,0 @@ - ### 0.0.8 (2022/01/16) - -Added the installation of doxygen. - - ### 0.0.7 (2022/01/11) - -Added the installation of genext2fs and liblz4-tool. - - ### 0.0.6 (2022/01/04) - -Added the installation of hb. - - ### 0.0.5 (2021/10/28) - -Added the installation of tar, binutils, git-lfs, gnutls-bin, python3.8, python3-pip, and cpio. - - ### 0.0.4 (2021/09/18) - -1\. Removed pre-installed build dependency tools. - -2\. Added the Ruby installation. - - ### 0.0.3 (2021/08/30) - -1\. Updated LLVM from 10.0.1-62608 to 10.0.1-69957. - -2\. Added the installation of gcc_aarch64. - - ### 0.0.2 (2021/08/11) - -Added the installation of llvm-10.0.1-62608 and restool. - - ### 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 diff --git a/docker/standard/Readme-en.md b/docker/standard/Readme-en.md deleted file mode 100755 index cdfc3cc4a00..00000000000 --- a/docker/standard/Readme-en.md +++ /dev/null @@ -1,31 +0,0 @@ -## 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](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). - -### Setting Up the Docker Environment for Standard-System Devices (reference memory ≥ 128 MB) - -1. Obtain the Docker image. -``` -docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 -``` -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.8 -``` - -### Building for Standard-System Devices (reference memory ≥ 128 MB) -Run the following script to start building for Standard-System Devices (reference memory ≥ 128 MB) - -``` -./build.sh --product-name {product_name} --ccache -``` -**{product_name}** indicates the platform supported by the current distribution, for example, Hi3516DV300, rk3568. -Files generated during compilation are stored in the **out/{device_name}/** directory, and the generated image is stored in the **out/{device_name}/packages/phone/images/** directory. - - - -**Note** - -You can exit Docker by simply running the **exit** command. \ No newline at end of file diff --git a/docker/standard/Readme.md b/docker/standard/Readme.md deleted file mode 100755 index 5997c8b0ade..00000000000 --- a/docker/standard/Readme.md +++ /dev/null @@ -1,31 +0,0 @@ -## 独立Docker环境 - -本文为标准系统类设备Docker使用指导,[点此查看](https://gitee.com/openharmony/docs/blob/master/docker/README.md)小型和轻量系统类设备使用指导。 - -OpenHarmony的Docker镜像托管在HuaweiCloud SWR上。开发者可以通过该镜像在很大程度上简化编译前的环境配置。开发者在配置好开发环境后,通过以下步骤来使用Docker环境。 - -### 搭建Docker环境-标准系统类设备(参考内存≥128MB) - -1. 获取Docker镜像。 -``` -docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 -``` -2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 -``` -docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 -``` - -### 编译源码-标准系统类设备(参考内存≥128MB) -通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。 - -``` -./build.sh --product-name {product_name} --ccache -``` -{product_name}为当前版本支持的平台。比如:Hi3516DV300、rk3568等。 -编译所生成的文件都归档在out/{device_name}/目录下,结果镜像输出在 out/{device_name}/packages/phone/images/ 目录下。 - - - -**说明** - - 退出Docker执行exit命令即可。 \ No newline at end of file diff --git a/docker/standard/build.sh b/docker/standard/build.sh deleted file mode 100755 index d51927c8ef8..00000000000 --- a/docker/standard/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# 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. - -docker build -t openharmony-docker-standard:0.0.8 . diff --git a/docker/standard/dockerfile b/docker/standard/dockerfile deleted file mode 100755 index 5451542fc8a..00000000000 --- a/docker/standard/dockerfile +++ /dev/null @@ -1,112 +0,0 @@ -# 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. - -FROM ubuntu:18.04 -WORKDIR /home/openharmony - -ARG DEBIAN_FRONTEND=noninteractive -ARG PREBUILTS_DIR=/home/prebuilts -ARG HOME_TOOLS=/home/tools - -RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak - -COPY sources.list /etc/apt - -RUN apt-get update \ - && apt-get install -y \ - apt-utils \ - vim \ - tar \ - binutils \ - software-properties-common \ - openssh-server \ - iputils-ping \ - curl \ - net-tools \ - bsdmainutils \ - kmod \ - bc \ - rsync \ - gawk \ - ssh \ - ccache \ - zip \ - python-dev \ - make \ - m4 \ - gcc-multilib \ - ca-certificates-java \ - unzip \ - python3-yaml \ - perl \ - openssl \ - libssl1.1 \ - gnupg \ - xsltproc \ - x11proto-core-dev \ - tcl \ - python3-crypto \ - python-yaml \ - python-crypto \ - libxml2-utils \ - libxml2-dev \ - libx11-dev \ - libssl-dev \ - libgl1-mesa-dev \ - lib32z1-dev \ - lib32ncurses5-dev \ - g++-multilib \ - flex \ - bison \ - doxygen \ - git \ - git-lfs \ - subversion \ - tofrodos \ - pigz \ - expect \ - python3-xlrd \ - python-xlrd \ - wget \ - git-core \ - gperf \ - build-essential \ - zlib1g-dev \ - libc6-dev-i386 \ - lib32z-dev \ - openjdk-8-jdk \ - ruby \ - gnutls-bin \ - python3.8 \ - python3-pip \ - cpio \ - genext2fs \ - doxygen \ - liblz4-tool \ - && rm -rf /bin/sh /usr/bin/python /usr/bin/python3 \ - && ln -s /bin/bash /bin/sh \ - && ln -s /usr/bin/python3.8 /usr/bin/python3 \ - && ln -s /usr/bin/python3.8 /usr/bin/python \ - && python3 -m pip install --user ohos-build \ - && 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 \ - && wget -P $HOME_TOOLS https://mirrors.huaweicloud.com/nodejs/v12.18.4/node-v12.18.4-darwin-x64.tar.gz \ - && tar xvf $HOME_TOOLS/node-v12.18.4-linux-x64.tar.gz -C $PREBUILTS_DIR/prebuilts \ - && tar xvf $HOME_TOOLS/node-v12.18.4-darwin-x64.tar.gz -C $PREBUILTS_DIR/prebuilts \ - && sed -i '$aexport PATH='"$PREBUILTS_DIR"'/prebuilts/node-v12.18.4-linux-x64/bin:$PATH' /root/.bashrc \ - && sed -i '$aexport PATH='"$PREBUILTS_DIR"'/prebuilts/hc-gen:$PATH' /root/.bashrc \ - && export PATH=$PATH:$PREBUILTS_DIR/prebuilts/node-v12.18.4-linux-x64/bin \ - && export PATH=$PATH:$PREBUILTS_DIR/prebuilts/hc-gen \ - && rm -rf $HOME_TOOLS \ - && npm install -g @ohos/hpm-cli --registry https://registry.npm.taobao.org diff --git a/docker/standard/sources.list b/docker/standard/sources.list deleted file mode 100755 index 78030974c6f..00000000000 --- a/docker/standard/sources.list +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - - -deb http://mirrors.ustc.edu.cn/ubuntu/ bionic main multiverse restricted universe -deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe -deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe -deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-security main multiverse restricted universe -deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe -deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic main multiverse restricted universe -deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe -deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe -deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-security main multiverse restricted universe -deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe \ No newline at end of file -- Gitee From 8cef0ccbfd066f9fba5bf37a07e5af2f7212bed4 Mon Sep 17 00:00:00 2001 From: c00565983 Date: Wed, 9 Mar 2022 15:48:51 +0800 Subject: [PATCH 2/2] combine docker Signed-off-by: c00565983 --- docker/CHANGELOG.md | 6 ++++++ docker/CHANGELOG_en.md | 8 +++++++- docker/README.md | 19 +++++++++---------- docker/README_en.md | 18 ++++++++---------- en/device-dev/get-code/gettools-acquire.md | 19 ++++++++++--------- .../quickstart-standard-docker-environment.md | 4 ++-- zh-cn/device-dev/get-code/gettools-acquire.md | 16 ++++++++-------- .../quickstart-lite-docker-environment.md | 4 ++-- ...uickstart-standard-running-hi3516-build.md | 4 ++-- ...uickstart-standard-running-rk3568-build.md | 4 ++-- 10 files changed, 56 insertions(+), 46 deletions(-) diff --git a/docker/CHANGELOG.md b/docker/CHANGELOG.md index c293b830db2..ab06f140919 100755 --- a/docker/CHANGELOG.md +++ b/docker/CHANGELOG.md @@ -1,3 +1,9 @@ +### 1.0.0 (2022/03/09) + +合并轻设备和富设备系统docker编译环境。 + + + ### 0.0.7 (2022/02/16) 增加安装doxygen工具。 diff --git a/docker/CHANGELOG_en.md b/docker/CHANGELOG_en.md index 1dac4c8e523..94189f8d742 100755 --- a/docker/CHANGELOG_en.md +++ b/docker/CHANGELOG_en.md @@ -1,10 +1,16 @@ +### 1.0.0 (2022/03/09) + +Combine the docker build environment of Mini-System Devices (reference memory ≥ 128 KB), Small-System Devices (reference memory ≥ 1 MB) and Standard-System Devices (reference memory ≥ 128 MB). + + + ### 0.0.7 (2022/02/16) Added the installation of doxygen. -### 0.0.6(2022/02/10) +### 0.0.6 (2022/02/10) 1\. Updated hb. diff --git a/docker/README.md b/docker/README.md index 6f536192dcc..d38a6f295c2 100755 --- a/docker/README.md +++ b/docker/README.md @@ -2,30 +2,29 @@ ### Docker镜像简介 -本文为小型和轻量系统类设备Docker使用指导,[点此查看](https://gitee.com/openharmony/docs/blob/master/docker/standard/Readme.md)标准系统类设备使用指导。 +本文为OpenHarmony的Docker编译环境使用指导。 OpenHarmony的Docker镜像托管在**HuaweiCloud SWR**上,开发者可以通过该镜像在很大程度上简化编译前的环境配置。 目前容器化构建选项支持情况如下: -| Docker镜像仓库 | 标签 | 说明 | -| :----------------------------------------------------------- | :------ | :----------------------------------------------------------- | -| `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `0.0.7` | 已经预安装OpenHarmony版本的编译环境,支持轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)的版本构建。 | +| Docker镜像仓库 | 标签 | 说明 | +| :----------------------------------------------------------- | :------ | :------------------------------------ | +| `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `1.0.0` | 已经预安装OpenHarmony版本的编译环境。 | ### 使用方式及步骤 - 开发者在配置好开发环境后,可以通过以下步骤来使用我们提供的Docker环境。详情请参见[Docker编译环境](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/gettools-acquire.md)。 + 开发者在下载好源码后,可以通过以下步骤来使用我们提供的Docker环境。详情请参见[Docker编译环境](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/gettools-acquire.md)。 1. 获取Docker镜像 ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境 ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 3. 通过如下命令启动不同平台的编译 ``` - hb set #设置工作目录。 - . #输入源码所在目录,点(.)表示当前目录。 - 在显示的页面中通过键盘上下键选择需要编译的平台,通过回车确定选择。 + hb set #在显示的页面中通过键盘上下键选择需要编译的平台,通过回车确定选择。 hb build -f #执行编译。 ``` + diff --git a/docker/README_en.md b/docker/README_en.md index c41dab5a571..9853079a565 100755 --- a/docker/README_en.md +++ b/docker/README_en.md @@ -2,30 +2,28 @@ ### 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) +This document provides guidance on building the Docker image for mini- and small-system devices. 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.7` | The OpenHarmony 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). | +| Docker Image Repository | Tag | Description | +| :----------------------------------------------------------- | :------ | :-------------------------------------------------------- | +| `swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker` | `1.0.0` | The OpenHarmony build environment has been pre-installed. | ### Usage - After configuring the development environments, perform the steps below to access the Docker environment. + After downloading the OpenHarmony code, perform the steps below to access the Docker environment. 1. Obtain the Docker image. ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 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.7 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 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 set # Press the Up or Down key to select the platform to build on, then press Enter. hb build -f # Start building. ``` diff --git a/en/device-dev/get-code/gettools-acquire.md b/en/device-dev/get-code/gettools-acquire.md index 21e5bccc54e..6c06f41669b 100644 --- a/en/device-dev/get-code/gettools-acquire.md +++ b/en/device-dev/get-code/gettools-acquire.md @@ -30,16 +30,16 @@ OpenHarmony provides the following two types of Docker environments for you to q

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

-

0.0.7

+

1.0.0

Standard system

Ubuntu

-

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard

+

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

-

0.0.8

+

1.0.0

HPM-based Docker environment

@@ -62,6 +62,7 @@ OpenHarmony provides the following two types of Docker environments for you to q + ## Preparations Before using the Docker environment, perform the following operations: @@ -82,7 +83,7 @@ The Docker image of OpenHarmony is hosted on [HUAWEI CLOUD SWR](https://console 1. Obtain the Docker image. ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: @@ -90,13 +91,13 @@ The Docker image of OpenHarmony is hosted on [HUAWEI CLOUD SWR](https://console Run the following command in Ubuntu: ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` Run the following command in Windows \(assuming that the source code directory is **D:\\OpenHarmony**\): ``` - docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` @@ -108,7 +109,6 @@ Set the build path to the current path. ``` hb set - . ``` **Figure 1** Setting page @@ -116,6 +116,7 @@ hb set >![](../public_sys-resources/icon-note.gif) **NOTE:** >The mapping between the development board and the building GUI: +> >- Hi3861: wifiiot\_hispark\_pegasus@hisilicon >- Hi3516: ipcamera\_hispark\_taurus@hisilicon >- Hi3518: ipcamera\_hispark\_aries@hisilicon @@ -137,13 +138,13 @@ hb set 1. Obtain the Docker image. ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:1.0.0 ``` 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.8 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` diff --git a/en/device-dev/quick-start/quickstart-standard-docker-environment.md b/en/device-dev/quick-start/quickstart-standard-docker-environment.md index 4f61ac051f7..ab1534cdd01 100644 --- a/en/device-dev/quick-start/quickstart-standard-docker-environment.md +++ b/en/device-dev/quick-start/quickstart-standard-docker-environment.md @@ -64,13 +64,13 @@ By default, the downloaded prebuilts binary file is stored in **OpenHarmony\_2. 1. Obtain the Docker image. ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 2. Go to the root directory of source 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.8 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` diff --git a/zh-cn/device-dev/get-code/gettools-acquire.md b/zh-cn/device-dev/get-code/gettools-acquire.md index 830c6001e94..a20b0312146 100644 --- a/zh-cn/device-dev/get-code/gettools-acquire.md +++ b/zh-cn/device-dev/get-code/gettools-acquire.md @@ -43,7 +43,7 @@ OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

-

0.0.7

+

1.0.0

标准系统

@@ -52,7 +52,7 @@ OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard

-

0.0.8

+

1.0.0

HPM Docker环境

@@ -75,6 +75,7 @@ OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完 + ## 环境准备 在使用docker环境前需要先完成以下操作: @@ -95,7 +96,7 @@ OpenHarmony的Docker镜像托管在[HuaweiCloud SWR](https://console.huaweicloud 1. 获取Docker镜像。 ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 @@ -103,13 +104,13 @@ OpenHarmony的Docker镜像托管在[HuaweiCloud SWR](https://console.huaweicloud ubuntu下执行: ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` windows下执行(假设源码目录为D:\\OpenHarmony): ``` - docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` @@ -121,7 +122,6 @@ OpenHarmony的Docker镜像托管在[HuaweiCloud SWR](https://console.huaweicloud ``` hb set - . ``` **图 1** 设置编译界面 @@ -150,13 +150,13 @@ hb set 1. 获取Docker镜像。 ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` diff --git a/zh-cn/device-dev/quick-start/quickstart-lite-docker-environment.md b/zh-cn/device-dev/quick-start/quickstart-lite-docker-environment.md index a81005a338f..0618477f49c 100644 --- a/zh-cn/device-dev/quick-start/quickstart-lite-docker-environment.md +++ b/zh-cn/device-dev/quick-start/quickstart-lite-docker-environment.md @@ -24,11 +24,11 @@ OpenHarmony的Docker镜像托管在[HuaweiCloud SWR](https://console.huaweicloud 1. 获取Docker镜像。 ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.7 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` diff --git a/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-build.md b/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-build.md index 5bb3128a436..47f745e8c9c 100644 --- a/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-build.md +++ b/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-build.md @@ -41,13 +41,13 @@ bash build/prebuilts_download.sh 1. 获取Docker镜像。 ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` 2. 进入源码根目录执行如下命令,从而进入Docker构建环境。 ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` diff --git a/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-build.md b/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-build.md index 781ce3a9e2b..2b414676249 100644 --- a/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-build.md +++ b/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-build.md @@ -41,13 +41,13 @@ bash build/prebuilts_download.sh 1. 获取Docker镜像。 ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:1.0.0 ``` 2. 进入源码根目录执行如下命令,从而进入Docker构建环境。 ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.8 + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 ``` -- Gitee