同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
The standard OpenHarmony system provides a Docker environment which encapsulates build tools.
NOTE:
- Before using Docker, install it by following instructions in Install Docker Engine on Ubuntu.
- You can also use the installation package to set up the Ubuntu development environment.
Register your account with Gitee.
Register an SSH public key for access to Gitee.
Install the git client and git-lfs, and configure basic user information.
git config --global user.name "yourname"
git config --global user.email "your-email-address"
git config --global credential.helper store
Run the following commands to install the repo tool:
curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable.
chmod a+x /usr/local/bin/repo
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
Method 1 (recommended): Use the repo tool to download the source code over SSH. (You must have registered an SSH public key for access to Gitee.)
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
bash build/prebuilts_download.sh
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 sync -c
repo forall -c 'git lfs pull'
bash build/prebuilts_download.sh
Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR
Obtain the Docker image.
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.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 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
Obtain the Dockerfile script for a local Docker image.
git clone https://gitee.com/openharmony/docs.git
Go to the directory of the Dockerfile code and run the following command to build the Docker image:
cd docs/docker/standard
./build.sh
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.4
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.
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.
Burn the image. For details, see Burning Images.
NOTE: You can exit Docker by simply running the exit command.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。