Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

DM8127 Development Strategy for Image recognition-- Construction of Development Environment

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

After more than two years of explosive shipments (for small companies like ours), there has been a slight pause, and now there is little time to continue to write my own blog. In fact, I have always wanted to calm down and do something, but it is a pity that it is not easy to do TI DAVINCI (ARM+DSP). In the past two years, I have been doing chores for big customers, mass production, and there are a lot of things. This is also mentioned in the "Image recognition DM8127 Development Strategy-Preface". For this DM8127 of ARM+DSP, let's start with the development environment.

Before writing the development environment to build, if you want to know why we insist on doing ARM+DSP program, it is recommended to take a look at my "Image recognition DM8127 Development Strategy-Preface". Here we mention ARM+DSP (General TI) and ARM+FPGA, which are in fact considered from the point of view of software development difficulty and use. after all, most image recognition algorithms can be realized with CqqqC +, which is relatively easy to transplant to a general-purpose DSP. In the past, fixed-point DSP C64 + optimization is a big problem, now DM8127 provides floating-point DSP, a lot of floating-point operations do not need to be converted into fixed-point operations to run, DM8127 floating-point computing capacity of 4500m FLOPS, and do products when those H264 codec JPEG codec these do not take up DSP resources, there are two independent HDVICP2 processing. And in the implementation of the same complexity of algorithms and applications, the cost of ARM+DSP still has a great advantage over ARM+FPGA. For image recognition, the release of the "New Generation artificial Intelligence Development Plan" on July 8, 2017 is a small part of it. If you want to have innovative products in the field of image recognition, if the development platform is very complex from the very beginning, it is impossible to persist without certain human and technical capital and strong money. A few years ago, many people on the Internet said that ARM+FPGA would completely eliminate ARM+DSP. As a result of market feedback, ARM+DSP vitality is still quite strong, especially after TI launched floating-point C66XDSP in the past two years, ARM+ floating-point C66XDSP performance is even stronger. Many industry insiders have mentioned that it will be an ARM+FPGA+DSP model in the future, which is a complementary model rather than an opposite model.

The above talked a little bit about the background of DM8127, and now let's move on to our topic. With regard to the software package design of DM8127, TI commissioned Taiwan APPRO company to develop, and APPRO designed IPNC (IP network camera), which is quite different from the DM8168/DM8148EVM development package developed by TI itself. TI DM8168/DM8148EVM focuses on multi-channel D1 DVR product model to design software packages, of course, the ti tools used in it is roughly the same. We only introduce the IPNC_RDK software development kit designed by APPRO. After buying the APPRO IPNC suite from Ariel Hoda in 2013, the intermediate software version was updated from V3.0.0 to V3.8.0. So far, the latest version is CSK V3.9.1, but this CSK V3.9.1 focuses on DM385, a platform without DSP. It is mentioned here that APPRO IPNC_RDK supports DM8127,DM385,DM388. Compile different platforms according to a general Rules.make macro definition in the package. Because there is an agreement when purchasing APPRO IPNC, our company develops its own ARM+DSP products on APPRO V3.8.0, not on CSK V3.9.1.

Use the VMware Workstation virtual machine to install the ubuntu16.04 development environment

To develop the IPNC_RDK software package, we first need to build the development environment on the linux HOST side, such as the cross-compilation environment, etc., which are all done in LINUX HOST. Due to the nature of the work, I do all aspects, so I prefer to use the working environment of WIN7+ LINUX dual operating system, use virtual machine VMware Workstation to build LINUX HOST development environment, the whole LINUX HOST can be used as a package backup, even if LINUX crashes, it does not affect the work of WIN7. If it crashes, it can be decompressed from the backup and used directly. In fact, DM6446,DM368,DM3730 used to be written in this way, but now it is developing a new platform, and using a higher version of UBUNTU16.04, the previous UBUNTU10.04 has eliminated it, so it is still necessary to write about the construction of the UBUNTU16.04 development environment, not verbose and cumbersome. The APPRO IPNC_RDK installation manual mentions the minimum requirements for your computer configuration as shown in the following figure:

I suggest that CPU at least use I5 or I7, memory more than 8G, hard disk 1TB, after all, now the memory is very cheap, with money to buy time here is feasible. The compiler is too slow with low configuration, wasting time and life. The APPRO V3.8.0 manual also mentions the use of the 32bit Ubuntu 10.04 32bit Ubuntu CSK V3.9.1 user manual on the LINUX system. Let's simply use the latest stable version of 32bitubuntu16.04 LTS, that is, the ubuntu-16.04.3-desktop-i386.iso or ubuntu-16.04.5-desktop-i386.iso file (16.04.05 was updated as I wrote this article, and it has the same function as 16.04.03 for us). Baidu once "ubuntu16.04 download", went to the ubuntu website to download the corresponding version. Https://www.ubuntu.com/download/alternative-downloads, see the following figure:

Then go to the Internet to download the cracked VMware-workstation-full-12.5.7 or more advanced version, first install the VMware-workstation virtual machine and use the broken decoding to register, as shown in the following figure

After entering and decoding the VMware-workstation-full-12.5.7, do not install the ubuntu16.04 immediately. We need to enter the attribute configuration interface under the network properties under WIN7. See the figure below, select VMwareNetwork Adapter VMnet1 for "share", so that when you create a ubuntu16.04 virtual machine later, you can use the bridging network port mode to allow the virtual machine to access the shared folder of WIN7, and so on.

Let's start to install ubuntu16.04 on the desktop-i386 platform. I directly use screenshots to describe the installation steps. First run the installed VM virtual machine, and click the following figure to create a new virtual machine.

We chose "Custom (Advanced)" to install, because there are some areas that need to be changed, do not use typical.

Click "next" to install

Don't add ubuntu-16.04.3-desktop-i386.iso in the above picture, you should choose to install it later.

In the picture above, we choose linux and Ubuntu.

In this step, we name the new virtual machine to make it easy to distinguish it from the low-version virtual machine of other DAVINCI chip platforms on my computer, and at the same time save the virtual machine to a disk with relatively large space. For example, if I allocate 200G to my H disk, I will save the virtual machine on this disk with more remaining space.

In this step, if your computer has 4G memory, it is recommended to allocate 1024MB here. If it is 6G or 8G memory, it is recommended that you allocate 2048MB to the virtual machine.

Here we choose the "bridge" mode of the network, the company network is relatively simple, the use of telecommunications optical brazing and equipment, coming in is a router, and the router is connected to multi-channel SWITCH. Bridging network mode when installing ubuntu16, ubuntu16 uses DHCP mode to connect to the external network.

The above is the selection of virtual machine hard disk type

When creating a virtual machine hard disk, we recommend setting at least 35g for the virtual machine to use, because the IPNC_RDK package is too large. I set 50g here because we need to customize the software for different customers in the future and need space backup. The second red circle here is to save the whole virtual machine as a file under a WIN7 to facilitate the backup of the virtual machine.

The image above is the name of the file where the entire ubuntu16.04 is saved in WIN7.

Click "Custom hardware" in the above picture before clicking "finish" after the configuration is finished.

Here we need to select the ubuntu-16.04.3-desktop-i386.iso file that has been installed and downloaded on the CD.

After clicking "finish", we begin to install ubuntu-16.04

When you start to run the virtual machine, if you pop up the picture above, just "OK" directly.

We choose English installation, click "install Ubuntu", if you are not accustomed to English, you can use Chinese, select China

The above figure prompts you whether you need to update some installation packages online during installation, as well as install third-party software such as graphics and WIFI drivers. We choose directly, anyway, it won't take much time and space.

Here, the disk allocated in the virtual machine is formatted before it is installed. Of course, this is not to format the corresponding WIN7 disk. For example, it is mentioned above that I installed UBUNTU16 on H disk, while H disk holds other WIN7 file folders and so on. Here virtual machine formatting does not affect other things of H disk under WIN7 of my computer at all.

The time zone chooses Shanghai. We belong to East 8 District.

Ubuntu16.04 chose to support the American keyboard, this is if you can not see the "continue" button, because the virtual machine resolution is not set, we use the following methods to move the solution.

At the top of the installation interface, right-click until the drop-down menu appears, and click "Move" to move the installation interface. So you can see the "continue" button.

At the beginning of the above picture, we are asked to enter user information. Let's take a look at the command line terminal installed at the back:

Davinci@davinci:/home/davinci/dm8127

The first davinci corresponds to "Pick a username" above, and the second "@ davinci" corresponds to "your computer's name". Give the user davinci login password, I set a simple 1234567 password here, I am not afraid, so there will be a "Fair password" this prompt, regardless of it.

The image above has started to install unbuntu16.04 for a long time.

After the installation is complete, the following figure appears:

Don't click "Restart Now" here, follow the picture below and then click "Restart Now" to restart the virtual machine. In the lower right corner of the virtual machine

Click on it, select "disconnect", or go in "Settings" to disconnect the ubuntu-16.04.3-desktop-i386.iso, otherwise you will enter the reinstall interface or stay in the boot interface for a long time when you restart the virtual machine, and then click "RestartNow" to restart the virtual machine after disconnecting the ubuntu-16.04.3-desktop-i386.iso.

Second, set up ubuntu16.04 to build a good development environment

After installing ubuntu16.04, the first login is with the normal user davinci and password 1234567.

When I first entered this new interface, it was a little uncomfortable at first, because it took too long to develop in a simple interface like ubuntu10.04. But after playing for 2 days, I fell in love with this style, especially the desktop can work on a four-screen screen, in short, the ubuntu Unity on the left is a little interesting. Right-click on the ubuntu desktop and select "Open Terminal" to see the familiar command line interface, which zooms out to the icon on the left when you don't operate. Let's first adjust the "Displays", adjust the resolution, and zoom in on the working interface, which is the same as WIN7.

Click "Network" in the settings interface, and unbuntu16.04 defaults to using DHCP mode to get the new IP and DNS from the company router, which will involve the problem of surfing the Internet when setting static IP later.

The next step is to install some useful packages using apt-get install. At the beginning, when we log in to ubuntu in the login interface for the first time, we use the user davinci to log in instead of root, so when we operate the linux command, we add sudo, and many scripts cannot be modified and saved, so we like to log in using root, but ubuntu does not support root login when installed, so we have to follow the steps below.

Step 1: set up root login

First, in the case of davinci login, use # sudo su, then enter the password of the ordinary user davinci 1234567, and temporarily switch to the operation under root permission, as shown in the following figure.

Then use:

# apt-get install vim

# apt-get install * c git

First install the vim tool to make it easy to edit the script file

# vim / usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

(the vim editor commands Baidu to know how to edit.)

Add "greeter-show-manual-login=true"

Note that the above commands are executed under the permission of entering root. If you need to precede "sudo" under the ordinary davinci user,

Then continue with the following command:

Use

# passwd root

Set the root login password twice, such as 1234567

Edit using # vim / root/.profile

First block mesg n | | true, and then enter tty-s & & mesg n | | true

Save exit, and finally reboot ubuntu16.04.

Select root in the login interface and enter the root password you just set

Now log in to the main interface with the highest privileges of root and enter System settings

Turn off the pesky screensaver.

Continue to face the Appearance settings in the settings interface, select Always displayed, so that when you edit gedit text scripts, .C, .H source files, you will actually manipulate the menu, otherwise you will find that the menu in the gedit interface is gone and not easy to use.

Step 2: set up a static IP network

When debugging the development board later, UBUNTU LINUX HOST needs a fixed SERVER IP. We click on the wired network logo in the upper right corner of the UBUNTU desktop:

Set the static IP according to the figure above, because when I configure the company router, the IP of the company's work computer is less than 192.168.1.100, and the 192.168.1.252 that is not used is the ip of linux host. Relative to the development board (target), this ubuntu static IP is SERVER IP or HOST IP, that is, TFTPSERVER IP and NFS SERVER IP. The DNS here is very important. If it is not set up, the ubuntu16.04 static IP will not be available on the Internet. When I was in DM3730, I was not aware of this problem at first. Apt-get install used the default DHCP mode to download when ubuntu10.04 was installed. Later, when it was changed to static IP, it did not successfully log in to the external network.

Step 3: install VMware Tool

This VMware Tool is very useful and has been introduced in previous DM368-DM3730 development strategies, so there is no need to be burdensome here.

Extract "VMwareTools-10.1.6-5214329.tar.gz" to / home/Downloads or some other path where you temporarily save the file. After decompressing it, execute the script:. / vmware-install.pl

Note in the picture above that it is not what other netizens said that they always hit enter and install OK. When prompted at the beginning, you have to choose Y and enter again, otherwise you will directly exit the installation. The other hints are all clapping the "enter key" to install until the end of the installation.

The image above shows that after the installation of VMware Tool, we set up folder sharing, that is, WIN7 (XP) and linux unbuntu16.04 in the virtual machine for folder sharing.

Refer to the above three figures to set the shared folder OK. The setting ends and is used by the command line terminal in ubuntu16.

# cd / mnt/hgfs/ubuntu16_s/

# ls-l

You can see the contents of the folder shared by WIN7 (XP), which is very useful.

Step 4: install SAMBA SERVER

First use # ufw disable to turn off the firewall of ubuntu16.04

# apt-get install samba

# gedit/etc/samba/smb.conf

Then add at the end of the smb.conf in the image above

[dm8127share]

Comment = Shared Folder requirepassword

Path = / home/davinci/dm8127

Public = yes

Writable = yes

Valid users = davinci

Create mask = 0777

Directory mask = 0777

Available = yes

Browseable = yes

Read only = yes

Save exit.

# smbpasswd-a davinci (this davinci is an existing ordinary user)

Then set the samba user password, which is also 1234567 in my case.

# smbpasswd-e davinci

# systemctl restart smbd.service nmbd.service

Open the network icon under WIN7 (XP): enter\\ 192.168.1.252

At this point, you can see

Double-click the shared folder, and if WIN7 (XP) prompts you for a username and password, enter the samba username davinci and 1234567 password just now.

Now that we have the VMware Tool shared file mentioned earlier, why should we install samba here? This samba shares folders and files with WIN7 (XP) or other computers through network sharing, which is a little different from VMware Tool, that is, in the same company, other colleagues can access the folders and files shared in your virtual machine unbuntu through the network, which is the sharing function of samba. VMware Tool shared files can only be shared folders in my virtual machine unbuntu accessed by my computer. With samba and VMware Tool installed, when the reboot virtual machine enters the desktop again, when you use gedit or vim to edit the script, you will find that the command or code in WIN7 (XP) COPY can also be directly pasted into the file opened by gedit or vim in the virtual machine linux.

Third, install TFTP SERVER

Tftpd-hpa is an enhanced TFTP server

# apt install xinetd

# apt-get install tftpd-hpa

(note: do not install the tftp-hpa client, otherwise the board will not be able to TFTP download BIN files)

# mkdir / tftpboot

# chmod-R 777/tftpboot

# gedit / etc/default/tftpd-hpa

Click the above figure to add to the tftpd-hpa file, save exit, reboot virtual machine.

Install IPNC_RDK_V3.8.0-Linux-x86-Install.bin (including cross-compilation environment)

# add the IPNC_RDK_V3.8.0-Linux-x86-Install.binCOPY of APPRO to our shared folder ubuntu16_s set by VMware Tool, and then enter it in the command line terminal of ubuntu16:

# cd / home/davinci/dm8127

# mkdir v3.8.0 (first create v3.8.0 directory under / home/davinci/dm8127 directory)

# chmod-R 777 v3.8.0

# cd / mnt/hgfs/ubuntu16_s/

# chmod + x IPNC_RDK_V3.8.0-Linux-x86-Install.bin

#. / IPNC_RDK_V3.8.0-Linux-x86-Install.bin

Follow the prompts to install to the / home/davinci/dm8127/v3.8.0/ directory to get IPNC_RDK_V3.8.0.tar.gz

And then

# tar zxf IPNC_RDK_V3.8.0.tar.gz

Then get these things.

The cross-compilation tool for compiling the ARM board is placed in the linux-devkit in the figure above. How to compile, we will focus on the two very important total Makefile and total Rules.make in the / home/davinci/dm8127/v3.8.0/Source/ipnc_rdk/ directory.

Finally, in ubuntu16.04, the ipnc_rdk manual emphasizes the need to do:

# apt-get install bison

# apt-get installflex

# apt-get install libacl1-dev

# apt-get install zlib1g-dev

# apt-get install liblzo2-dev

# apt-get install uuid-dev

In addition, you need to do:

# apt-get install libncurses* (note that the * number should be taken)

Otherwise, it is impossible to compile the board's kernel file linux-2.6.37, because the ubuntu16.04.03 kernel version is too advanced, it is linux-4.10.0, and some things need to be updated above to be backward compatible.

And install some very useful tools.

Apt-get install unrar

Apt-get install meld

File folder comparison tool meld is super useful! The important things were emphasized three times.

5. Install NFS SERVER

The APPRO ipnc_rdk installation package has been given a tailored file system that can run on the board:

/ home/davinci/dm8127/v3.8.0/Source/ipnc_rdk/target/filesys

We first need to install NFS SERVER:

# apt-getinstall nfs-kernel-server

# gedit / etc/exports

Click the above figure to add the directory of the NFS file system to be mounted after adding the board

# / usr/sbin/exportfs-av

# / etc/init.d/nfs-kernel-server restart

According to the above method, basically set up the entire DM8127 development environment, using the following command:

# cd / home/davinci/dm8127/v3.8.0/Source/ipnc_rdk/

# make ubootall

To compile uboot, test the ARM cross-compilation environment to see if it compiles properly.

VI. Summary

Well, the entire DM8127 development environment has been set up, and there will inevitably be some mistakes in the above steps. Netizens who see it will be grateful if they can point out here. Compared with the development of IPNC _ RDK V3.8.0 development package, the construction of ubuntu16.04 development environment is actually relatively simple, but it is a headache to develop IPNC_RDK V3.8.0 later. There are too many things and limited personal ability, and the following blog articles can only have a little time to write. Unless you have a high salary to recruit awesome people in this area (those who have done this are really not easy to do), you will have to be tired and bad people. The performance of DM8127 is still good. There are IVS products and ordinary video analysis products used by several large companies in the market for license plate recognition and face recognition, as well as security. Of course, we have not done those more complex algorithms, such as artificial intelligence deep learning algorithm, and we do not know how many frames of images can be processed in one second. I am also unable to draw a conclusion on whether DM8127 is competent or not. But another TI C66X 32-stage pipelined floating-point DSP+EVE can run the depth learning algorithm. It is mentioned here that to make a product with DSP image analysis a little more advanced than IPNC webcam, the development of DM8127 requires: embedded LINUX driver engineer, embedded LINUX application engineer (network protocol, other applications, etc.), DSP algorithm engineer, COMS SENSOR image processing 2A algorithm engineer, the most basic four positions, each position requires a very strong person to do, some complex algorithms need a team to do Some linux applications also need a team to work on, and if the underlying drivers keep rolling out new CMOS SENSOR, it will take several people to do it. In short, the design of a mass-produced product can not be done by 1 or 2 people, of course, hardware engineers are not included. Now I find that only by cooperating with each other can we find a way out. The following is the DM8127 hardware made by our company. the above development environment is based on the company's DM8127 hardware platform. If you need to go deep into the project discussion, you can add my QQ:2505133162.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report