Transplantation of Bluetooth on hi3110 EV 100 Platform

Source: Internet
Author: User

The author's blog address: http://blog.sina.com.cn/samzhen1977

By Sam (zhufeng) sam_code@hotmail.com

 

 

Sam wants to port the Controller Library to the hith hi3100 EV 100 platform. The evaluation is as follows:

1. hi3100 EV 100 is an ARM platform.
2. hi3100 EV 100 uses uclibc.
These two differences determine the need to start porting from the underlying Bluetooth library.

I:
Sam compiled Bluetooth. Ko, hci_usb.ko, L2CAP. Ko from Linux kernel,
Hidp. Ko.

II:
Download the new version of bluez.
Http://www.bluez.org/

III:
Cross-compiled bluez:
Cross-compilation, the new version of bluez to be based on libraries such as D-BUS. So Sam is currently using bluez 1.0.
# Cd bluez-libs-2.12
#
Cc =/opt/hisilicon/toolchains/ARM-uclibc-Linux-soft/bin/ARM-uclibc-Linux-gcc
./Configure
-- Host = arm-Linux
# Make clean; make
# Cd bluez-libs-2.12/src/. libs
Here we can see libbluetooth. So.

IV:
Cross-compile BTX:
In BTX makefile,
Cc: =
/Opt/hisilicon/toolchains/ARM-uclibc-Linux-soft/bin/ARM-uclibc-Linux-gcc

Cflags: =-d_show-d_debugtimeout-wall-I ../include
-I/opt/hisilicon/toolchains/ARM-uclibc-Linux-soft/include/
Lflags: =-L./-l ../Resource
-L/opt/hisilicon/toolchains/sysroot-uclibc-soft/usr/lib
Libbtx. So and btx_test are compiled successfully.
The libbtx. So compilation options are as follows:
$ (CC) $ (cflags) $ (lflags)-FPIC-shared BTX. O-o libbtx. So
-Lbluetooth

However, the following message appears when running btx_test on the hi3110 ev100 platform:
Can't modify. // libbtx. So's
Text section. Use GCC option-FPIC for shared objects,
Please.

Sam had to merge BTX into the program.

V:
Compile javasth_remote:
Cc: =
/Opt/hisilicon/toolchains/ARM-uclibc-Linux-soft/bin/ARM-uclibc-Linux-gcc
Cflags: =-d_show-d_debugtimeout-wall-I ../include
-I/opt/hisilicon/toolchains/ARM-uclibc-Linux-soft/include/lflags
: =-L./-l ../Resource
-L/opt/hisilicon/toolchains/sysroot-uclibc-soft/usr/lib
Compile BTX. C.
Compiled successfully.
However, problems may occur during the operation, resulting in slow response. Sam is still checking.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.