Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
audio_a2dp_hw/ | 03-May-2024 | - | 1,643 | 1,129 | ||
bta/ | 03-May-2024 | - | 81,329 | 48,130 | ||
btcore/ | 03-May-2024 | - | 2,436 | 1,422 | ||
btif/ | 03-May-2024 | - | 47,111 | 30,984 | ||
build/ | 03-May-2024 | - | 583 | 526 | ||
conf/ | 03-May-2024 | - | 181 | 44 | ||
device/ | 03-May-2024 | - | 1,422 | 857 | ||
doc/ | 03-May-2024 | - | 686 | 584 | ||
embdrv/ | 03-May-2024 | - | 10,320 | 5,976 | ||
hci/ | 03-May-2024 | - | 6,641 | 4,239 | ||
include/ | 03-May-2024 | - | 2,214 | 1,213 | ||
main/ | 03-May-2024 | - | 1,155 | 733 | ||
osi/ | 03-May-2024 | - | 12,943 | 8,032 | ||
profile/ | 03-May-2024 | - | 175 | 84 | ||
service/ | 03-May-2024 | - | 23,190 | 15,275 | ||
stack/ | 03-May-2024 | - | 144,214 | 83,913 | ||
test/ | 03-May-2024 | - | 1,141 | 742 | ||
tools/ | 03-May-2024 | - | 1,193 | 903 | ||
udrv/ | 03-May-2024 | - | 1,054 | 604 | ||
utils/ | 03-May-2024 | - | 285 | 156 | ||
vendor_libs/ | 03-May-2024 | - | 3,949 | 2,349 | ||
vnd/ | 03-May-2024 | - | 105 | 28 | ||
.gitignore | D | 03-May-2024 | 27 | 4 | 3 | |
.gn | D | 03-May-2024 | 888 | 23 | 20 | |
Android.mk | D | 03-May-2024 | 1.5 KiB | 54 | 32 | |
BUILD.gn | D | 03-May-2024 | 1.3 KiB | 43 | 38 | |
CleanSpec.mk | D | 03-May-2024 | 2.4 KiB | 54 | 2 | |
EventLogTags.logtags | D | 03-May-2024 | 1.3 KiB | 39 | 37 | |
MODULE_LICENSE_APACHE2 | D | 03-May-2024 | 0 | |||
NOTICE | D | 03-May-2024 | 11.1 KiB | 203 | 169 | |
README.md | D | 03-May-2024 | 3.5 KiB | 129 | 92 |
README.md
1# Fluoride Bluetooth stack 2 3## Building and running on AOSP 4Just build AOSP - Fluoride is there by default. 5 6## Building and running on Linux 7 8Instructions for Ubuntu, tested on 15.10 with GCC 5.2.1. 9 10### Install required libraries 11 12```sh 13sudo apt-get install libevent-dev 14``` 15 16### Install build tools 17 18 - Install [ninja](https://ninja-build.org/) build system 19 20```sh 21sudo apt-get install ninja-build 22``` 23 24or download binary from https://github.com/ninja-build/ninja/releases 25 26 - Install [gn](https://chromium.googlesource.com/chromium/src/tools/gn/) - meta-build system that generates NinjaBuild files. 27 28Get sha1 of current version from [here]( 29https://chromium.googlesource.com/chromium/buildtools/+/master/linux64/gn.sha1) and then download corresponding executable: 30 31```sh 32wget -O gn http://storage.googleapis.com/chromium-gn/<gn.sha1> 33``` 34 35i.e. if sha1 is "3491f6687bd9f19946035700eb84ce3eed18c5fa" (value from 24 Feb 2016) do 36 37```sh 38wget -O gn http://storage.googleapis.com/chromium-gn/3491f6687bd9f19946035700eb84ce3eed18c5fa 39``` 40 41Then make binary executable and put it on your PATH, i.e.: 42 43```sh 44chmod a+x ./gn 45sudo mv ./gn /usr/bin 46``` 47 48### Download source 49 50```sh 51mkdir ~/fluoride 52cd ~/fluoride 53git clone https://android.googlesource.com/platform/system/bt 54``` 55 56Then fetch third party dependencies: 57 58```sh 59cd ~/fluoride/bt 60mkdir third_party 61git clone https://github.com/google/googletest.git 62git clone https://android.googlesource.com/platform/external/libchrome 63git clone https://android.googlesource.com/platform/external/modp_b64 64git clone https://android.googlesource.com/platform/external/tinyxml2 65``` 66 67And third party dependencies of third party dependencies: 68 69```sh 70cd fluoride/bt/third_party/libchrome/base/third_party 71mkdir valgrind 72cd valgrind 73curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h 74curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h 75``` 76 77Fluoride currently has dependency on some internal Android projects, which also need to be downloaded. This will be removed in future: 78 79```sh 80cd ~/fluoride 81git clone https://android.googlesource.com/platform/system/core 82git clone https://android.googlesource.com/platform/hardware/libhardware 83git clone https://android.googlesource.com/platform/system/media 84``` 85 86### Configure your build 87We need to configure some paths to make the build successful. Run: 88 89```sh 90cd ~/fluoride/bt 91gn args out/Default 92``` 93 94This will prompt you to fill the contents of your "out/Default/args.gn" file. Make it look like below. Replace "/home/job" with path to your home directory, and don't use "~" in build arguments: 95 96```sh 97# Build arguments go here. Examples: 98# is_component_build = true 99# is_debug = false 100# See "gn args <out_dir> --list" for available build arguments. 101 102libhw_include_path = "/home/job/fluoride/libhardware/include" 103core_include_path = "/home/job/fluoride/core/include" 104audio_include_path = "/home/job/fluoride/media/audio/include" 105``` 106 107Then generate your build files by calling 108 109```sh 110cd ~/fluoride/bt 111gn gen out/Default 112``` 113 114### Build 115 116```sh 117cd ~/fluoride/bt 118ninja -C out/Default all 119``` 120 121This will build all targets (the shared library, executables, tests, etc) and put them in out/Default. To build an individual target, replace "all" with the target of your choice, e.g. ```ninja -C out/Default net_test_osi```. 122 123### Run 124 125```sh 126cd ~/fluoride/bt/out/Default 127LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride 128``` 129