美文网首页
交叉编译bluez-5.50

交叉编译bluez-5.50

作者: 坤kln | 来源:发表于2019-05-29 12:37 被阅读0次

环境:ubuntu 14.04

目标:arm板

交叉编译器:arm-poky-linux-gnueabi-gcc 5.3.0

configure参数

./configure --prefix=/home/用户/arm/bluez/usr --mandir=/home/用户/arm/bluez/usr/share/man --sysconfdir=/home/用户/arm/bluez/etc --localstatedir=/home/用户/arm/bluez/var --host=arm-none-linux --target=arm-none-linux --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd --with-udevdir=/lib/udev/ --enable-library --enable-static=yes --enable-shared=yes 

configure参数(分行,方便复制)

./configure --prefix=/home/用户/arm/bluez/usr \
--mandir=/home/用户/arm/bluez/usr/share/man \
--sysconfdir=/home/用户/arm/bluez/etc \
--localstatedir=/home/用户/arm/bluez/var \
--host=arm-none-linux \
--target=arm-none-linux \
--with-systemdsystemunitdir=/lib/systemd/system \
--with-systemduserunitdir=/usr/lib/systemd \
--with-udevdir=/lib/udev/ \
--enable-library \
--enable-static=yes \
--enable-shared=yes 

我编译时的错误:

错误1:checking for GLIB... no
configure: error: GLib >= 2.28 is required

安装命令:sudo apt-get install libglib2.0

///////////////////////////////////////////////////////////////////////////////////////////

错误2:checking for DBUS... no
configure: error: D-Bus >= 1.6 is required

安装命令:sudo apt-get install libdbus-1-dev

///////////////////////////////////////////////////////////////////////////////////////////

错误3:checking for UDEV... no
configure: error: libudev >= 172 is required

安装命令:sudo apt-get install libudev-dev

///////////////////////////////////////////////////////////////////////////////////////////

错误4:checking for ICAL... no
configure: error: libical is required

安装命令:sudo apt-get install libical-dev

///////////////////////////////////////////////////////////////////////////////////////////

错误5:checking for readline/readline.h... no
configure: error: readline header files are required

安装命令:sudo apt-get install libreadline-dev

///////////////////////////////////////////////////////////////////////////////////////////

在常规configure成功后,设置交叉编译环境,我时直接加载交叉编译环境的

source /opt/fsl-imx-fb/qt5/environment-setup-cortexa9hf-neon-poky-linux-gnueabi

重新用上面的命令configure,生成Makefile文件,之后

make

sudo make install

make install会报错,修改系统文件失败,而且是修改当前ubuntu14的配置文件,交叉编译的生成文件都应该要复制到arm板的,不知道是不是有些配置不对的问题,不过由于arm板上已经有bluez5.3版本,所以我复制了5.5版本的文件覆盖过去,并没什么问题出现

bluez5.5支持以参数的方式直接调用bluetoothctl,比如:

bluetoothctl connect E3:28:E9:24:21:07

而bluez5.3则需要先执行bluetoothctl,然后再输入命令,不过我后来发现可以用如下方式使用

输入 echo -e "<command1>\n<command2>\n" | bluetoothctl 来自动化bluetoothctl命令

编译出来的文件如图:

image image image

参考:

https://blog.csdn.net/tonyfield2015/article/details/79668445

https://blog.csdn.net/wang_shuai_ww/article/details/41720605

https://blog.csdn.net/u010659887/article/details/85115625

相关文章

  • 交叉编译bluez-5.50

    环境:ubuntu 14.04 目标:arm板 交叉编译器:arm-poky-linux-gnueabi-gcc ...

  • ITOP 4412 交叉编译环境 的搭建

    1 交叉编译工具### 编译的时候需要用到交叉编译工具,提供的交叉编译工具是用户光盘“02_编译器以及烧写工具”→...

  • golang进行交叉编译

    golang进行交叉编译 交叉编译即编译不同操作系统平台的可执行程序 golang执行交叉编译,只需要使用两个变量...

  • 交叉编译

    配置64位ubuntu交叉编译环境时,设置arm的工具链的路径,需要先安装lib32stdc++6 然后在~/.b...

  • 交叉编译

    在一种计算机环境中运行的编译程序,能编译出在另外一种环境下运行的代码,我们就称这种编译器支持交叉编译。这个编译过程...

  • 交叉编译

    使用go的交叉编译 最后使用go build windows_fping.go 编译出.exe可执行文件 如果编译...

  • 交叉编译

    1.为啥需要交叉编译?因为linux 系统上的gcc 在android 系统上没法正常调用,所有需要使用andro...

  • 在Linux环境交叉编译Qt5.5.0源码及编译示例

    在Linux环境交叉编译Qt5.5.0源码及编译示例 实验环境 交叉编译平台 (on VMware14.0,Win...

  • debian 交叉编译 openssl

    使用上次编译的 交叉编译工具链来编译openssl如果没建立交叉编译环境的先阅读:编译工具链子制作神器 – cro...

  • 交叉编译freetype

    交叉编译freetype 下载FreeType freetype官网 freetype2.8.1下载 交叉编译 查...

网友评论

      本文标题:交叉编译bluez-5.50

      本文链接:https://www.haomeiwen.com/subject/finetctx.html