1 Star 0 Fork 5K

bill / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setting-up-the-hi3518-development-environment.md 7.77 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-04-08 16:33 . fixed bugs

Setting Up the Hi3518 Development Environment

Prerequisites

You must complete the settings in Basic OS Environment Setup.

Setting Up the Hi3518 Development Environment

Hardware Requirements

  • Hi3518E V300 IoT camera development board

  • USB-to-serial cable and network cable (The Windows workstation is connected to the Hi3518E V300 development board through the USB-to-serial cable and network cable.)

    The following figure shows the hardware connections.

Figure 1 Hardware connections

Software Requirements

NOTICE: This section describes how to use an installation package to set up the compilation and development environment. If you are going to use Docker to set up the environment, skip this section and Installing the Linux Compilation Environment.

The following table describes the tools required for setting up the general environment for a Linux server of the Hi3518 development board and how to obtain these tools.

Table 1 Development tools and obtaining methods

Development Tool

Description

How to Obtain

bash

Processes CLI commands.

System configuration

Basic software package for compilation and building (required only for Ubuntu 20+)

Provides a basic software package for compilation and building.

Internet

dosfstools, mtools, and mtd-utils

Pack files.

apt-get install

hc-gen

Configures and compiles files.

https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

Installing the Linux Compilation Environment

NOTICE:

  • If you acquire the source code using an HPM component or HPM CLI tool, compilation tools like gn, ninja, LLVM, and hc-gen are not required.
  • (Recommended) If you obtain the source code through an image site or a code repository, compilation tools like LLVM and hc-gen need to be installed. When installing LLVM and hc-gen, ensure that the environment variable paths of the compilation tools are unique.

Changing Linux Shell to Bash

Check whether bash is used as the shell.

ls -l /bin/sh

If /bin/sh -> bash is not displayed, do as follows to change shell to bash.

Method 1: Run the following command on the device and then click No.

sudo dpkg-reconfigure dash

Method 2: Run the first command to delete sh and then run the second command to create a new soft link.

sudo rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh

Installing Basic Software Used for Compilation and Building (Required Only for Ubuntu 20+)

Install the software.

sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev

Installing a File Packing Tool

  1. Start a Linux server.

  2. Install dosfstools.

    sudo apt-get install dosfstools
  3. Install mtools.

    sudo apt-get install mtools
  4. Install mtd-utils.

    sudo apt-get install mtd-utils

Installing hc-gen

  1. Start a Linux server.

  2. Download hc-gen.

  3. Decompress the hc-gen installation package to ~/hc-gen on the Linux server.

    tar -xvf hc-gen-0.65-linux.tar -C ~/
  4. Set an environment variable.

    vim ~/.bashrc

    Copy the following command to the last line of the .bashrc file, save the file, and exit.

    export PATH=~/hc-gen:$PATH
  5. Validate the environment variable.

    source ~/.bashrc
1
https://gitee.com/ximeibaba/docs.git
git@gitee.com:ximeibaba/docs.git
ximeibaba
docs
docs
master

搜索帮助