根据GSG的wiki:http://processors.wiki.ti.com/index.php/DMAI_GStreamer_Plug-In_Getting_Started_Guide#Building_DM6446_kernel.2C_DVSDK.2C_and_GStreamer_software_.282.00.00.22.29
进行操作
从 https://gstreamer.ti.com/gf/project/gstreamer_ti/frs/ 下载gst-ti-plugin-full-1.02.00
进行了如下的操作
1 MV环境工具链升级
1 )pkg-config update pkg-config-0.18
2 )Flex版本更新升级到 flex-2.5.35
2 修改DVSDK下 “Rules.make”,重新编译DVSDK (顺利完成)
make DVSDK_INSTALL_DIR=$HOME/dvsdk_2_00_00_22 TARGET_ROOT_DIR=$HOME/workdir/filesys CROSS_COMPILER=MVL_5_0 CODEGEN_INSTALL_DIR=$HOME/cg6x_6_0_21 CODEC_INSTALL_DIR=$HOME/dvsdk_2_00_00_22/dm6446_dvsdk_combos_2_05 PLATFORM=dm6446 clean check cmem dmai install
3 修改顶层文件夹下“makefile.common” 其实没有修改,应为编译命令指定了
echo=echo make DVSDK_INSTALL_DIR=$HOME/dvsdk_2_00_00_22 TARGET_ROOT_DIR=$HOME/workdir/filesys CROSS_COMPILER=MVL_5_0 CODEGEN_INSTALL_DIR=$HOME/cg6x_6_0_21 CODEC_INSTALL_DIR=$HOME/dvsdk_2_00_00_22/dm6446_dvsdk_combos_2_05 VERBOSE=1 PLATFORM=dm6446 all install | tee log.log
等价于在makefile.common中直接修改
#——————————————————————————
DVSDK_INSTALL_DIR =
TARGET_ROOT_DIR =
GSTREAMER_DIR = opt/gstreamer
CROSS_COMPILER =
GST_TI_PLATFORM =
#——————————————————————————
报的错误
make[8]: Entering directory `/root/gst-ti-plugin-full-1.02.00/opensource_build/liboil-0.3.16/examples'
/bin/sh ../libtool –tag=CC –mode=link /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-gcc -O2 -march=armv5te -mtune=arm926ej-s -L/root/workdir/filesys/opt/gstreamer/lib -o memcpy-speed memcpy_speed-memcpy-speed.o ../liboil/liboil-0.3.la -lm -lrtlibtool: link: /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-gcc -O2 -march=armv5te -mtune=arm926ej-s -o .libs/memcpy-speed memcpy_speed-memcpy-speed.o -L/root/workdir/filesys/opt/gstreamer/lib ../liboil/.libs/liboil-0.3.so -L/opt/filesys//opt/gstreamer/lib -lm -lrt -Wl,-rpath -Wl,/root/workdir/filesys/opt/gstreamer/lib
memcpy_speed-memcpy-speed.o: In function `main':
memcpy-speed.c:(.text+0x198): undefined reference to `oil_function_class_ptr_sum_s16'
collect2: ld returned 1 exit status
make[8]: *** [memcpy-speed] Error 1
fan chuankang:
定位到具体错误(memcpy-speed.c)
switch(the_class) { case 0: klass = oil_class_get ("splat_u32_ns"); break; case 1: klass = oil_class_get ("copy_u8"); break; case 2: klass = oil_class_get ("sum_s16"); break; }
注释掉对应错误的行也无济于事,
应为 该文件每次编译时候是动态生成的(从glib中解压)
具体 log记录如下
……
make[4]: Entering directory `/root/gst-ti-plugin-full-1.02.00/opensource_build'***** Extracting liboiltar vxzf /root/gst-ti-plugin-full-1.02.00/opensource_build/distfiles/liboil-0.3.16.tar.gzliboil-0.3.16/liboil-0.3.16/m4/
……省略
liboil-0.3.16/examples/Makefile.amliboil-0.3.16/examples/Makefile.inliboil-0.3.16/examples/example1.cliboil-0.3.16/examples/memcpy-speed.c
fan chuankang:
回复 fan chuankang:
怀疑是编译指令出错,特别是
-L/opt/filesys//opt/gstreamer/lib
根本没有这样两路径,怀疑是预定义错误,但是不知道怎么修改。
因为是采用automake技术,读取makefile.am生成makefile.in以及makefile。
这样的定义不知道怎么修改。
fan chuankang:
回复 fan chuankang:
生成的makefile相应脚本内容:
memcpy_speed-memcpy-speed.o: memcpy-speed.c if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memcpy_speed_CFLAGS) $(CFLAGS)
-MT memcpy_speed-memcpy-speed.o
-MD -MP
-MF "$(DEPDIR)/memcpy_speed-memcpy-speed.Tpo"
-c
-o memcpy_speed-memcpy-speed.o `test -f 'memcpy-speed.c' || echo '$(srcdir)/'`memcpy-speed.c; \ then
mv -f "$(DEPDIR)/memcpy_speed-memcpy-speed.Tpo" "$(DEPDIR)/memcpy_speed-memcpy-speed.Po";
else
rm -f "$(DEPDIR)/memcpy_speed-memcpy-speed.Tpo"; exit 1; fi