加入收藏
举报
当前仅显示指定条件回帖 [ 展开查看全部 ]
02-14 20:03
#
文件名称:
hi3516-board-environment-setup.md
所在目录:
Openharmony v1.0 / docs / docs-en / guide
文件大小:
19.14 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# Hi3516 Board Environment Setup
## Environment Requirements
## Hardware
- Linux server
- Windows workstation \(Host computer\)
- Hi3516DV300 IoT Camera development board
- USB cable and network cable \(The Windows workbench is connected to Hi3516DV300 development board through the USB cable and network cable.\)
[Figure 1](#fa54d47112b684c65b3dbf1779413545a) shows the hardware connections.
**Figure 1** Hardware connections
![](figures/hardware-connections.png "hardware-connections")
## Software
**Table 1** Platforms required for Hi3516DV300 development board




















Hardware


Software


Description


Remarks


Linux compile server


Operating system


Ubuntu 16.04 64-bit or later is used for the Linux OS, and Bash is used for the shell.


NOTE:

Common software such as samba and vim is installed by default in the system. Adaptation is required to support Linux file sharing.



You can develop programs on the Windows workstation or on the Linux server through remote login.


Windows workstation


Operating system


Windows XP/Windows7/Windows10


USB-serial adapter driver


http://www.totalcardiagnostics.com/files/PL2303_64bit_Installer.exe



## Build Tools for Linux
The following table lists the obtaining channels and common tools required for Linux.
**Table 2** Development tools and obtaining channels for the Linux server































Development tool


Description


Obtaining Channel


Python3.7+


Runs the compilation scripts.


Public internet


bash


Executes commands.


Public internet


gn


Generates ninja compilation scripts.


http://tools.harmonyos.com/mirrors/gn/1523/linux/gn-linux-1523.tar


ninja


Runs ninja compilation scripts.


http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja-linux-1.9.0.tar


LLVM


Performs code editing.


http://tools.harmonyos.com/mirrors/clang/9.0.0-33042/linux/llvm-linux-9.0.0-33042.tar


IPOP, PuTTY, or HyperTerminal


Connects to the Linux server(choose one).


Public internet (for example, https://www.putty.org/)



## Development Tools for Windows
**Table 3** Development tools and obtaining channels for the Windows workstation















Development tool


Description


Obtaining Channel


Visual Studio Code


Performs code editing.


https://code.visualstudio.com/


HUAWEI DevEco Device Tool


Suppports code compilation, burning, debugging, and C++ languages.


NOTE:

HUAWEI DevEco Device Tool is a one-stop integrated development tool provided by OpenHarmony for smart device developers. It supports customization of OpenHarmony components based on demands, and functions such as code editing, compilation, burning, and debugging. It also supports C and C++ languages, and is deployed on Visual Studio Code as a plug-in.



https://partnerdevicetest.devccsrnd.hwcloudtest.cn:3092/cn/ide



## Installing the Basic Compilation Environment
## connecting to the Linux server
Using PuTTY on Windows to log into Linux server
1. Open [puTTY](https://www.putty.org/), enter the IP address of the Linux server, and click **Open**.
**Figure 2** PuTTY configuration page
![](figures/putty-configuration-page.png "putty-configuration-page")
2. Select **Yes** in the dialog displaying a security alert.
**Figure 3** PuTTY Security Alert dialog
![](figures/putty-security-alert-dialog.png "putty-security-alert-dialog")
3. Enter the account and password.
**Figure 4** Login page
![](figures/login-page.png "login-page")
4. The login is successful.
**Figure 5** Successful login page
![](figures/successful-login-page.png "successful-login-page")
## h2 Change Linux shell to bash.
Run the following command on the terminal to check whether the shell is bash:
```
ls -l /bin/sh
```
如果为显示为/bin/sh -\> bash则为正常,否则请按以下方式修改:
**方法一**
在终端运行如下命令,然后选择 no。
```
sudo dpkg-reconfigure dash
```
**方法二**
Delete sh and run sh again.
```
rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh
```
## Installing the Python environment
1. Open the terminal of the Linux compilation server.
2. Run the **python3 --version** command to check the Python version. Python 3.7 or later is required. Otherwise, perform the following steps \(Python 3.8 is used as an example\):
- If the Ubuntu version is 18, run the sudo apt-get install python3.8 command.
- If the Ubuntu version is 16, download the installation package and install Python.
1. Run the following command to install the python dependency:
Run sudo apt-get install gcc to install gcc.
Install g++ and run sudo apt-get install g++.
Run the sudo apt-get install make command to install make.
Run the sudo apt-get install zlib\* command to install zlib.
Install libffi and run "sudo apt-get install libffi-dev".
2. Obtaining the python3.8.5 Installation Package
3. Run the **tar -xvzf Python-3.8.5.tgz** command.
4. Run the **cd Python-3.8.5** command.
5. Run the **sudo ./configure** command.
6. Run the **make** command.
7. Run the **sudo make install** command.
- Run the sudo apt-get install python3-setuptools python3-pip -y command to install the Python package management tool. \(The root/sudo permission is required for the installation.\) Upgrade pip3 and run "sudo pip3 install --upgrade pip".
Alternatively, install the Python package management tool as instructed by the official website. Download "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py" and run python get-pip.py.
3. Install **setuptools** by running the **pip3 install setuptools** command.
4. Install GUI menuconfig by running the **sudo pip3 install kconfiglib** command. The Kconfiglib 13.2.0+ version is recommended. \(The root/sudo permission is required.\)
You can also perform the following steps to install Kconfiglib 13.2.0+:
1. Download the .whl file \(for example, kconfiglib-13.2.0-py2.py3-none-any.whl\).
Download path: https://pypi.org/project/kconfiglib\#files
1. Install the .whl file by running the **sudo pip3 install kconfiglib-xxx.whl** command \(for example, **sudo pip3 install kconfiglib-13.2.0-py2.py3-none-any.whl**\). \(The root/sudo permission is required.\)
2. If an error of **subprocess.CalledProcessError: Command '\('lsb\_release', '-a'\)' returned non-zero exit status 1.** occurs, run the **find / -name lsb\_release** command, for example, **rm -rf /usr/bin/lsb\_release** to locate **sb\_release** and release it.
## Installing **gn**
1. Open a Linux terminal.
2. Download [gn](https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest).
3. Decompress the tool package to the **\~/gn** directory on the Linux server.
4. Set environment variables by running the **vim /etc/profile** command and add new variables by running the **export PATH=\~/gn:$PATH** command.
5. Validate environment variables by running the **source /etc/profile** command.
## Installing **ninjah**
1. Open a Linux terminal.
2. Download [ninja](https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip).
3. Decompress the tool package to the **\~/ninja** directory on the Linux server.
4. Set environment variables by running the **vim /etc/profile** command and add new variables by running the **PATH=\~/ninja:$PATH** command.
5. Validate environment variables by running the **source /etc/profile** command.
## Installing the LLVM tool chain
1. Open a Linux terminal.
2. Download [http://tools.harmonyos.com/mirrors/clang/9.0.0-33042/linux/llvm-linux-9.0.0-33042.tar](http://tools.harmonyos.com/mirrors/clang/9.0.0-33042/linux/llvm-linux-9.0.0-33042.tar).
3. Decompress the tool package to the **\~/llvm** directory on the Linux server.
4. Set environment variables by adding **export PATH=\~/bin:$PATH** to the **vim /etc/profile** profile.
5. Validate environment variables by running the **source /etc/profile** command.
## Installing File Packing Tools
1. Open a Linux terminal.
2. Run the **mkfs.vfat** command. If the command is not found, run the **sudo apt-get install dosfstools** command.
3. Run the **mcopy** command. If the command is not found, run the **sudo apt-get install mtools** command.
点赞 回复
回帖
支持markdown部分语法 ?