1. 下载http://code.google.com/p/rowboat/专用的android2.3 从这里下载和官方的区别是
增加了两个目录
/hardware/ti/omx
/external/ti-dsp
2.DVSDK: Digital video software development kit
里面有dsplink,dsp/bios,codec-enginer,codec-omap3530专用编解码器,dvtb,demo,linux内核
3.dvsdk安装到android中
ti-dsp/目录下有
fake-toolchain get_tidsp.sh install_dvsdk4.exp Makefile md5sum.list patches
包含了安装脚本,方便对dvsdk的安装,包括环境配置,脚本文件先判断有没有安装的目录是否已经安装好
再看有没有安装包,最后就是打补丁
运行脚本的时候需要装expect
tcl8.5.12-src.tar.gz tk8.5.12-src.tar.gz expect5.45.tar.gz
./configure
make
make install
默认安装的路径是/usr/local/
所以需要改ti-dsp里的脚本
install_dvsdk4.exp
#!/usr/local/bin/expect -f
编译android的时候进行安装
android/build/core/rowboat.mk
DSP_PATH := $(wildcard external/ti-dsp)
编译omx和ti-dsp,omx要使用ti-dsp的dvsdk中的库所又先编译
make -C external/ti-dsp combo_target=$(combo_target) $(combo_target)TOOLS_PREFIX=$($(combo_target)TOOLS_PREFIX) HOST_PREBUILT_TAG=$(HOST_PREBUILT_TAG)
make -C hardware/ti/omx combo_target=$(combo_target) $(combo_target)TOOLS_PREFIX=$($(combo_target)TOOLS_PREFIX) HOST_PREBUILT_TAG=$(HOST_PREBUILT_TAG)
4.编译完后会自动把生成的库复制到文件系统中
cp /hardware/ti/omx/video/libomx_dsp_video_sharedlibrary.so
out/target/product/myboard/system/lib
cp /hardware/ti/omx/audio/libomx_dsp_audio_sharedlibrary.so
out/target/product/myboard/system/lib
cp /hardware/ti/omx/interface/libdspengineiface.so
out/target/product/myboard/system/lib
5.生成ko
out/target/product/myboard/system/ti-dsp/
cmemk.ko cs.x64P dsplinkk.ko lpm_omap3530.ko sdmak.ko
修改init.rc
# load DSP modules
insmod /system/ti-dsp/cmemk.ko "phys_start=0x84f00000 phys_end=0x85900000 allowOverlap=1 useHeaplfPooIUnavailable=1"
insmod /system/ti-dsp/dsplinkk.ko
insmod /system/ti-dsp/lpm_omap3530.ko
insmod /system/ti-dsp/sdmak.ko