Home | History | Annotate | only in /system/bt
Up to higher level directory
NameDateSize
.clang-format21-Aug-2018808
.gn21-Aug-2018884
Android.bp21-Aug-2018327
Android.mk21-Aug-201837
audio_a2dp_hw/21-Aug-2018
audio_hearing_aid_hw/21-Aug-2018
binder/21-Aug-2018
bta/21-Aug-2018
btcore/21-Aug-2018
btif/21-Aug-2018
build/21-Aug-2018
BUILD.gn21-Aug-20181.4K
CleanSpec.mk21-Aug-20182.4K
conf/21-Aug-2018
device/21-Aug-2018
doc/21-Aug-2018
embdrv/21-Aug-2018
EventLogTags.logtags21-Aug-20181.3K
hci/21-Aug-2018
include/21-Aug-2018
internal_include/21-Aug-2018
main/21-Aug-2018
MODULE_LICENSE_APACHE221-Aug-20180
NOTICE21-Aug-201811.1K
osi/21-Aug-2018
OWNERS21-Aug-2018131
packet/21-Aug-2018
PREUPLOAD.cfg21-Aug-201877
profile/21-Aug-2018
proto/21-Aug-2018
README.md21-Aug-20182.9K
service/21-Aug-2018
stack/21-Aug-2018
test/21-Aug-2018
tools/21-Aug-2018
types/21-Aug-2018
udrv/21-Aug-2018
utils/21-Aug-2018
vendor_libs/21-Aug-2018
vnd/21-Aug-2018

README.md

      1 # Fluoride Bluetooth stack
      2 
      3 ## Building and running on AOSP
      4 Just build AOSP - Fluoride is there by default.
      5 
      6 ## Building and running on Linux
      7 
      8 Instructions for Ubuntu, tested on 14.04 with Clang 3.5.0 and 16.10 with Clang
      9  3.8.0
     10 
     11 ### Download source
     12 
     13 ```sh
     14 mkdir ~/fluoride
     15 cd ~/fluoride
     16 git clone https://android.googlesource.com/platform/system/bt
     17 ```
     18 
     19 Install dependencies (require sudo access):
     20 
     21 ```sh
     22 cd ~/fluoride/bt
     23 build/install_deps.sh
     24 ```
     25 
     26 Then fetch third party dependencies:
     27 
     28 ```sh
     29 cd ~/fluoride/bt
     30 mkdir third_party
     31 cd third_party
     32 git clone https://github.com/google/googletest.git
     33 git clone https://android.googlesource.com/platform/external/aac
     34 git clone https://android.googlesource.com/platform/external/libchrome
     35 git clone https://android.googlesource.com/platform/external/libldac
     36 git clone https://android.googlesource.com/platform/external/modp_b64
     37 git clone https://android.googlesource.com/platform/external/tinyxml2
     38 ```
     39 
     40 And third party dependencies of third party dependencies:
     41 
     42 ```sh
     43 cd fluoride/bt/third_party/libchrome/base/third_party
     44 mkdir valgrind
     45 cd valgrind
     46 curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h
     47 curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h
     48 ```
     49 
     50 NOTE: If system/bt is checked out under AOSP, then create symbolic links instead
     51 of downloading sources
     52 
     53 ```
     54 cd system/bt
     55 mkdir third_party
     56 cd third_party
     57 ln -s ../../../external/aac aac
     58 ln -s ../../../external/libchrome libchrome
     59 ln -s ../../../external/libldac libldac
     60 ln -s ../../../external/modp_b64 modp_b64
     61 ln -s ../../../external/tinyxml2 tinyxml2
     62 ln -s ../../../external/googletest googletest
     63 ```
     64 
     65 ### Generate your build files
     66 
     67 ```sh
     68 cd ~/fluoride/bt
     69 gn gen out/Default
     70 ```
     71 
     72 ### Build
     73 
     74 ```sh
     75 cd ~/fluoride/bt
     76 ninja -C out/Default all
     77 ```
     78 
     79 This will build all targets (the shared library, executables, tests, etc) and
     80  put them in out/Default. To build an individual target, replace "all" with the
     81  target of your choice, e.g. ```ninja -C out/Default net_test_osi```.
     82 
     83 ### Run
     84 
     85 ```sh
     86 cd ~/fluoride/bt/out/Default
     87 LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride
     88 ```
     89 
     90 ### Eclipse IDE Support
     91 
     92 1. Follows the Chromium project
     93  [Eclipse Setup Instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_eclipse_dev.md)
     94  until "Optional: Building inside Eclipse" section (don't do that section, we
     95  will set it up differently)
     96 
     97 2. Generate Eclipse settings:
     98 
     99   ```sh
    100   cd system/bt
    101   gn gen --ide=eclipse out/Default
    102   ```
    103 
    104 3. In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML
    105  location under system/bt/out/Default
    106 
    107 4. Right click on the project. Go to Preferences->C/C++ Build->Builder Settings.
    108  Uncheck "Use default build command", but instead using "ninja -C out/Default"
    109 
    110 5. Goto Behaviour tab, change clean command to "-t clean"
    111 
    112