From f9836c8997777707d5f3d499e8cfd80d41df1d37 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Fri, 6 Jan 2023 17:06:22 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- en/device-dev/faqs/faqs-environment-setup.md | 49 +++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/en/device-dev/faqs/faqs-environment-setup.md b/en/device-dev/faqs/faqs-environment-setup.md index 8a33cb7baf..d087258233 100644 --- a/en/device-dev/faqs/faqs-environment-setup.md +++ b/en/device-dev/faqs/faqs-environment-setup.md @@ -83,12 +83,10 @@ 1. Check that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb. 2. If the network is functional, run the following commands to install hb by specifying a temporary PyPI source: - + ``` python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ohos-build ``` - - ### Python 3 Installation @@ -109,9 +107,8 @@ - **Solution** 1. Run the **apt-get install gcc** command to install GCC online. - 2. Install Python 3. - + 2. Install Python 3. #### "-bash: make: command not found" @@ -134,8 +131,6 @@ 2. Install Python 3. - - #### "zlib not available" @@ -240,3 +235,43 @@ sudo apt-get remove python3-apt sudo apt-get install python3-apt ``` + +### Updating Source Code +- **Scenario** + + Update the OpenHarmony source code downloaded to the branch (for example, Master) source code. + +- **Solution** + + 1. Go to the OpenHarmony root directory. + + Check that the root directory has a **.repo** folder, which is usually hidden. If the **.repo** folder does not exist, decompress the obtained source code package again to obtain complete source code. + + 2. Run the **repo init** command to initialize the source code repository information. + + In the command, *branch* indicates the branch name, for example, **master** or **OpenHarmony-3.2-Beta3**. + ```shell + repo init -u https://gitee.com/openharmony/manifest -b branch --no-repo-verify + ``` + + 3. Download and update the source code file. + + ```shell + repo sync -c + repo forall -c 'pwd;git lfs pull' + ``` + To keep the working directory clean, run the following command: + + >![icon-note.gif](public_sys-resources/icon-caution.gif) **CAUTION**
+ >This command will reset the local workspace and delete files or directories that are not managed by gitee. Exercise caution when performing this operation. + ```shell + repo forall -c 'git reset --hard;git clean -fdx' + ``` + + 4. Run the prebuilts script to install the compiler and binary tool. + + ```shell + bash build/prebuilts_download.sh + ``` + + -- GitLab