Hi3518 Development Board Development Summary

Source: Internet
Author: User
Tags unpack

0. Preface

actually quite busy, but this article summarizes the content I probably got two days, so still want to summarize, feel is relatively trivial, but lest next time again to do part of the work wasted energy.

Most of the tutorials on the web probably teach a Windows computer to do a client, a Linux virtual machine, and then connect to the board. I directly to the windows of that machine province, because I am not too accustomed to use Windows to do development environment, the use of Windows tutorial mainly because you can use SCURECRT this tool, and Linux has a similar tool, is minicom, are serial tools, This is mentioned below.

1. Build the development environment

1.1 NFS Server installed

Don't know what an NFS server is? Please self-encyclopedia, if you do not understand the encyclopedia, it is estimated or the old saying, estimated that you do not have to look at the back, you can click on the bottom and then close the page thank you.

General embedded development will use this thing, because the environment of the board is closed, the resources are limited, it is difficult to develop and debug the board directly, so it will use another set of development environment of the computer to do the development, and then the development of good files copied to the mounted folder, mounted folder is actually the Board of folder sharing.

Use the following command to install Server for NFS under Ubuntu

sudo apt-get install nfs-kernel-server #root用户可以不用sudo

Then you need to configure:

Vim/etc/exports #NFS最主要的配置文件 # Add a line to the bottom/home/luoyun/nfs * (Rw,sync,no_root_squash,no_subtree_check) # An asterisk-signed folder is a folder to mount, and an asterisk indicates that all clients within the same network segment can access it.

1.2 Setting up the Board IP

Because of the need to mount, so each client needs to have IP, when we put the network cable board, you will find that the corresponding IP is not automatically assigned, so you have to manually set up. The Setup method is as follows:

Ifconfig eth0 192.168.1.120 #IP根据你的实际内网段填写即可.

1.3 Landing board with minicom

Minicom also need to install, direct sudo apt-get install minicom is good, and then run Sodu minicom-s to configure, our board is connected to the computer with a USB port, so the corresponding serial port will generally be ttyUSB0, If your USB has other devices, it could be ttyUSB1 or something like that. Then set the baud rate 115200,8,1, no flow control.

The above point said that the manual setting of IP is also to be in the board through the Minicom landing on the board serial port set.

1.4 Mounting Shared Folders

Continue to stay in the board serial port, and then set the Mount folder:

Mount-t nfs-o nolock 192.168.1.101:/home/luoyun/nfs/opt #假设开发机的IP是192.168.1.101

This means that the/opt folder of the Board is attached to the NFS folder on the development machine.

1.5 Unpack SDK

Suppose you already have the HiSilicon SDK, if not, then find out for yourself. The file is relatively large, and I am not convenient to upload.

Executes./sdk.unpack, the primary execution authority.

In order to compile a low-level problem, if the development system is Ubuntu, it is recommended to modify the default dash for Bash, command line to execute the sudo dpkg-reconfigure dash, and then select No.

1.6 Compiling Osdrv

There are several problems in compiling osdrv, which require one by one correspondence processing:

1. "Arm-hisiv100nptl-linux-gcc:command not Found", this problem occurs mainly not installed HiSilicon compiler and setting environment variables, it is best to switch to the root user, and then execute osdrv/ Toolchain inside the Cross.instal, and then execute source/etc/profile confirm environment variable. In theory, if you do not use the root user, you can copy the last line $path command from/etc/profile to the command line and execute it again, but it seems as if the current situation has been unsuccessful.

2. After solving the first problem, it is likely to have a second problem: "Mkimage:command not Found", the first to know that the command Ubuntu is not self-brought, someone sent a mkimage executable file to me, I copied directly into the system, As a result I set the permissions after still not use, and then decisively give up, directly install this command, installation method sudo apt-get install U-boot-tools.

And then the compilation passed.

2. Porting Pjsip to support video transmission

2.1 Setting environment variables

If you use root in the 1.6 first problem, and you install the compiler, it is not necessary to use the command line to execute $path, but in this step, the job is not really save. Because if this is not done, the environment variable is not set up and the other files cannot be compiled.

2.2 Porting compiled FFmpeg

FFmpeg is PJSIP can support video transmission or call the most important dependent library, so to compile this, and then compile PJSIP can have video function.

It is important to remember that compiling any dependent library is compiled with an arm or HiSilicon compiler, in order to be used for subsequent programs, and finally used for the board, otherwise it is useless to compile the computer.

Compile Command reference:

./configure--enable-cross-compile--arch=arm--target-os=linux--enable-static--disable-shared--cc= ARM-HISIV100NPTL-LINUX-GCC--enable-libx264--ENABLE-GPL--disable-network  --enable-pthreads--enable-small-- Disable-parsers--disable-debug


If necessary, you can compile the x264 first, if not compiled x264, then--enable-libx264 can also be deleted.

If the reminder has strip related issues, you can use--disable-stripping to remove the library information without using strip.

2.3 Porting compiled Pjsip

The final step, in fact, is not difficult, first execute the following command

./configure--with-ffmpeg=/usr/local/lib--host=arm-hisiv100nptl-linux-

Then modify the Pjproject2-4/pjmedia/include/pjmedia config.h to change the # define Pjmedia_has_video and # define PJMEDIA_HAS_FFMPEG 0 to 1.

To be conservative, you can also write a # define Pjmedia_has_video 1 in pjlib/pj/include/config_site.h (the standard configuration on the official web is to write this).

Finally, do DEP && make.

Once compiled, the executable is copied to the/home/luoyun/nfs folder that is mounted.

Reprint Please specify the Source: http://blog.csdn.net/luoyun614/article/details/46526645

Hi3518 Development Board Development Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.