1)HiSilicon Compiler

arm-himix100-linux.tgz or arm-himix100-linux.tgz

#Installation instructions are included in the compiler package

There is three files in the folder: arm-himix100-linux.tar.bz2, runtime_uclibc.tgz and arm-himix100-linux.install.
The arm-himix100-linux.install is a shell script to install the arm-himix100-linux toolchain.
You can use
    source ./arm-himix100-linux.install
command line to install toolchain in /opt/hisi-linux/x86-arm.

Or you can use
    source ./arm-himix100-linux.install dirname
command line to install toolchain in the "dirname" which you Specified.

For now, you can use toolchain like arm-himix100-linux-xxx in everywhere.

#After installation, if the compiler is not recognized, you need to add the following environment variables.
export PATH=/opt/hisi-linux/x86-arm/arm-himix100-linux/bin:$PATH
export PATH=/opt/hisi-linux/x86-arm/arm-himix200-linux/bin:$PATH

2)pjsip cross-compile

https://www.pjsip.org/

https://www.alsa-project.org/wiki/Main_Page

_build.sh

#compiler setup
if [[ $ = 'arm' ]]; then
compiler=`CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++`
host=arm-linux-gnueabihf
elif [[ $ = 'himix100' ]]; then
compiler=`CC=arm-himix100-linux-gcc CXX=arm-himix100-linux-g++`
host=arm-himix100-linux
elif [[ $ = 'himix200' ]]; then
compiler=`CC=arm-himix200-linux-gcc CXX=arm-himix200-linux-g++`
host=arm-himix200-linux
else
:
fi #Preinstalled directory
install=${HOME}/_install #Delete installed directory
rm -rf ${install} #library path
pkg_config=${install}/lib/pkgconfig
lib_config=`CPPFLAGS=-I${install}/include CFLAGS=-I${install}/include LDFLAGS=-L${install}/lib` #Delete compiled directory
for i in `ls .`
do
if [ -d $i ];then
rm -rf $i
fi
done tar xvf alsa-lib-*
cd alsa-lib-*
./configure ${compiler} --prefix=${install} --host=${host}
make && make install
cd .. tar xvf alsa-utils-*
cd alsa-utils-*
./configure ${compiler} --prefix=${install} --host=${host} PKG_CONFIG_PATH=${pkg_config} ${lib_config} --enable-static --enable-shared --disable-alsamixer --disable-xmlto
touch ./alsaconf/po/t-ja.gmo
touch ./alsaconf/po/t-ru.gmo
make && make install
cd .. tar xvf pjproject-*
cd pjproject-*
./configure ${compiler} --prefix=${install} --host=${host} PKG_CONFIG_PATH=${pkg_config} ${lib_config} --enable-static --enable-shared --disable-libwebrtc
make dep
make && make install
cd .. export PATH=$PATH:${install}/bin
export LD_LIBRARY_PATH=${install}/lib:$LD_LIBRARY_PATH
export ALSA_CONFIG_PATH=${install}/share/alsa/alsa.conf

dong@ubuntu:~/pjsip$ su
Password:
root@ubuntu:/home/dong/pjsip# ./_install.sh arm
root@ubuntu:~# tar cvf _install.tar.gz _install/
root@ubuntu:~# mv _install.tar.gz ${HOME}
dong@ubuntu:~$ sudo chmod 777 _install.tar.gz

4)#Compiling samples with library files

#simpleua

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${HOME}/_install/lib/pkgconfig
export PKG_CONFIG_PATH
gcc -g simpleua.c -o simpleua `pkg-config libpjproject alsa --libs --cflags`

#siprtp (sip + rtp)

gcc -g siprtp.c -o siprtp `pkg-config libpjproject alsa --libs --cflags`

USAGE:
   siprtp [options]        => to start in server mode
   siprtp [options] URL    => to start in client mode

Program options:
   --count=N,        -c    Set number of calls to create (default:1)
   --gap=N           -g    Set call gapping to N msec (default:0)
   --duration=SEC,   -d    Set maximum call duration (default:unlimited)
   --auto-quit,      -q    Quit when calls have been completed (default:no)
   --call-report     -R    Display report on call termination (default:yes)

Address and ports options:
   --local-port=PORT,-p    Set local SIP port (default: 5060)
   --rtp-port=PORT,  -r    Set start of RTP port (default: 4000)
   --ip-addr=IP,     -i    Set local IP address to use (otherwise it will
                           try to determine local IP address from hostname)

Logging Options:
   --log-level=N,    -l    Set log verbosity level (default=5)
   --app-log-level=N       Set app screen log verbosity (default=3)
   --log-file=FILE         Write log to file FILE
   --report-file=FILE      Write report to file FILE

server:

root@ubuntu:/home/dong/pjsip_example# ./siprtp -i 172.16.23.86
::26.981 os_core_unix.c !pjlib 2.9 for POSIX initialized
::26.981 siprtp.c SIP UDP listening on 172.16.23.86:
::27.030 siprtp.c Ready for incoming calls (max=) Enter menu character:
s Summary
l List all calls
h Hangup a call
H Hangup all calls
q Quit >>> ::40.698 siprtp.c ..Call # connected in ms
l
List all calls:
Call #: CONFIRMED [duration: ::26.777]
To: <sip:172.16.23.241>;tag=PKcMBzp6yhIZQG-du1TsYkW1MPmX6L5V
Signaling quality: got 1st response in ms, connected after: ms
Stream #: audio PCMU@8000Hz, 20ms/frame, .00KB/s (.06KB/s +IP hdr)
RX stat last update: 00h:00m:.350s ago
total .03K packets .02KB received (.09KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.000 0.451 0.750 0.500
TX stat last update: 00h:00m:.450s ago
total .03K packets .02KB sent (.09KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.250 0.406 0.625 0.250
RTT delay : 0.595 0.686 0.793 0.793 >>>

client:

root@ubuntu:/home/dong/pjsip_example# ./siprtp -i 172.16.23.241 sip:172.16.23.86
::40.719 os_core_unix.c !pjlib 2.9 for POSIX initialized
::40.719 siprtp.c SIP UDP listening on 172.16.23.241:
::40.746 siprtp.c Making calls to sip:172.16.23.86..
::40.748 siprtp.c ....Call # connected in ms Enter menu character:
s Summary
l List all calls
h Hangup a call
H Hangup all calls
q Quit >>> l
List all calls:
Call #: CONFIRMED [duration: ::45.817]
To: sip:172.16.23.86;tag=PKcMBzp6yhIZQG-du1TsYkW1MPmX6L5V
Signaling quality: got 1st response in ms, connected after: ms
Stream #: audio PCMU@8000Hz, 20ms/frame, .00KB/s (.06KB/s +IP hdr)
RX stat last update: 00h:00m:.480s ago
total .02K packets .06KB received (.07KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.000 0.427 0.875 0.250
TX stat last update: 00h:00m:.337s ago
total .02K packets .06KB sent (.07KB +IP hdr)
pkt loss= (0.0%), dup= (0.0%), reorder= (0.0%)
(msec) min avg max last
loss period: 0.000 0.000 0.000 0.000
jitter : 0.375 0.446 0.625 0.375
RTT delay : 0.488 0.673 0.793 0.686 >>>

5)#_install environment variables
export PATH=$PATH:$(pwd)/_install/bin
export LD_LIBRARY_PATH=$(pwd)/_install/lib:$LD_LIBRARY_PATH
export ALSA_CONFIG_PATH=$(pwd)/_install/share/alsa/alsa.conf

6)#hi3516 mpp environment variables
export LD_LIBRARY_PATH=$(pwd)/_install/mpp/lib/:$LD_LIBRARY_PATH

7)#nfs to ubuntu
1. mount /dev/sda3 /root/disk
2. minicom
3. nfs

pc:
sudo vi /etc/exports
/home/dong/_install *(rw,sync,no_root_squash,no_subtree_check)
sudo /etc/init.d/nfs-kernel-server restart
sudo /etc/init.d/rpcbind restart
sudo ifconfig eth0 172.16.23.157 broadcast 172.16.23.254 netmask 255.255.255.0

board:
ifconfig eth0 up
udhcpc -i eth0

#172.16.23.158

ifconfig eth0 172.16.23.158 broadcast 172.16.23.254 netmask 255.255.255.0
mount -t nfs -o nolock 172.16.23.157:/home/dong/_install /root/_install

8)loader soc driver

cd /_install/mpp/ko

chmod +x *

~/_install/mpp/ko # ./load3516ev300                                             
mmz_start: 0x42000000, mmz_size: 96M                                            
Usage:  ./load3516ev300 [-option] [sensor_name]                                 
options:                                                                        
    -i                       insert modules                                     
    -r                       remove modules                                     
    -a                       remove modules first, then insert modules          
    -sensor sensor_name      config sensor type [default: imx307]               
    -h                       help information                                   
Available sensors: imx307 imx327 sc4236 etc.                                    
for example: ./load3516ev300 -i -sensor imx307 -osmem 32M -board demo -yuv0 0   
                                                                                
~/_install/mpp/ko # ./load3516ev300 -i -sensor imx307 -osmem 32M -board demo -yuv0 0                                                                            
sh: 32M: bad number                                                             
mmz_start: 0x42000000, mmz_size: 96M                                            
sys_config: loading out-of-tree module taints kernel.                           
==== online_flag=0, cmos_yuv_flag=0, sensor=imx307, chip=hi3516ev300, board=dem=
==== g_quick_start_flag=0 ====                                                  
sysconfig init success!                                                         
Module himedia: init ok                                                         
Hisilicon Media Memory Zone Manager                                             
hi_osal 1.0 init success!                                                       
hi3516ev200_base: module license 'Proprietary' taints kernel.                   
Disabling lock debugging due to kernel taint                                    
load sys.ko for Hi3516EV200...OK!                                               
load tde.ko for HI3516EV200...OK!                                               
load region.ko for Hi3516EV200...OK!                                            
load vgs.ko for Hi3516EV200...OK!                                               
load vi.ko for Hi3516EV200...OK !                                               
ISP Mod init!                                                                   
load vpss.ko for Hi3516EV200...OK!                                              
load vo.ko for Hi3516EV200...OK!                                                
load hifb.ko OK!                                                                
load chnl.ko for Hi3516EV200...OK!                                              
load vedu.ko for Hi3516EV200...OK!                                              
load rc.ko for Hi3516EV200...OK!                                                
load venc.ko for Hi3516EV200...OK!                                              
load h264e.ko for Hi3516EV200...OK!                                             
load h265e.ko for Hi3516EV200...OK!                                             
load jpege.ko for Hi3516EV200...OK!                                             
load ive.ko for Hi3516EV200...OK!                                               
Load sensor_spi.ko for Hi3516EV200...OK !                                       
load hi_piris.ko OK!!                                                           
insert audio                                                                    
load mipi_rx driver successful!                                                 
~/_install/mpp/ko #

9)enable soc audio pin

audio_enable.sh

cd /sys/class/gpio
echo > export
cd gpio8
echo out > direction
sleep
echo > value

10)mpp sample

cd /root/_install/mpp/sample/audio

./sample 0 48000

最新文章

  1. hash表及Java中的HashMap与HashSet
  2. Spring MVC 处理静态资源文件
  3. 通过sougou输入法,解决卡在Setup Wizard(小绿人)界面
  4. 用gulp建立自动工具,完成软件的编译、测试、打包和发布流程
  5. DOM操作优化
  6. B+树|MYSQL索引使用原则
  7. openvswitch常用操作
  8. django学习之Model(一)
  9. Android中的“再按一次返回键退出程序”实现[转]
  10. SQL中的左连接与右连接有什么区别,点解返回值会不同?(转)
  11. js经典闭包
  12. [Swift]LeetCode85. 最大矩形 | Maximal Rectangle
  13. react create-react-app 跨域
  14. PHP7.2中安装mcrypt扩展的问题
  15. win10如何获得管理员权限_百度经验
  16. Spring源码阅读(二)
  17. bzoj3196 二逼平衡树
  18. python下使用opencv拍照
  19. SVN版本冲突,导致出现Files 的值“ &lt; &lt; &lt; &lt; &lt; &lt; &lt; .mine”无效。路径中具有非法字符。
  20. [To Selina] 《撒野》读后感

热门文章

  1. prufer 序列 学习笔记
  2. PDO扩展
  3. css 响应式(媒介查询)
  4. 1N4148
  5. php current()函数 语法
  6. php substr_count()函数 语法
  7. GEI步态能量图生成
  8. 【转】Office 2003 EXCEL多窗口打开
  9. [hadoop](2) MapReducer:Distributed Cache
  10. 01.cordova 安装及项目创建