E9 bluez5.18 implement

Refer to: http://blog.sina.com.cn/s/blog_7cedb56d0102v0r3.html

  1. compile system: ubuntu12.04
  2. test board: E9(imx6dq)
  3. arm-none-linux-gnueabi-gcc 4.6.2
  4. bluez-5.18:  http://www.bluez.org/  or   http://www.kernel.org/pub/linux/bluetooth
  5. source code: bluez-5.18.tar
  6. decompression
    $ sudo tar –zxvf bluez-5.18.tar
  7. enter the source code
  8. $ vi READE
  9. Install depend lib
$ sudo apt install libdbus-1-dev libudev-dev libical-dev libreadline-dev

These dependency can’t work when configure the bluez-5.18. It should install these dependency below manually.

8.1Glib
(1)zlib
#wget http://zlib.net/zlib-1.2.11.tar.gz

#tar -xzf zlib-1.2.11.tar.gz

#cd zlib-1.2.11/

#./configure --prefix=/home/ublox/Download/arm-linux
# vi Makefile  and change
CC=arm-none-linux-gnueabi-gcc

LDSHARED=arm-none-linux-gnueabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map CPP=arm-none-linux-gnueabi-gcc -E

AR=arm-none-linux-gnueabi-ar

RANLIB=arm-none-linux-gnueabi-ranlib
(2)libffi
#wget ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz

#tar -xzf libffi-3.0.13.tar.gz

#cd libffi-3.0.13/

#./configure --host=arm-none-linux-gnueabi  --prefix=/home/ublox/Downloads/arm-linux
#make CC= arm-none-linux-gnueabi-gcc
#make CC= arm-none-linux-gnueabi-gcc  install
(3)Glib
#wget http://ftp.gnome.org/pub/gnome/sources/glib/2.40/glib-2.40.0.tar.xz

#tar -xJf glib-2.40.0.tar.xz

#cd glib-2.40.0

#./configure --host=arm-none-linux-gnueabi --prefix=/home/ublox/Downloads/arm-linux PKG_CONFIG_PATH=/home/ublox/Downloads/arm-linux/lib/pkgconfig glib_cv_stack_grows=no glib_cv_uscore=yes ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes

#make CC= arm-none-linux-gnueabi-gcc

#make CC= arm-none-linux-gnueabi-gcc  install

 


8.2dbus
(1) The Expat XML Parser
#wget http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz
#tar -xzf expat-2.1.0.tar.gz

#cd expat-2.1.0/
#./configure --host=arm-none-linux-gnueabi --prefix=/home/ublox/Downloads/arm-linux
# make CC= arm-none-linux-gnueabi-gcc
# make CC= arm-none-linux-gnueabi-gcc install
(2)dbus
#wget https://launchpad.net/ubuntu/+source/dbus/1.6.12-0ubuntu10/dbus_1.6.12.orig.tar.gz
or
#wget http://dbus.freedesktop.org/releases/dbus/dbus-1.8.0.tar.gz

#tar -xzf dbus-1.8.0.tar.gz

#cd dbus-1.8.0/

#./configure --host=arm-none-linux-gnueabi --prefix=/home/ublox/Downloads/arm-linux LDFLAG=-L/home/ublox/Downloads/arm-linux/lib  CPFLAG=-I/home/ublox/Downloads/arm-linux/include      
//specify the path of lib and header(xx.h) file

#make
#make install
8.3libical
# sudo apt-get install cmake

#wget http://downloads.sourceforge.net/freeassociation/libical-1.0.tar.gz
#tar -xzf libical-1.0.tar.gz

#cd libical-1.0/
#export CC=arm-none-linux-gnueabi-gcc
#export CXX=arm-none-linux-gnueabi-g++

#cmake -DCMAKE_INSTALL_PREFIX=/home/ublox/Downloads/arm-linux
#make

#make install
8.4Readline
(1) ncurses
#wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz

#tar -xzf ncurses-5.9.tar.gz

#cd ncurses-5.9

#./configure --host=arm-none-linux-gnueabi --prefix=/home/ublox/Downloads/arm-linux
 CXX="arm-none-linux-gnueabi-g++"

#make

#make install

(2)readline

#wget ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz
#tar -xzf readline-6.3.tar.gz

#cd readline-6.3/

#./configure --host=arm-none-linux-gnueabi --prefix=/home/ublox/Downloads/arm-linux bash_cv_wcwidth_broken=yes
#make SHLIB_LIBS=-lncurses
problem:

solve:
# sudo cp -rf libncurses* /opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/lib/gcc/arm-fsl-linux-gnueabi/4.6.2/

#make install

 

  1. Bluez

#wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.18.tar.xz
#tar -xJf bluez-5.18.tar.xz

#cd bluez-5.18
#./configure --host=arm-none-linux-gnueabi --prefix=/home/ublox/Downloads/arm-linux    PKG_CONFIG_PATH=/home/ublox/Downloads/arm-linux/lib/pkgconfig --disable-systemd --disable-udev --disable-cups --disable-obex --enable-library  --enable-experimental
 

Problem1:

Can’t find header file readline/readline.h even through set the CPPFLAGS=-I/home/ublox/Downloads/arm-linux/include/readline
solve1: 
#echo 'main(){}' | arm-none-linux-gnueabi-gcc -E -v -
arm-none-linux-gnueabi-gcc will seach the header file by default,so copy the /home/ublox/Downloads/arm-linux/include/readline to /opt/Embedsky/…./lib/gcc….4.6.2/include/


#make
#make install DESTDIR=$PWD/temp
 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值