全志Miracast source移植
> Date:2021-12-7基于V536 + AP6255实现Miracast source功能移植及实现
1. 环境配置
1.1 V536环境配置
- 在sdk目录下source build/envsetup.sh
- 输入lunch
- 选择需要的响应的板型
1.2 菜单配置
- 在sdk根目录执行make menuconfig,依照下面的配置依次配置
>make menuconfig
Global build settings --->
Enable IPv6 support in packages ---> enable
Base system >
busybox >
linux system utilities >
----> mount
Libraries >
gnome ---> glib2
---> glib-networking
Mutimedia ----> gstreamer1 全勾上
Mutimedia ----> gstreamer1-plugins-bad
---->openglmixers取消
Mutimedia---->gstreamer1-plugins-ugly
---->libgstmpeg2dec取消
Utilities >
----> dbus
Network >
---- > wpa-cli
---- >wpa-supplicant-p2p
1.3 编译sdk并把新生成的镜像烧录到机器端
- make -j && pack
- 将生成的镜像文件tina_v536-cdr_uart0_nor.img烧录到机器端
2. miracast源码下载
从Miracast官网把源码下载下来,网址为:https://github.com/intel/wds。
直接在用git下载
git clone https://github.com/intel/wds.git
3.编译Miracast
3.1 修改交叉编译工具链
可以把Miracast源码拷贝到任何路径或者V536 sdk目录中,Miracast是由cmake工程创建,在顶层目录修改CMakeLists.txt来更改交叉编译工具链,主要为替换V536sdk中的交叉编译工具链prebuilt/gcc/linux-x86/arm/toolchain-sunxi-musl/toolchain
目录下,修改如下:
-enable_testing()
+set(CMAKE_SYSTEM_NAME Linux)
-option(WDS_INSTALL_TESTS "Install test programs" off)
+add_definitions(-D AWCHIP=0x1721 -std=c++11)
-include(GNUInstallDirs)
+set(TOOLCHAIN_PATH /home1/maliankang/workspace/v536/lindenis/prebuilt/gcc/linux-x86/arm/toolchain-sunxi-musl/toolchain/bin)
+
+add_compile_options(-fPIC -Wall -Wno-unused-but-set-variable -Wno-unused-function -Wno-unused-variable -Wno-unused-label -mfloat-abi=hard -D__OS_LINUX)
+
+set