同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Figure 1 shows the hardware connections.
Table 1 Requirements on the development platform
Ubuntu 16.04 64-bit server or later (Use bash as the shell.) |
You can develop programs on the Windows workstation or Linux server via a remote login. |
||
The following table describes the tools required for setting up the general environment for a Linux server and how to obtain these tools.
Table 2 Development tools and obtaining methods
Table 3 Development tools and obtaining methods
Remotely connects to a Linux compile server or a serial port. |
Internet (for example, https://www.putty.org/) |
|
Using PuTTY to log in to a Linux server from a PC running Windows
Open PuTTY, enter the IP address of the Linux server, and click Open.
Click Yes in the PuTTY Security Alert dialog box.
Enter the account and password.
The login is successful.
Run the following command to 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 rm -rf /bin/sh command to delete sh and then run the sudo ln -s /bin/bash /bin/sh command to create a new soft link.
sudo rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh
Start a Linux server.
Run the following command to check the Python version (Python 3.7 or later is required):
python3 --version
Do as follows to install Python, for example, Python 3.8.
cat /etc/issue
If the Ubuntu version is 18 or later, run the following command:
sudo apt-get install python3.8
If the Ubuntu version is 16, download the installation package and install Python.
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
tar -xvzf Python-3.8.5.tgz && cd Python-3.8.5 && sudo ./configure && sudo make && sudo make install
After Python is installed, run the following command to link the Python path to /usr/bin/python:
which python3.8
cd /usr/bin && sudo rm python && sudo ln -s /usr/local/bin/python3.8 python && python --version
Install and upgrade the Python package management tool (pip3) using either of the following methods:
Command line:
sudo apt-get install python3-setuptools python3-pip -y
sudo pip3 install --upgrade pip
Installation package:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Run the following command to install setuptools:
pip3 install setuptools
Install the GUI menuconfig tool (Kconfiglib). You are advised to install Kconfiglib 13.2.0 or later.
Command line:
sudo pip3 install kconfiglib
Installation package:
Download the .whl file (for example, kconfiglib-13.2.0-py2.py3-none-any.whl).
Download path: https://pypi.org/project/kconfiglib#files
Run the following command to install the .whl file:
sudo pip3 install kconfiglib-13.2.0-py2.py3-none-any.whl
Install pycryptodome using either of the following methods:
Install the Python component packages on which the file signature depends, including pycryptodome, six, and ecdsa. As the installation of ecdsa depends on that of six, install six first.
Command line:
sudo pip3 install pycryptodome
Installation package:
Download the .whl file, for example, pycryptodome-3.7.3-cp37-cp37m-manylinux1_x86_64.whl from https://pypi.org/project/pycryptodome/#files.
Run the following command to install the .whl file:
sudo pip3 install pycryptodome-3.7.3-cp37-cp37m-manylinux1_x86_64.whl
Install six using either of the following methods:
Command line:
sudo pip3 install six --upgrade --ignore-installed six
Installation package:
Download the .whl file, for example, six-1.12.0-py2.py3-none-any.whl from https://pypi.org/project/six/#files.
Run the following command to install the .whl file:
sudo pip3 install six-1.12.0-py2.py3-none-any.whl
Install ecdsa using either of the following methods:
Command line:
sudo pip3 install ecdsa
Installation package:
Download the .whl file, for example, ecdsa-0.14.1-py2.py3-none-any.whl from https://pypi.org/project/ecdsa/#files.
Run the following command to install the .whl file:
sudo pip3 install ecdsa-0.14.1-py2.py3-none-any.whl
Start a Linux server.
Run the following command to install the SCons installation package:
sudo apt-get install scons -y
If the installation package cannot be found in the software source, do as follows:
Download the source code package from https://scons.org/pages/download.html. The recommended SCons version is 3.0.4 or later.
Decompress the source code package to any directory.
Go to the source code directory and run the following command to install the source code package:
sudo python3 setup.py install
Run the following command to check whether the installation is successful.
scons -v
NOTICE:
- If you acquire the source code using an HPM component or HPM CLI tool, compilation tools like gn, ninja, gcc_riscv32 are not required.
- (Recommended) If you obtain the source code via the mirror site or code repository, install compilation tools such as gn, ninja, and gcc_riscv32. Ensure that only gn, ninja, and gcc_riscv32 are used for the compilation environment of Hi3861 WLAN module.
Start a Linux server.
Download gn.
Run the following command to decompress the gn installation package to ~/gn.
tar -xvf gn.1523.tar -C ~/
Set an environment variable by performing the following steps. Open the ~/.bashrc file in Vim first.
vim ~/.bashrc
Copy the following command to the last line of the .bashrc file, save the file, and exit.
export PATH=~/gn:$PATH
Run the following command to validate the environment variable.
source ~/.bashrc
Start a Linux server.
Download ninja.
Run the following command to decompress the ninja installation package to ~/ninja.
tar -xvf ninja.1.9.0.tar -C ~/
Set an environment variable by performing the following steps. Open the ~/.bashrc file in Vim first.
vim ~/.bashrc
Copy the following command to the last line of the .bashrc file, save the file, and exit.
export PATH=~/ninja:$PATH
Run the following command to validate the environment variable.
source ~/.bashrc
NOTICE: The Hi3861 platform supports only the static link of the libgcc library. The dynamic link is not recommended because version 3 of the GNU General Public License (GPLv3) will be polluted during commercial distribution.
Start a Linux server.
Download gcc_riscv32.
Run the following command to decompress the gcc_riscv32 installation package to ~/gcc_riscv32.
tar -xvf gcc_riscv32-linux-7.3.0.tar.gz -C ~/
Set an environment variable by performing the following steps. Open the ~/.bashrc file in Vim first.
vim ~/.bashrc
Copy the following command to the last line of the .bashrc file, save the file, and exit.
export PATH=~/gcc_riscv32/bin:$PATH
Run the following command to validate the environment variable.
source ~/.bashrc
Enter the following command to check whether the compiler is successfully installed. If the compiler version number is correctly displayed, the installation is successful.
riscv32-unknown-elf-gcc -v
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。