Pjsip Porting to Hisilicon SOC
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.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
Pjsip Porting to Hisilicon SOC的更多相关文章
- Hi3518 网络监控SOC芯片规格参数
Hi3518 网络监控SOC芯片 视频编解码 处理器内核 ● ARM926@ 440MHz,16KB I-Cache ,16KB D-Cache 视频编码 ● H.264 Main Pro ...
- SOC,System on-a-Chip技术初步
SOC,System on-a-Chip技术初步 S O C(拼作S-O-C)是一种集成电路,它包含了电子系统在单个芯片上所需的所有电路和组件.它可以与传统的计算机系统形成对比,后者由许多不同的组件组 ...
- SOC芯片的FPGA原型验证
FPGA验证在SOC设计非常重要,一般而言,做一些RAM和FIFO的替换以及相应代码转换.具体分下面几步: 1 替换RAM,FIFO和时钟 RAM和FIFO控制器需要RAM的接口都放在了设计顶层,方便 ...
- 我所理解的SoC
前阵子出去找工作,有的人不太理解,你们SoC有什么可做的,不就是找几个IP来搭积木嘛.你那个FPGA prototyping有什么可做的,不就是编一个镜像嘛. 正好,新项目,重新开始做一颗SoC.接下 ...
- iOS之 PJSIP蓝牙外设音频支持
如题,蓝牙设备作为音频输出,在app中如果包含VoIP那么就要设定当连接蓝牙设备时候是否选择或者支持蓝牙输出 最近在处理一个工单就是公司的voip-app与硬件话机底座联调(蓝牙2.0)坑爹的如果是4 ...
- Altera SoC与Matlab的联合---第一步 软件安装与硬件测试
参考设计:http://cn.mathworks.com/help/hdlcoder/examples/getting-started-with-hardware-software-codesign- ...
- IOS 之 PJSIP 笔记(二) iPJSUA 的简单使用
上一篇在编译完之后,就很不负责的结束了,本篇就对 PJSIP 库中提供的一个示例 iPJSUA 的使用,做一个简单的介绍.也能解除很多人对官方文档的一个困扰,起码我是被困扰过了. 首先,要确保你的 P ...
- IOS 之 PJSIP 笔记(一) 编译多平台支持的静态库
好久没有写博客了,这也算是我步入新工作后的第一篇技术博文吧.在进入新公司前,早就有了技术层进入下一个迭代的准备,但很多事情是意想不到的,就像我以 C# 程序员的身份面试入职的,而今却是一个全职的 IO ...
- iOS之 PJSIP静态库编译(二)
咱们书接上回: 上一篇编译好了PJsip这次我们来点实战 上次编译过后就不必做别的修改因为ios平台的库都支持了. 打开工程 找到 pjsip- apps/src/pjsua/ios/ipjsua ...
随机推荐
- CF671D Roads in Yusland
一道很玄妙的题= = 我们考虑先考虑DP 那么有$f[x]=min(c+\sum f[y])$ $f[x]$表示覆盖x的子树和x->fa[x]的所有边最小代价 我们枚举一条边c覆盖的x-> ...
- bat 获取系统日期,时间,并去掉时间小时前面的空格和时间后面的空格
@echo off rem BAT获取系统日期,时间,并去掉时间小时前面的空格和时间后面的空格 echo *** %DATE% echo *** %TIME% set THISDATE=%DATE:~ ...
- [洛谷P3205] HNOI2010 合唱队
问题描述 为了在即将到来的晚会上有更好的演出效果,作为AAA合唱队负责人的小A需要将合唱队的人根据他们的身高排出一个队形.假定合唱队一共N个人,第i个人的身高为Hi米(1000<=Hi<= ...
- 破解 MyEclipse For Spring 的步骤
破解 MyEclipse For Spring 的步骤: 1.关闭myeclipse: 2.运行破解工具,写上UserCode,最好是 8 位以上, 3.注意选择 myeclipse 的版本,我提供的 ...
- 基于canvas实现的高性能、跨平台的股票图表库--clchart
什么是 ClChart? ClChart是一个基于canvas创建的简单.高性能和跨平台的股票数据可视化开源项目.支持PC.webApp以及React Native和Weex等平台.在React Na ...
- 使用iScroll时input复选框不能选中解决方法
http://blog.csdn.net/xw505501936/article/details/51886018
- jQuery file upload测试
<input id="fileupload" type="file" name="files[]" data-url="Ha ...
- NOIP 2010 P1514 引水入城
题目:传送门 题目概要:有一个n行m列的矩阵,每一个格子都有一个高度,路径只能从高处向低处扩散,问你如果最后一行可以全部被覆盖,最少要从第一行多少个格子开始,如果不能使最后一行全部被覆盖,求有多少个格 ...
- chrome 手机端滑动列表的时候控制台会出现很多提示的解决办法
问题: Unable to preventDefault inside passive event listener 可以加入touch-action 属性,具体参照MDN, https://deve ...
- English-taxonomy
域.界.门.纲.目.科.属.种 Domain, Kingdom, Phylum, Class, Order, Family, Genus, Species